 Issue 29555782:
  Issue 5701 - Inconsistent forum links and DNT link  (Closed)
    
  
    Issue 29555782:
  Issue 5701 - Inconsistent forum links and DNT link  (Closed) 
  | Index: new-options.js | 
| =================================================================== | 
| --- a/new-options.js | 
| +++ b/new-options.js | 
| @@ -866,6 +866,24 @@ | 
| setLinks("enable-aa-description", link); | 
| }); | 
| + // Get platform specific links | 
| + Promise.all([getPromisedInfo("platform"), getPromisedInfo("application")]) | 
| 
Sebastian Noack
2017/09/25 16:12:48
Perhaps it would be simpler to move this logic int
 
saroyanm
2017/09/25 16:34:23
I agree that sending two messages is not a good id
 | 
| + .then(([platform, application]) => | 
| + { | 
| 
saroyanm
2017/09/25 15:59:50
I wonder if we need to check for the "gecko" and a
 
Sebastian Noack
2017/09/25 16:05:55
That is an excellent idea. Though in practice it w
 
saroyanm
2017/09/25 16:34:23
Done.
 | 
| + if (platform == "chromium" && application != "opera") | 
| + application = "chrome"; | 
| + | 
| + getDocLink(application + "_support", url => | 
| + { | 
| + setLinks("visit-forum", url); | 
| + }); | 
| + | 
| + getDocLink("adblock_plus_" + application + "_dnt", url => | 
| + { | 
| + setLinks("dnt", url); | 
| + }); | 
| + }); | 
| + | 
| // Advanced tab | 
| let customize = document.querySelectorAll("#customize li[data-pref]"); | 
| customize = Array.prototype.map.call(customize, (checkbox) => | 
| @@ -914,10 +932,6 @@ | 
| { | 
| setLinks("report-bug", link); | 
| }); | 
| - getDocLink("reporter_other_link", (link) => | 
| - { | 
| - setLinks("report-forum", link); | 
| - }); | 
| getDocLink("social_twitter", (link) => | 
| { | 
| E("twitter").setAttribute("href", link); | 
| @@ -1042,6 +1056,17 @@ | 
| privacyList && privacyList.disabled == false; | 
| } | 
| + function getPromisedInfo(info) | 
| + { | 
| + return new Promise((resolve, reject) => | 
| + { | 
| + ext.backgroundPage.sendMessage({ | 
| + type: "app.get", | 
| + what: info | 
| + }, resolve); | 
| + }); | 
| + } | 
| + | 
| function populateLists() | 
| { | 
| subscriptionsMap = Object.create(null); |