Skip to content

Instantly share code, notes, and snippets.

View bookmarklet.txt
javascript:var id%3D"53bbdf9203fd6e02569ef64ef4f741a0"%2Cfile%3D"storypoint-avg.js"%2Cuser%3D"medoingthings"%2Cxhr%3Dnew XMLHttpRequest%3Bxhr.overrideMimeType("application%2Fjson")%3Bxhr.open("GET"%2C"https%3A%2F%2Fgist.githubusercontent.com%2F"%2Buser%2B"%2F"%2Bid%2B"%2Fraw%2F"%2Bfile%2B"%3F"%2BMath.random())%3Bxhr.onreadystatechange%3Dfunction()%7Bif(4%3D%3D%3Dxhr.readyState)if(200%3D%3D%3Dxhr.status)console.log("Successfully loaded gist%3A"%2C%7Bid%3Aid%2Cfile%3Afile%2Cuser%3Auser%2Cresponse%3Axhr.responseText%7D)%2C(0%2Ceval)(xhr.responseText)%3Belse%7Bvar a%3D"GitHub Gist file did not load successfully and instead returned a status code of "%2Bxhr.status%2B"."%3Bconsole.error(a%2C%7Bid%3Aid%2Cfile%3Afile%2Cuser%3Auser%7D)%3Balert(a)%7D%7D%3Bxhr.send(null)%3Bvoid+0