Skip to content

Instantly share code, notes, and snippets.

@WanderingStar
Last active December 1, 2020 16:43
Show Gist options
  • Select an option

  • Save WanderingStar/e1f95f3d080c6db4a7f5d49a6dfefc41 to your computer and use it in GitHub Desktop.

Select an option

Save WanderingStar/e1f95f3d080c6db4a7f5d49a6dfefc41 to your computer and use it in GitHub Desktop.
setTimeout(() => {
window.close();
}, 5000)
{
"manifest_version": 2,
"name": "Auto Closer",
"description": "This extension automatically closes matching windows after a short delay.",
"version": "0.1",
"content_scripts": [
{
"matches": [
"https://localhost:8250/oidc/*",
"http://localhost:8250/oidc/*"
],
"js": [
"content.js"
]
}
]
}
@WanderingStar
Copy link
Copy Markdown
Author

put files in a directory, go to chrome://extensions turn on Developer mode, and Load Unpacked from the directory

@cjohnson-confluent
Copy link
Copy Markdown

setTimeout(() => {
    if (window.location.hostname.endsWith("zoom.us")) {
        if (window.location.hash.endsWith("success")) {
            window.close();
        }
    } else {
        window.close();
    }
}, 5000);

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