Skip to content

Commit

Permalink
Firefox compatibility tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrance committed Apr 29, 2019
1 parent eef7629 commit 405f924
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
1 change: 0 additions & 1 deletion Homely/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"version": "1.7.1",
"author": "Ollie Terrance",
"homepage_url": "https://github.com/OllieTerrance/Homely",
"incognito": "split",
"offline_enabled": true,
"chrome_url_overrides": {
"newtab": "res/html/homely.html"
Expand Down
30 changes: 20 additions & 10 deletions Homely/res/js/homely.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ $(document).ready(function() {
"proxy": false
},
"style": {
"font": "Segoe UI",
"font": "",
"fluid": false,
"topbar": {
"fix": false,
Expand Down Expand Up @@ -2102,12 +2102,16 @@ $(document).ready(function() {
break;
}
// request list of fonts from FontSettings API
chrome.fontSettings.getFontList(function fontsCallback(fonts) {
for (var i in fonts) {
$("#settings-style-font").append($("<option/>").text(fonts[i].displayName));
}
$("#settings-style-font").val(settings.style["font"]);
});
if (chrome.fontSettings) {
chrome.fontSettings.getFontList(function fontsCallback(fonts) {
for (var i in fonts) {
$("#settings-style-font").append($("<option/>").text(fonts[i].displayName));
}
$("#settings-style-font").val(settings.style["font"]);
});
} else {
$("#settings-style-font").closest(".form-group").hide();
}
$(".ext-name").text(manif.name);
$(".ext-ver").text(manif.version);
// reset modal on show
Expand Down Expand Up @@ -2444,10 +2448,16 @@ $(document).ready(function() {
settings.general["notepad"].show = $("#settings-general-notepad-show").prop("checked");
settings.general["apps"] = $("#settings-general-apps").prop("checked");
if (!settings.general["apps"]) {
chrome.permissions.remove({
chrome.permissions.contains({
permissions: ["management"]
}, function(success) {
if (!success) revokeError = true;
}, function(has) {
if (has) {
chrome.permissions.remove({
permissions: ["management"]
}, function(success) {
if (!success) revokeError = true;
});
}
});
}
settings.general["weather"] = {
Expand Down

0 comments on commit 405f924

Please # to comment.