Created
July 11, 2015 04:16
-
-
Save iambibhas/9907b8e610c3fc50cb5d to your computer and use it in GitHub Desktop.
Avoid Slack's URL Redirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Avoid Slack Redirect | |
// @namespace slackrediravoid | |
// @include https://*.slack.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
si = window.setInterval(clearanchors, 2000); | |
function clearanchors(){ | |
anchors = document.getElementsByTagName('a') | |
for(i=0;i<anchors.length;i++){ | |
if(anchors[i].getAttribute('onclick') != null || anchors[i].getAttribute('onmouseover') != null){ | |
anchors[i].setAttribute('onclick', ''); | |
anchors[i].setAttribute('onmouseover', ''); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment