Created
March 23, 2018 13:10
-
-
Save mattcuk/91953077ffc0ce4de4a26899ace9b7b3 to your computer and use it in GitHub Desktop.
FeatherTest - Output Page Variables (and JSON-LD)
This file contains 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
'feathertest' | |
console.log('%cSUDO - HOMEPAGE', 'color:orange'); | |
location.href = '/site_root/' | |
60000 | |
console.log('%cSUDO - '+location.href, 'color:orange'); | |
// Output JSON-LD on page | |
$('script[type="application/ld+json"]').each(function(index,json){ console.log('%cSUDO - '+JSON.stringify(JSON.parse(json.innerHTML),null,2), 'color:orange') }); | |
// Output the contents of some JavaScript variables | |
window.postMessage({ "action": "variable", "value": "myVar.hierarchy"}, window.origin); | |
window.postMessage({ "action": "variable", "value": "myVar.channel"}, window.origin); | |
window.postMessage({ "action": "variable", "value": "currentContainer.name"}, window.origin); | |
console.log('%cSUDO - ', 'color:orange'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment