Skip to content

Commit

Permalink
Add button to show advanced options
Browse files Browse the repository at this point in the history
  • Loading branch information
proginosko committed Oct 29, 2017
1 parent 8d270ee commit acb629f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 5 additions & 2 deletions options.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,13 @@ <h3>Block Set 1<span id="blockSetCustomName1"></span></h3>
&nbsp;seconds when delaying page is used
</p>
</fieldset>
<fieldset>
<p>
<button id="showAdvOpts1" type="button">Show Advanced Options</button>
</p>
<fieldset id="advOpts1" style="display: none;">
<legend>Advanced Options</legend>
<p>
<em><strong>Warning!</strong> Be sure you understand the consequences of these options before selecting any of them.</em>
<em>Be sure you understand the consequences of these options before selecting any of them!</em>
</p>
<hr>
<p>
Expand Down
9 changes: 4 additions & 5 deletions options.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,15 @@ $("#panes").accordion({
heightStyle: "content"
});
for (let set = 1; set <= NUM_SETS; set++) {
//$(`#allDay${set}`).button();
$(`#allDay${set}`).click(function (e) { $(`#times${set}`).val(ALL_DAY_TIMES); });
//$(`#defaultPage${set}`).button();
$(`#defaultPage${set}`).click(function (e) { $(`#blockURL${set}`).val(DEFAULT_BLOCK_URL); });
//$(`#delayingPage${set}`).button();
$(`#delayingPage${set}`).click(function (e) { $(`#blockURL${set}`).val(DELAYED_BLOCK_URL); });
//$(`#blankPage${set}`).button();
$(`#blankPage${set}`).click(function (e) { $(`#blockURL${set}`).val("about:blank"); });
//$(`#homePage${set}`).button();
$(`#homePage${set}`).click(function (e) { $(`#blockURL${set}`).val("about:home"); });
$(`#showAdvOpts${set}`).click(function (e) {
$(`#showAdvOpts${set}`).css("display", "none");
$(`#advOpts${set}`).css("display", "inline");
});
}
$("#saveOptions").button();
$("#saveOptions").click(saveOptions);
Expand Down

0 comments on commit acb629f

Please sign in to comment.