Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: new-options.js

Issue 29502647: Issue 5482 - Sidebar and about ABP dialog (Closed)
Patch Set: Created Aug. 9, 2017, 11:02 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: new-options.js
===================================================================
--- a/new-options.js
+++ b/new-options.js
@@ -550,17 +550,6 @@
});
}
- function openDocLink(id)
saroyanm 2017/08/10 12:04:48 This is not being used anymore.
- {
- getDocLink(id, (link) =>
- {
- if (id == "share-general")
- openSharePopup(link);
- else
- location.href = link;
- });
- }
-
function switchTab(id)
{
location.hash = id;
@@ -652,11 +641,6 @@
openDialog(dialog);
break;
}
- case "open-doclink": {
- let doclink = findParentData(element, "doclink", false);
- openDocLink(doclink);
- break;
- }
case "remove-filter":
ext.backgroundPage.sendMessage({
type: "filters.remove",
@@ -867,14 +851,10 @@
},
(addonVersion) =>
{
- E("abp-version").textContent = addonVersion;
- });
- getDocLink("releases", (link) =>
- {
- E("link-version").setAttribute("href", link);
+ E("abp-version").textContent = getMessage("options_dialog_about_version",
+ [addonVersion]);
});
- updateShareLink();
updateTooltips();
// Initialize interactive UI elements
@@ -888,6 +868,11 @@
E("whitelisting-add-button").disabled = !e.target.value;
}, false);
+
+ getDocLink("contribute", (link) =>
+ {
+ E("contribute").href = link;
+ });
getDocLink("acceptable_ads_criteria", (link) =>
{
setLinks("enable-aa-description", link);
@@ -1163,7 +1148,6 @@
case "added":
filter[timestampUI] = Date.now();
updateFilter(filter);
- updateShareLink();
break;
case "loaded":
populateLists();
@@ -1176,7 +1160,6 @@
removeCustomFilter(filter.text);
delete filtersMap[filter.text];
- updateShareLink();
break;
}
}
@@ -1244,7 +1227,6 @@
break;
}
- updateShareLink();
}
function hidePref(key, value)
@@ -1305,30 +1287,6 @@
checkbox.setAttribute("aria-checked", value);
}
- function updateShareLink()
saroyanm 2017/08/10 12:04:48 We don't have share dialog in "new" new version of
- {
- let shareResources = [
- "https://facebook.com/plugins/like.php?",
- "https://platform.twitter.com/widgets/",
- "https://apis.google.com/se/0/_/+1/fastbutton?"
- ];
- let isAnyBlocked = false;
- let checksRemaining = shareResources.length;
-
- function onResult(isBlocked)
- {
- isAnyBlocked |= isBlocked;
- if (!--checksRemaining)
- {
- // Hide the share tab if a script on the share page would be blocked
- E("tab-share").hidden = isAnyBlocked;
- }
- }
-
- for (let sharedResource of shareResources)
- checkShareResource(sharedResource, onResult);
- }
-
function getMessages(id)
{
let messages = [];

Powered by Google App Engine
This is Rietveld