fb-friends-bookmarklet icon indicating copy to clipboard operation
fb-friends-bookmarklet copied to clipboard

Updated Bookmarklet.js

Open OmPrakash95 opened this issue 10 years ago • 1 comments

Way of fetching User's ID is changed since No JSON Object 'Env' was available

OmPrakash95 avatar Dec 28 '14 07:12 OmPrakash95

+1

Really expecting this fix.

I had a workaround on this, but your solution is better.

var uidDom = document.querySelector('a[data-testid]')||(document.getElementById('userNav')).childNodes[0].childNodes[0].childNodes[0];

var uidDomJson = uidDom.getAttribute('data-gt');
if (!(typeof uidDomJson != 'undefined' && uidDomJson)) {
    alert('Your browser is not supported! Please contact the author.');
}

var uidData = JSON.parse(uidDomJson);
var uid = uidData.bmid;

karmiphuc avatar Jan 16 '16 05:01 karmiphuc