Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
FeatherTest - Output Page Variables (and JSON-LD)
'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
You can’t perform that action at this time.