Created
August 23, 2018 14:29
-
-
Save tioxy/4274276fceda73a16ab70a2e22bf6744 to your computer and use it in GitHub Desktop.
Saving AWS shortcuts
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
// Got these commands from https://forums.aws.amazon.com/thread.jspa?threadID=100339 | |
// Run them in your browser's console | |
// #1 Setup your shortcuts manually | |
// #2 Find which icons you have saved now | |
javascript:alert(JSON.parse(decodeURIComponent(document.cookie.replace(/(?:(?:^|.*;\s*)noflush_awscnm\s*\=\s*([^;]*).*$)|^.*$/, "$1"))).sc.join(","));void(0); | |
// #3 Run this to restore your shortcuts, replacing PREVIOUS_OUTPUT from the command below from the console output | |
javascript:var c=document.cookie.replace(/(?:(?:^|.*;\s*)noflush_awscnm\s*\=\s*([^;]*).*$)|^.*$/, "$1"); if (!c) { alert("Can't find cookie. Wrong domain?"); } else { var awscnm=JSON.parse(decodeURIComponent(c)); awscnm.sc = "PREVIOUS_OUTPUT".split(","); document.cookie = `noflush_awscnm=${encodeURIComponent(JSON.stringify(awscnm))};domain=.console.aws.amazon.com;path=/`; alert(`Restored: ${awscnm.sc}`);} void(0); | |
// My fav icons | |
javascript:var c=document.cookie.replace(/(?:(?:^|.*;\s*)noflush_awscnm\s*\=\s*([^;]*).*$)|^.*$/, "$1"); if (!c) { alert("Can't find cookie. Wrong domain?"); } else { var awscnm=JSON.parse(decodeURIComponent(c)); awscnm.sc = "ec2,s3,rds,r53,iam,lam,ecs,cw,vpc".split(","); document.cookie = `noflush_awscnm=${encodeURIComponent(JSON.stringify(awscnm))};domain=.console.aws.amazon.com;path=/`; alert(`Restored: ${awscnm.sc}`);} void(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment