-
-
Save mavaddat/4a9ed93d30ecddbd39a37eec10055cca to your computer and use it in GitHub Desktop.
Google Chrome password deleter
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
// Run this in chrome://settings/passwords | |
// Works as of Chrome Version 102.0.5005.27 | |
// check if we are at chrome://settings/passwords | |
if (document.location.href.indexOf("chrome://settings/passwords") == -1) { | |
console.info("Navigating to chrome://settings/passwords"); | |
document.location.href = "chrome://settings/passwords"; | |
} | |
const delay = 333; | |
setInterval(() => { | |
const bodySettingsUi = document.querySelector("body > settings-ui"); | |
const main = bodySettingsUi?.shadowRoot.querySelector("#main"); | |
const settingsBasicPage = main?.shadowRoot.querySelector("settings-basic-page"); | |
const basicpageSetting = settingsBasicPage?.shadowRoot.querySelector("#basicPage > settings-section.expanded > settings-autofill-page"); | |
const passwordsection = basicpageSetting?.shadowRoot.querySelector("#passwordSection"); | |
const passwordslisthandlerChild = passwordsection?.shadowRoot.querySelector("#passwordsListHandler > div > div.cr-separators.list-with-header > password-list-item:nth-child(1)"); | |
const passwordslisthandler = passwordsection?.shadowRoot.querySelector("#passwordsListHandler"); | |
const currentItem = passwordslisthandlerChild?.shadowRoot.querySelector("#moreActionsButton"); | |
const deleteButton = passwordslisthandler?.shadowRoot.querySelector("#menuRemovePassword"); | |
setTimeout(() => { currentItem?.click() }, delay); | |
setTimeout(() => { deleteButton?.click() }, delay); | |
}, delay); | |
setInterval(() => { | |
const removeExceptionButton = document.querySelector("body > settings-ui").shadowRoot.querySelector("#main").shadowRoot.querySelector("settings-basic-page").shadowRoot.querySelector("#basicPage > settings-section.expanded > settings-autofill-page").shadowRoot.querySelector("#passwordSection").shadowRoot.querySelectorAll("#removeExceptionButton"); | |
removeExceptionButton.forEach(removeException => { | |
const button = removeException?.shadowRoot.querySelector("#maskedImage"); | |
setTimeout(() => { button?.click() }, delay); | |
}); | |
}, delay); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment