咸鱼翻身做闲鱼

make XianYu great again

Mint 2018.05.24.. Lásd a legutóbbi verzió

// ==UserScript==
// @name        咸鱼翻身做闲鱼
// @namespace   xianyu
// @description make XianYu great again
// @match       https://2.taobao.com/*
// @match       https://s.2.taobao.com/*
// @match       https://trade.2.taobao.com/*
// @version     2
// @grant       none
// ==/UserScript==

/* show search box by WarsFeng */
(function () {
  var a = document.createElement('div');
  a.className = 'idle-search';
  a.innerHTML = '<form method="get" action="//s.2.taobao.com/list/list.htm" name="search" target="_top"><input class="input-search" id="J_HeaderSearchQuery" name="q" type="text" value="" placeholder="搜闲鱼" /><input type="hidden" name="search_type" value="item" autocomplete="off" /><input type="hidden" name="app" value="shopsearch" autocomplete="off" /><button class="btn-search" type="submit"><i class="iconfont">&#xe602;</i><span class="search-img"></span></button></form>';
  document.getElementById('J_IdleHeader').appendChild(a);
  var b = document.getElementsByClassName('guide-img');
  b[0].parentNode.innerHTML = ''
}) ();

/* Thank persmule for providing the method of buying from web! */
var badbuy = document.getElementById("J_BuyNow")
if (badbuy != null)
  badbuy.parentElement.removeChild(badbuy)

var form = document.getElementById('J_FrmBid')
if (form != null)
  form.innerHTML += '<input name="buy" type="submit" value="buy">'