Advertisement
wesleyac

follows you

Jun 17th, 2014
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Follows You
  3. // @namespace   http://worrydream.com/FollowsYou/
  4. // @description Replaces "FOLLOWS YOU" with better phrases.
  5. // @include     https://twitter.com/*
  6. // @version     1
  7. // @grant       none
  8. // ==/UserScript==
  9.  
  10.  
  11. // THX http://stackoverflow.com/questions/3808808/how-to-get-element-by-class-in-javascript
  12. function replaceContentInContainer(matchClass, content) {
  13.     var elems = document.getElementsByTagName('*'), i;
  14.     for (i in elems) {
  15.         if((' ' + elems[i].className + ' ').indexOf(' ' + matchClass + ' ')
  16.                 > -1) {
  17.             elems[i].innerHTML = content[Math.floor(Math.random()*content.length)];
  18.         }
  19.     }
  20. }
  21.  
  22. var creepy = ["follows you",
  23.               "envies you",
  24.               "frequently unfollows and refollows you",
  25.               "follows you to ward off the suffocating isolation and despair",
  26.               "follows you because he wishes he could meet you in person",
  27.               "follows you because he's too intimidated to write to you",
  28.               "follows you and therefore has a completely mistaken view of your depth of thought, because he experiences your writing as intermittent flurries of disjointed epigrams with all complexity and nuance squeezed out",
  29.               "follows you because he's willing to contort his personal communication and conform his public image to best suit the needs of a corporate entity which has no incentives to act in his best interest",
  30.               "misses you"]
  31.  
  32. replaceContentInContainer("FollowStatus", creepy)
  33.  
  34. var style = document.createElement('style');
  35. style.type = 'text/css';
  36. style.innerHTML = '.ProfileCard-screenname { height: auto; margin-bottom: 5px; }';
  37. document.getElementsByTagName('head')[0].appendChild(style);
  38.  
  39. document.getElementById('someElementId').className = 'cssClass';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement