Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
#54 hopefully works
Browse files Browse the repository at this point in the history
  • Loading branch information
jspenguin2017 committed Dec 21, 2017
1 parent e7f1986 commit 366ed23
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion platform/chromium/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,

"name": "Nano Adblocker",
"version": "1.0.0.16",
"version": "1.0.0.17",

"commands": {
"launch-element-zapper": {
Expand Down
1 change: 1 addition & 0 deletions platform/chromium/nano-platform-vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@
/******************************************************************************/

window.NanoDefenderExtensionID = 'ggolfgbegefeeoocgjbmkembbncoadlb';
window.NanoAdblockerDeveloperModeExtensionID = 'jdcnenncdjlhclmdpjeplfefbkimfalp';
window.NanoReIsDashboardURL = /^chrome-extension:\/\/[a-z]+\/(?:nano-)?dashboard\.html/;
10 changes: 8 additions & 2 deletions platform/chromium/vapi-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,14 @@ vAPI.getURL = chrome.runtime.getURL;

/******************************************************************************/

// Patch 2017-12-07: Add a couple placeholders, might need a real i18n system
// soon...
vAPI.getExtensionID = function() {
return chrome.runtime.id;
};

/******************************************************************************/

// Patch 2017-12-07: Add a couple placeholders
// The new and robust i18n system is coming after the new dashboard
var i18nPlaceholders = {
'genericYes': 'Yes',
'genericNo': 'No',
Expand Down
8 changes: 8 additions & 0 deletions src/js/nano-dashboard-bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"use strict";

(async () => {
// I got an email saying it does not work at all, well, the new dashboard does not always work as it
// is not done yet, I don't think I have any link that leads to it in user-accessible UI
// Automatically bump back to old dashboard if not loaded in developer mode
if (vAPI.getExtensionID() !== NanoAdblockerDeveloperModeExtensionID) {
location.href = "dashboard.html";
return;
}

allowTextSelection = await readOneSettings("nanoDashboardAllowSelection");
disableTooltips = await readOneSettings("tooltipsDisabled");
updateCSS(); // Assertion inside
Expand Down
1 change: 1 addition & 0 deletions src/nano-dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ <h4 data-i18n="settingOtherGroup"></h4>
</div>
</dialog>

<script src="js/nano-platform-vars.js"></script>
<script src="js/vapi.js"></script>
<script src="js/vapi-common.js"></script>
<script src="js/vapi-client.js"></script>
Expand Down

0 comments on commit 366ed23

Please sign in to comment.