Last active
March 25, 2025 09:22
-
-
Save ashkrosh/e9d414a5bc74859d636b1845b85b4236 to your computer and use it in GitHub Desktop.
surfingkyes
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
const { | |
aceVimMap, | |
mapkey, | |
imap, | |
imapkey, | |
getClickableElements, | |
vmapkey, | |
map, | |
unmap, | |
unmapAllExcept, | |
vunmap, | |
cmap, | |
addSearchAlias, | |
removeSearchAlias, | |
tabOpenLink, | |
readText, | |
Clipboard, | |
Front, | |
Hints, | |
Visual, | |
RUNTIME, | |
Normal.disable | |
} = api; | |
// Disable Surfingkeys on Google Docs, Slides, and Sheets | |
if (/docs\.google\.com|slides\.google\.com|sheets\.google\.com/.test(location.hostname)) { | |
Normal.disable(); | |
} else { | |
// On other domains, allow only the 'x' binding (adjust the regex as needed) | |
unmapAllExcept(['x'], /(web\.clay\.earth|notion\.so|meet\.google\.com|mail\.google\.com|read\.readwise\.io)/i); | |
} | |
// click `Save` button to make above settings to take effect. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment