Skip to content

Instantly share code, notes, and snippets.

@royling
Created March 5, 2021 07:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save royling/aeff82a0cca9a300ba72f43c51bf8f5e to your computer and use it in GitHub Desktop.
Save royling/aeff82a0cca9a300ba72f43c51bf8f5e to your computer and use it in GitHub Desktop.
Proceed
// Copy and save the script as a predefined snippet in Chrome Devtools
// Run it to proceed to an insecured website if blocked by Chrome
// See how to use snippets: https://developers.google.com/web/tools/chrome-devtools/javascript/snippets
(function() {
const link = document.querySelector('#proceed-link');
if (link && link.tagName.toLowerCase() === 'a') {
link.click();
} else if (
typeof sendCommand === "function" &&
SecurityInterstitialCommandId &&
SecurityInterstitialCommandId.CMD_PROCEED
) {
sendCommand(SecurityInterstitialCommandId.CMD_PROCEED);
}
})();
@royling
Copy link
Author

royling commented Mar 5, 2021

Initially, I was trying to put this into a one-click Chrome extension. But, it's not allowed, Chrome extension cannot inject scripts into chrome-error://chromewebdata/ page. You'll get the below error:

Unchecked runtime.lastError: Cannot access contents of url "chrome-error://chromewebdata/". Extension manifest must request permission to access this host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment