-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontent.js
More file actions
34 lines (32 loc) · 1.26 KB
/
content.js
File metadata and controls
34 lines (32 loc) · 1.26 KB
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
29
30
31
32
33
34
console.log("Chrome Extension GO");
document.onkeypress=function(event){
keyCode = event.keyCode;
Console.log(keycode);
switch(keyCode){
case 103:
window.open('https://www.google.com/search?q=' + window.getSelection().toString(), '_blank');
console.log("in");
break;
case 71:
window.open('https://www.google.com/search?q=' + window.getSelection().toString(), '_blank');
console.log("in");
break;
case 121:
window.open('https://www.youtube.com/results?search_query=' + window.getSelection().toString(), '_blank');
console.log("in");
break;
case 89:
window.open('https://www.youtube.com/results?search_query=' + window.getSelection().toString(), '_blank');
console.log("in");
break;
case 100:
window.open('https://duckduckgo.com/?q=' + window.getSelection().toString(), '_blank');
console.log("in");
break;
case 68:
window.open('https://duckduckgo.com/?q=' + window.getSelection().toString(), '_blank');
console.log("in");
break;
}
};
console.log("Chrome Extension u ");