-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimely-google-search-year.user.js
More file actions
23 lines (20 loc) · 998 Bytes
/
timely-google-search-year.user.js
File metadata and controls
23 lines (20 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// ==UserScript==
// @id timely-google-search@neilsmithline.com
// @name Timely Google Search: Last Year
// @version 0.0.1
// @namespace com.neilsmithline
// @author Neil Smithline http://www.neilsmithline.com
// @developer Neil Smithline http://www.neilsmithline.com
// @description Make Google searches default to current year rather than forever
// @updateURL https://raw.github.com/Neil-Smithline/UserScripts/master/timely-google-search-year.user.js
// @supportURL https://github.com/Neil-Smithline/UserScripts/issues
// @domain www.google.com
// @include https://www.google.com/search?q=*
// @exclude *&tbs=qdr*
// @run-at document-start
// ==/UserScript==
function set_time_restriction (timeString) {
document.location = document.location + "&tbs=qdr:" + timeString;
// GM_notification("Google search restricted to previous 12 months.");
}
set_time_restriction(GM_getValue("timeSpan", "y"));