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
function waitForElement(selector, { signal } = {}) { | |
const root = this instanceof Element ? this : document; | |
const element = root.querySelector(selector); | |
if (element) return Promise.resolve(element); | |
return new Promise((resolve, reject) => { | |
const observer = new MutationObserver(() => { | |
const element = root.querySelector(selector); | |
if (element) { | |
observer.disconnect(); |
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
body, | |
html, | |
#footer-root *, | |
.content-wrapper { | |
background-color: #1a1a1a !important; | |
color: #d7d7d7; | |
border: 0 solid; | |
} | |
#leetcode-navbar { |
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
// Triple-click the 4th line, then drag & drop it to your bookmark bar | |
javascript:(()=>{const a=location.pathname.match(/(?<=\/)[a-z]{32}(?=\/|$)(?!\/+[a-z]{32}(?=\/|$))/)?.[0];a&&location.assign("https://clients2.google.com/service/update2/crx?response=redirect&prodversion=9999.0.9999.0&acceptformat=crx2,crx3&x=id%253D"+a+"%2526uc")})() | |
// Triple-click 4th line, then drag & drop to your bookmark bar |