regex for disabling (or just programmatic disabling on the page)
See original GitHub issueI just found this extension and it’s great! there’s one thing I miss, though, which is being able to specify a domain to disable on, rather than a page.
I think I’d like a function which sets/toggles whether surfingKeys is active. i.e. when called, it disables everything in surfingkeys except the hotkey to re-enable it. It should be more or less whatever Alt-s
is mapping to.
ideally i could then write stuff in the configuration like
if (document.domain is in my whitelist of regexes) {
disableSurfingKeys();
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Disable Unnecessary escape character: \/ no-useless-escape
To disable all rules on a specific line, use a line or block comment in one of the ... Your regex will work...
Read more >Regex Tutorial - Turning Modes On and Off for Only Part of ...
In a programming language, you pass them as a flag to the regex ... With these flavors, you can turn off modes by...
Read more >Best Practices for Regular Expressions in .NET - Microsoft Learn
Consider the input source. In general, regular expressions can accept two types of input: constrained or unconstrained.
Read more >How to disable or enable scripts with Regex - Perfmatters
You can disable or enable scripts in the Perfmatters Script Manager using Regex (regular expressions).
Read more >Catastrophic backtracking - The Modern JavaScript Tutorial
The typical symptom – a regular expression works fine sometimes, ... case a web-browser suggests to kill the script and reload the page....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s possible to string together multiple patterns using pipe | as a separator. I figured that out from this gist showing some kind soul’s settings:
https://gist.github.com/thameera/8c846c48fd1c9f859cf602931e18a502
Their example:
My settings to make Surfingkeys play nice with KeyPass on login pages:
I’ve also learned that it seems this setting is kept somewhere outside the visible Surfkeys settings and can get messed up if you enter stuff wrong, at which point you’ll need to do a
settings.blacklistPattern = undefined;
, save it in the Surfkeys settings page, set the patterns again, and save again on the Surfingkeys settings page.Also don’t forget to escape / characters (ex.
/.*google.com\/flights.*/i;
).@lee-tts this works because
settings.blacklistPattern
is nothing more than a Javascript Regex.