hgy

// Twitter Page Follower script // version 0 // 2009-7-29 // Copyright (c) 2009, Kevin dolan // Released under the GPL license // http://www.gnu.org/copyleft/gpl.html // // -------------------------------------------------------------------- // // This is a Greasemonkey user script. // // To install, you need Greasemonkey: http://greasemonkey.mozdev.org/ // Then restart Firefox and revisit this script. // A window will pop up asking if you want to install the script // Accept the default configuration and install. // // To uninstall, go to Tools/Manage User Scripts, // select "Twitter Page Follower", and click Uninstall. // // -------------------------------------------------------------------- // // ==UserScript== // @name Twitter Page Follower // @namespace http://thekevindolan.com/twitter_adder/ // @description script to automatically follow all users on a page // @include http://twitter.com/followers* // @include http://www.twitter.com/followers* // @include http://twitter.com/*/followers* // @include http://www.twitter.com/*/followers* // @include http://twitter.com/*/following* // @include http://www.twitter.com/*/following* // @include http://twitter.com/*/friends* // @include http://www.twitter.com/*/friends* // ==/UserScript== els = document.getElementsByTagName('tr'); var users = new Array(); for(var i in els) { var row = els[i]; var id = row.getAttribute('id'); if(id != null) if(id.substring(0,4) == "user") users[users.length] = row; } var unfollowed = new Array(); for(var i in users) { var user = users[i]; var cl = user.getAttribute('class'); if(cl.indexOf('following') == -1) unfollowed[unfollowed.length] = user; } var butts = new Array(); for(var i in unfollowed) { var user = unfollowed[i]; var lis = user.getElementsByTagName('li'); for(var n in lis) { var li = lis[n]; var cl = li.getAttribute('class'); if(cl == "follow-action") { butts[butts.length] = li.getElementsByTagName('button')[0]; } } } if(butts.length > 0) { el = document.createElement('div'); el.setAttribute('id','friend_adder_bar'); el.style.position="fixed"; el.style.height="28px"; el.style.width="100%"; el.style.left="0"; el.style.bottom="0"; el.style.backgroundColor="#331B28"; el.style.borderTop="1px solid #A7A6AB"; el.style.zIndex="100"; txt = "
"; txt += "

"; txt += "You have "+butts.length+" unfollowed friends on this page. "; txt += "" txt += "Follow All"; txt += ""; txt += "

"; txt += "

"; txt += "Twitter Page Follower brought to you by @kevinjdolan"; txt += "

"; txt += "
"; el.innerHTML = txt; document.body.style.paddingBottom=("50px"); document.body.appendChild(el); }

0 komentar:

Posting Komentar

Video Gallery