您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes SGW's packing slips a liiiiittle bit shorter, so they print on one page.
当前为
// ==UserScript== // @name SGW Packing Slip Smallener // @namespace greasyfork.org // @version 0.0.0.1 // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js // @include https://sellers.shopgoodwill.com/* // @include http://*shopgoodwill.com* // @include * // @exclude https://sellers.shopgoodwill.com/sellers/newAuctionItem-catsel.asp* // @exclude https://sellers.shopgoodwill.com/sellers/fileUpload/* // @exclude http://*ebay.com/ws/eBayISAPI.dll*AddItem* // @description Makes SGW's packing slips a liiiiittle bit shorter, so they print on one page. // ==/UserScript== this.$ = this.jQuery = jQuery.noConflict(true); jQuery.fn.filterByText = function(textbox, selectSingleMatch) { return this.each(function() { var select = this; var options = []; $(select).find('option').each(function() { options.push({value: $(this).val(), text: $(this).text()}); }); $(select).data('options', options); $(textbox).bind('change keyup', function() { var options = $(select).empty().scrollTop(0).data('options'); var search = $.trim($(this).val()); var regex = new RegExp(search,'gi'); $.each(options, function(i) { var option = options[i]; if(option.text.match(regex) !== null) { $(select).append( $('<option>').text(option.text).val(option.value) ); } }); if (selectSingleMatch === true && $(select).children().length === 1) { $(select).children().get(0).selected = true; } }); }); };