-
-
Save kunalshetye/69866ff2929f42e79712f4088c8f2d40 to your computer and use it in GitHub Desktop.
Extract Graph Keys as environment variables in Chrome Console
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
let items = document.querySelectorAll(".dashboard__column div:nth-child(3) > table > tbody > tr"); | |
let output = Array(); | |
output.push(``); // to get rid of Chrome VM2xxx output in the console | |
output.push(`OPTIMIZELY_GRAPH_GATEWAY=${items[0].lastChild.innerText}`); | |
output.push(`OPTIMIZELY_GRAPH_APP_KEY=${items[1].lastChild.innerText}`); | |
output.push(`OPTIMIZELY_GRAPH_SECRET=${items[2].lastChild.firstChild.value}`); | |
output.push(`OPTIMIZELY_GRAPH_SINGLE_KEY=${items[3].lastChild.innerText}`); | |
console.log(output.join("\n")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Needs to be executed on the "Dashboard Page" of your SaaS CMS

Example output: