-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Debug-Option per Einstellungsoberfläche konfigurierbar gemacht
- Loading branch information
Showing
7 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset='utf-8' /> | ||
<title>__MSG_extension_name__</title> | ||
<link rel='stylesheet' href='../css/ui.css' /> | ||
<link rel='icon' type='image/png' href='../images/icon-32.png'> | ||
</head> | ||
<body> | ||
<header> | ||
<a href='ui.html'><h1>__MSG_extension_name__</h1></a> | ||
</header> | ||
<progress id='progress' value='0'></progress> | ||
<main> | ||
<section> | ||
<form> | ||
<div class='vertical-align'> | ||
<div><input type='checkbox' name='debug' id='debug'></div> | ||
<div><label for='debug'>__MSG_option_debug_label__</label></div> | ||
</div> | ||
</form> | ||
</section> | ||
</main> | ||
<footer> | ||
<a href='https://www.soeren-hentzschel.at' target='_blank' rel='noopener'> | ||
__MSG_extension_name__ © 2017, soeren-hentzschel.at | ||
</a> | ||
</footer> | ||
<script src='../js/i18n.js'></script> | ||
<script src='../js/options.js'></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
const elDebug = document.querySelector('#debug'); | ||
|
||
const options = { | ||
load : function () { | ||
function setDebugOption(result) { | ||
elDebug.checked = result.debug_enabled || false; | ||
} | ||
|
||
let debug = browser.storage.local.get('debug_enabled'); | ||
debug.then(setDebugOption); | ||
} | ||
}; | ||
|
||
document.addEventListener('DOMContentLoaded', options.load); | ||
|
||
elDebug.addEventListener('change', function () { | ||
browser.storage.local.set({ 'debug_enabled' : this.checked }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters