Created
December 9, 2014 21:50
-
-
Save basketofsoftkittens/5a9b9102f4f474545093 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
window.getObject = function() { | |
var pairs = window.DATA.split(/;\s?/i); | |
var object = {}; | |
var tryParse = function(obj) { | |
try { | |
return json.parse(obj); | |
} catch (e) {} | |
return obj; | |
}; | |
var pair; | |
for (var i in pairs) { | |
pair = pairs[i].split('='); | |
if (pair.length <= 1) continue; | |
object[decodeURI(pair[0])] = tryParse(decodeURI(pair[1])); | |
} | |
return object['a']; | |
}; | |
window.proccessCookie = function() { | |
var cook = getObject(); | |
if (cook) { | |
window.alert(atob(cook)); | |
} | |
}; | |
window.cookInterval = window.setInterval(function(){ | |
if (window.DATA !== void 0) { | |
window.proccessCookie(); | |
clearInterval(window.cookInterval); | |
} | |
}, 50); | |
})(); window.DATA= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment