Index: mobile/android/chrome/content/aboutAdblockBrowser.xhtml |
=================================================================== |
--- a/mobile/android/chrome/content/aboutAdblockBrowser.xhtml |
+++ b/mobile/android/chrome/content/aboutAdblockBrowser.xhtml |
@@ -49,19 +49,19 @@ |
#endif |
</p> |
</div> |
</div> |
<ul id="aboutLinks"> |
<div class="top-border"></div> |
- <li><a href="https://adblockplus.org/en/faq">&aboutPage.faq.label;</a></li> |
- <li><a href="https://adblockplus.org/en/privacy">&aboutPage.privacyPolicy.label;</a></li> |
- <li><a href="https://adblockplus.org/en/contributors">&aboutPage.credits.label;</a></li> |
+ <li><a id="faqURL">&aboutPage.faq.label;</a></li> |
+ <li><a id="privacyURL">&aboutPage.privacyPolicy.label;</a></li> |
+ <li><a id="creditsURL">&aboutPage.credits.label;</a></li> |
<div class="bottom-border"></div> |
</ul> |
<div id="aboutDetails"> |
<p>&logoTrademark;</p> |
</div> |
<script type="application/javascript;version=1.8"><![CDATA[ |
@@ -100,16 +100,34 @@ |
let distroField = document.getElementById("distributionAbout"); |
distroField.textContent = distroAbout; |
distroField.hidden = false; |
} |
} catch (e) { |
// Pref is unset |
} |
+ // Using formatted URLs. See https://issues.adblockplus.org/ticket/3220 |
Felix Dahlke
2016/11/17 18:34:37
Don't we revert this to the original upstream vers
diegocarloslima
2016/11/21 14:37:41
Yes, this is a snippet taken from the upstream cod
Felix Dahlke
2016/12/12 09:57:22
Just realised this is not upstream code but rather
|
+ // get URLs from prefs |
+ try { |
+ let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getService(Ci.nsIURLFormatter); |
+ |
+ let links = [ |
+ {id: "faqURL", pref: "app.faqURL"}, |
+ {id: "privacyURL", pref: "app.privacyURL"}, |
+ {id: "creditsURL", pref: "app.creditsURL"}, |
+ ]; |
+ |
+ links.forEach(function(link) { |
+ let url = formatter.formatURLPref(link.pref); |
+ let element = document.getElementById(link.id); |
+ element.setAttribute("href", url); |
+ }); |
+ } catch (ex) {} |
+ |
#ifdef MOZ_UPDATER |
let Updater = { |
update: null, |
init: function() { |
Services.obs.addObserver(this, "Update:CheckResult", false); |
}, |