您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
changes default search entry to one year ago
当前为
// ==UserScript== // @name bing year search // @description changes default search entry to one year ago // @author jccalhoun // @version 0.1 // @license GNU General Public License version 3 or any later version; https://www.gnu.org/licenses/gpl-3.0.html // @include http://www.bing.com* // @include https://www.bing.com* // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js // @grant none // @namespace https://greasyfork.org/users/9631 // ==/UserScript== $(function() { var runOnce = 1; $('.fs_label, .sw_ddbk').click(function() { var today = new Date(); var dd = today.getDate(); var mm = today.getMonth()+1; //January is 0! var yyyy = today.getFullYear() - 1; var lastYear = mm+'/'+dd+'/'+yyyy; //console.log(lastYear); console.log(runOnce); if (runOnce <2) { setTimeout(function(){ document.getElementById('date_range_start').value=lastYear;}, 300); runOnce++; } // console.log(runOnce); }); //console.log(runOnce); });