-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
28 lines (22 loc) · 664 Bytes
/
Copy pathtest.js
File metadata and controls
28 lines (22 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// ===UserScript===
// @name Bookmark Launcher
// @description Launches bookmarks with keyboard shortcuts
// ===/UserScript===
var bookmarkLauncherSetup = (function() {
var bookmarks = {}, url;
bookmarks['gl'] = 'https://www.google.ch/';
bookmarks['gi'] = 'https://www.youtube.com/';
window.addEventListener('keyup', function() {
if(event.ctrlKey && event.altKey && !event.shiftKey)
if(url = bookmarks[String.fromCharCode(event.keyCode)])
window.open(url);
});
}());
bookmarkLauncherSetup
/*
Exception: TypeError: bookmarkLauncherSetup is not a function
@Scratchpad/1:21:1
*/
/*
undefined
*/