Skip to content

Commit

Permalink
Merge pull request #1 from jhonatasrm/bug-loses-context-menu
Browse files Browse the repository at this point in the history
Fixed Context menu bug
  • Loading branch information
jhonatasrm authored Jun 9, 2019
2 parents 25b6e50 + 0b0b8fb commit 1524644
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/html/preferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ <h4><strong id="preferences" data-i18n="preferences"></strong>
<small class="form-text text-muted" data-i18n="description_contextmenu" style="margin-top:-2px;"></small>
</label>
<label class="btn btn-outline-primary " style="width:150px;float:right;">
<input type="radio" name="contextMenu" value="False" checked="checked">Off</label>
<input type="radio" name="contextMenu" value="false" checked="checked">Off</label>
<label class="btn btn-outline-primary " style="width:150px;float:right;">
<input type="radio" name="contextMenu" value="True">On</label>
<input type="radio" name="contextMenu" value="true">On</label>
</div>
</fieldset>
</main>
Expand Down
5 changes: 4 additions & 1 deletion src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ var timerUpdateEveryXmin = browser.i18n.getMessage("message_timer_min");
var timerMinutes = browser.i18n.getMessage("min");
var timerMinute = browser.i18n.getMessage("min1");

// load Context menu preference
contextMenuFunction();

if(localStorage.getItem("timer") == null){
reloadMinutes = 3;
localStorage.setItem("timer", 3);
Expand Down Expand Up @@ -212,7 +215,7 @@ function onCreated() {
}

function contextMenuFunction(){
if(localStorage.getItem('contextMenu') == 'True'){
if(localStorage.getItem('contextMenu') == 'true'){
browser.menus.create({
id: "tab-refresh",
title: "Tab Refresh",
Expand Down

0 comments on commit 1524644

Please sign in to comment.