mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
Fix whitespace issue in blacklist (#472)
* Change regex to no longer merge on blank lines
This commit is contained in:

committed by
Ilya Grigorik

parent
e6835f39ff
commit
e91b4c9cdb
@@ -1,3 +1,5 @@
|
||||
var regStrip=/^[\r\t\f\v ]+|[\r\t\f\v ]+$/gm;
|
||||
|
||||
var tcDefaults = {
|
||||
speed: 1.0, // default:
|
||||
displayKeyCode: 86, // default: V
|
||||
@@ -17,7 +19,7 @@ var tcDefaults = {
|
||||
twitter.com
|
||||
vine.co
|
||||
imgur.com
|
||||
`.replace(/^\s+|\s+$/gm, '')
|
||||
`.replace(regStrip, '')
|
||||
};
|
||||
|
||||
var keyBindings = [];
|
||||
@@ -155,7 +157,7 @@ function save_options() {
|
||||
audioBoolean: audioBoolean,
|
||||
startHidden: startHidden,
|
||||
keyBindings: keyBindings,
|
||||
blacklist: blacklist.replace(/^\s+|\s+$/gm,'')
|
||||
blacklist: blacklist.replace(regStrip,'')
|
||||
}, function() {
|
||||
// Update status to let user know options were saved.
|
||||
var status = document.getElementById('status');
|
||||
|
Reference in New Issue
Block a user