SwiftlyTilting: usability, reusability

Tuesday, September 21, 2010

Stop the #twittervirus

This greasemonkey script will stop mouseovers

// ==UserScript==
// @name           Stop the #twittervirus
// @namespace      http://swiftlytilting.com/*
// @include        http://www.twitter.com/*
// @include        https://www.twitter.com/*
// @include        http://twitter.com/*
// @include        https://twitter.com/*
// @description    fix twitter
// ==/UserScript==

var links = document.getElementsByTagName("a");

   for (i = 0; i < links.length; i++) {
      var node = links[i];
      var tag = node.getAttribute("onmouseover");

      if (tag) {

            //node.remove();
            node.removeAttribute("onmouseover");
            node.removeAttribute("style");
            node.removeAttribute("href");
            node.innerHTML = 'hack removed';

      }  // end if(tag)
   } // end for loop

Download No Twitter Virus
Downloaded 1769 times

edit: Twitter fixed itself so the script isn’t needed now, though might not be bad to leave it running in case any future bugs appear. Not sure how it will affect #newtwitter though.


Comments Leave Comment

No comments yet.

Leave a Comment

Validate XHTML | Word Press