Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit 53460c4

Browse files
Merge pull request #205 from neilmacintyre/master
Fix blacklist - fixes issue #204
2 parents d3d921a + 826cea7 commit 53460c4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

book/tutorial/blacklist.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Blacklist
22

3-
** Warning: if you have a trailing comma after you last regular expression all webistes will be blacklisted **
4-
53
Sometimes you may perfer to use a website's default shortcuts without having to first enter [pass mode](https://key.saka.io/tutorial/pass_keys); if this is the case you can blacklist the website. When a url is blacklisted the page will behave as though Saka Key is disabled.
64

75
## Navigating to Blacklist

src/client/modes.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,10 @@ export function changeMode (modeChangeEvent) {
170170
let patterns = modeChangeEvent.options.blacklist
171171
.split(',')
172172
.map(patternStr => {
173-
patternStr = patternStr.trim()
174-
return new RegExp(patternStr)
173+
if (patternStr !== '') {
174+
patternStr = patternStr.trim()
175+
return new RegExp(patternStr)
176+
}
175177
})
176178
if (enabled) {
177179
if (anyMatch(patterns, window.location.href) === true) {

0 commit comments

Comments
 (0)