Advertisement
Alhadis

Bookmarklet: Grab Facebook app's permalink

Jan 20th, 2015
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. javascript:(function(){var e,t;if((t=document.querySelector(".pageAppTab [id^='pagelet_app_']"))&&(e=t.id.match(/pagelet_app_(\d+)$/i))){var a=new XMLHttpRequest;a.open("GET","https://graph.facebook.com/"+e[1]);a.addEventListener("load",function(){try{var e=JSON.parse(this.responseText);prompt("The app's permalink is: ","https://apps.facebook.com/"+e["namespace"])}catch(e){console.group("BEGIN ERROR FEEDBACK");console.dir(arguments);console.dir(this);console.trace("Stack trace");console.groupEnd();alert("Okay, that probably shouldn't have happened. Go bug John. Stay on this page.")}});a.send()}else alert("You're either not looking at the right page, or FB have rearranged their code-furniture again. Go bug John if it's the latter")})();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement