Skip to content

Commit

Permalink
Don't offer anymore the option for the None/Firefox default theme
Browse files Browse the repository at this point in the history
It's still possible to use it till Firefox 57, but can't be selected anymore
  • Loading branch information
Croydon committed Sep 8, 2017
1 parent d8fd5c0 commit 27bfb17
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 17 deletions.
3 changes: 1 addition & 2 deletions index.js
Expand Up @@ -68,7 +68,6 @@ function webext_replyHandler(message)
if(message.type == "settings.post")
{
// Get settings from WebExt
debugOutput(message.name + " new value SDK: " + message.value);
observPrefs(message.name);
}

Expand Down Expand Up @@ -184,7 +183,7 @@ function sdk_init()
// Entry point of the add-on
exports.main = function (options, callbacks) {
// WebExtension startup + communication
webExtension.startup().then(browser =>
webExtension.startup().then(({browser}) =>
{
browser.runtime.onMessage.addListener((msg, sender, sendResponse) =>
{
Expand Down
5 changes: 3 additions & 2 deletions webextension/main.js
Expand Up @@ -233,7 +233,8 @@ function sdk_sendMsg(message)
{
browser.runtime.sendMessage(message).then(reply =>
{
if (reply) {
if (reply)
{
sdk_replyHandler(reply);
}
});
Expand Down Expand Up @@ -312,7 +313,7 @@ setTimeout(function()
let version = browserInfo.version;

// Enforce debugging, hidden settings and experiment flag to true for Firefox Nightly
if(version.includes("a1"))
if(version.includes("a"))
{
save_setting("showHiddenSettings", true);
save_setting("debug", true);
Expand Down
8 changes: 2 additions & 6 deletions webextension/options/options.html
Expand Up @@ -15,7 +15,7 @@
.preferences-description {
font-size: 90.9%;
color: graytext;
margin-top: -3px;
/*margin-top: -3px;*/
white-space: pre-wrap;
}

Expand Down Expand Up @@ -58,7 +58,7 @@
</style>
</head>

<body class="detail-view-container" contextmenu="vtr-options">
<body class="detail-view-container">
<form>

<table id="settings" style="width: 100%;">
Expand All @@ -67,10 +67,6 @@

</form>

<menu type="context" id="vtr-options">
<menuitem icon="/data/icon-16.png" id="contextmenu-show-hidden-options">VTR: Show hidden options</menuitem>
</menu>

<script src="options.js"></script>

</body>
Expand Down
3 changes: 2 additions & 1 deletion webextension/options/options.js
Expand Up @@ -113,7 +113,8 @@ function load_value(input)
// buttons don't have values
if(input.type != "button")
{
main.get_setting(input.id).then(value => {
main.get_setting(input.id).then(value =>
{
if(input.type == "checkbox")
{
document.getElementById(input.id).checked = value;
Expand Down
8 changes: 2 additions & 6 deletions webextension/options/options.json
Expand Up @@ -30,10 +30,6 @@
"title": "Theme",
"value": "dark",
"options": [
{
"value": "none",
"label": "None / Firefox default"
},
{
"value": "dark",
"label": "Dark (recommended)"
Expand Down Expand Up @@ -92,9 +88,9 @@
"showHiddenSettings": {
"name": "showHiddenSettings",
"type": "bool",
"title": "Display hidden settings",
"title": "Display advanced settings",
"value": false,
"hidden": true
"hidden": false
},
"width": {
"name": "width",
Expand Down

0 comments on commit 27bfb17

Please sign in to comment.