Add userscript
This commit is contained in:
parent
ccaad24f14
commit
e485b2ea78
15
script.js
Normal file
15
script.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
(function() {
|
||||||
|
window.addEventListener("click", function(e) {
|
||||||
|
if (
|
||||||
|
e.button == 1 // for middle click
|
||||||
|
//|| e.ctrlKey // for ctrl + click
|
||||||
|
) {
|
||||||
|
var new_uri = e.srcElement.href;
|
||||||
|
if (new_uri) {
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
window.open(new_uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
|
})();
|
Loading…
Reference in a new issue