Continue the work I have done yesterday, instead of print in the console, the
id will be printed next to the name of the user if the id is found.
The following is the code:
{"manifest_version":2,"name":"FBUrlId","description":"Try to get Facebook Id from URL change","version":"0.1","background":{"scripts":["eventPage.js"]},"content_scripts":[{"matches":["https://www.facebook.com/*"],"js":["showid.js"]}],"permissions":["tabs"]}
chrome.runtime.onMessage.addListener(function(request,sender,sendResponse){//console.log(request.name);//console.log(request.id);// wait page to be loadedvartimerId=setInterval(function(){varn=document.querySelector("#fb-timeline-cover-name");if(n!=null){varidNode=document.createTextNode(request.id);n.appendChild(idNode);clearInterval(timerId);}},500);});