Collection of Javascript and CSS Code for Facebook Tweaking


tweak your facebook profile, javascript and css code for facebook, facebook javascript collection, CSS Injection, Facebook Welcome Alert, Blinking Facebook Logo, Add MP3 Background Music to Facebook, Change Facebook Profile Picture With GIF Animated Picture, Floating Visitor Picture On The Right Side, Facebook Visitor Log, facebook javascript codesFBJS Tips and TrickHere are some simple javascript codes you can use to tweak your facebook profile. They are actually the codes from my /facebook/fb_layout.js . Please note that to use these codes you have to insert an XSS first to your profile, kindly read an article on this blog about Facebook XSS onClick via iPhone. You can host your own external javascript file, so you can freely add more modification to your profile.


Below are the javascript code :
CSS Injection :
a=document.createElement('link');
a.rel='stylesheet';
a.href='YOUR_CSS_URL';
document.getElementsByTagName('head')[0].appendChild(a);
change the red part with your own external css file.
Facebook Welcome Alert With Visitor Name
alert('Hello '+$('navAccountName').innerHTML.replace("'","\'")+'..\nWelcome to my profile');
change the red part with your custome message
Blinking Facebook Logo
Read the post here :
Add MP3 Background Music to Facebook
$('blueBar').innerHTML+='<embed src="http://static.int.crazydavinci.net/music/player.swf?soundFile=YOUR_MP3_URL&autostart=yes&loop=yes" width="1" height="1" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" />';
change the red part with your own MP3 URL
Change Facebook Profile Picture With GIF Animated Picture
$("profile_pic").src="YOUR_GIF_IMAGE_URL";
change the red part with your own GIF animated image
Change Facebook Profile Picture With Flash
$("profile_pic").innerHTML="<embed src="YOUR_SWF_URL" />";
change the red part with your own swf url
Floating Visitor Picture On The Right Side
Shows a floating object on the right side of your window with visitor profile picture. Read the post here :
Facebook Visitor Log
Record who has viewed your facebook layout. Kindly proceed here :
Typing Text
on Title Bar :
var teks = 'Your Typing Text Here…',mulai=1;
setInterval(function(){document.title = teks.substr(0,mulai) + '_'; mulai = (mulai>teks.length) ? 1 : mulai+1;},150);
on Profile Name :
var teks = 'Your Typing Text Here…',mulai=1;
setInterval(function(){$('pagelet_header_personal').innerHTML='<div id="profile_pic" class="profileHeaderMain"><h1 id="Joy">'+ teks.substr(0,mulai) + '_</h1></div>'; mulai = (mulai>teks.length) ? 1 : mulai+1;},150);
Change the red part with your own value. 150 is the delay time in milisecond, you can change it to your own delay value.
You can also try all the javascript codes above live on your profile using javascript address bar hack to see the preview, example, for the welcome alert code, you can try it by following these steps :
  1. Go to your facebook profile
  2. add the word javascript before, and the word void(0) after, like this :
  3. javascript:alert('Hello '+$('navAccountName').innerHTML.replace("'","\'")+'..\nWelcome to my profile');void(0)
  4. Copy paste the code, then paste it to your address bar, press enter
And here are some of the CSS hide codes you can use :
Hide Send Message Button
#profile_action_send_message{display:none}
Hide Unfriend Link
#profile_action_remove_friend{display:none}
Hide Report/Block Link
#profile_action_report_block{display:none}
Hide Right Sidebar
#pagelet_right_sidebar{display:none}
Hide The Whole Profile =))
.hasLeftCol{display:none}
That’s all for now, you can see yourself the other divs/classes from your facebook profile and hide them yourself.
Happy tweaking ;)

Categories:
Comments
1 Comments

1 komentar:

We are in the process of deprecating FBML. If you are building a new application on Facebook.com, please implement your application using HTML, JavaScript and CSS. Perhaps the issue is one of ordering. I believe that the order in which the various JavaScript and CSS files are read and executed is important.

Thanks
Jackie

Posting Komentar

 

Tips Remember This Blog

please press CTRL+D (bookmark) for remember article

Featured Posts