Skip to content

Instantly share code, notes, and snippets.

@iambibhas
Created July 11, 2015 04:16
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save iambibhas/9907b8e610c3fc50cb5d to your computer and use it in GitHub Desktop.
Avoid Slack's URL Redirect
// ==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