Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Follows You
- // @namespace http://worrydream.com/FollowsYou/
- // @description Replaces "FOLLOWS YOU" with better phrases.
- // @include https://twitter.com/*
- // @version 1
- // @grant none
- // ==/UserScript==
- // THX http://stackoverflow.com/questions/3808808/how-to-get-element-by-class-in-javascript
- function replaceContentInContainer(matchClass, content) {
- var elems = document.getElementsByTagName('*'), i;
- for (i in elems) {
- if((' ' + elems[i].className + ' ').indexOf(' ' + matchClass + ' ')
- > -1) {
- elems[i].innerHTML = content[Math.floor(Math.random()*content.length)];
- }
- }
- }
- var creepy = ["follows you",
- "envies you",
- "frequently unfollows and refollows you",
- "follows you to ward off the suffocating isolation and despair",
- "follows you because he wishes he could meet you in person",
- "follows you because he's too intimidated to write to you",
- "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",
- "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",
- "misses you"]
- replaceContentInContainer("FollowStatus", creepy)
- var style = document.createElement('style');
- style.type = 'text/css';
- style.innerHTML = '.ProfileCard-screenname { height: auto; margin-bottom: 5px; }';
- document.getElementsByTagName('head')[0].appendChild(style);
- document.getElementById('someElementId').className = 'cssClass';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement