Add userscript

This commit is contained in:
Yash Karandikar 2022-11-03 09:17:16 -05:00
parent ccaad24f14
commit e485b2ea78
1 changed files with 15 additions and 0 deletions

15
script.js Normal file
View 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);
})();