Skip to content

Commit

Permalink
Avoid URL parse error for local pages
Browse files Browse the repository at this point in the history
  • Loading branch information
proginosko committed Dec 3, 2017
1 parent e8878f6 commit 4b305fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions options.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function saveOptions() {
let limitMins = document.querySelector(`#limitMins${set}`).value;
let delaySecs = document.querySelector(`#delaySecs${set}`).value;
let blockURL = document.querySelector(`#blockURL${set}`).value;
let parsedURL = getParsedURL(blockURL);

// Check field values
if (!checkTimePeriodsFormat(times)) {
Expand All @@ -40,7 +39,8 @@ function saveOptions() {
$("#alertBadSeconds").dialog("open");
return;
}
if (blockURL != DEFAULT_BLOCK_URL && blockURL != DELAYED_BLOCK_URL && !parsedURL.page) {
if (blockURL != DEFAULT_BLOCK_URL && blockURL != DELAYED_BLOCK_URL
&& !getParsedURL(blockURL).page) {
$("#tabs").tabs("option", "active", (set - 1));
$("#alertBadBlockURL").dialog("open");
return;
Expand Down

0 comments on commit 4b305fe

Please sign in to comment.