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

Side by Side Diff: mobile/android/chrome/content/aboutAdblockBrowser.xhtml

Issue 29346916: Issue 3220 - FAQ and Privacy Policy links redirect to English site only (Closed)
Patch Set: Applying changes from code review Created Nov. 2, 2016, 10:08 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mobile/android/base/strings.xml.in ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 2
3 <!DOCTYPE html [ 3 <!DOCTYPE html [
4 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > 4 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
5 %brandDTD; 5 %brandDTD;
6 <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> 6 <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
7 %globalDTD; 7 %globalDTD;
8 <!ENTITY % fennecDTD SYSTEM "chrome://browser/locale/about.dtd"> 8 <!ENTITY % fennecDTD SYSTEM "chrome://browser/locale/about.dtd">
9 %fennecDTD; 9 %fennecDTD;
10 ]> 10 ]>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #ifdef MOZ_TELEMETRY_ON_BY_DEFAULT 47 #ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
48 &aboutPage.telemetryStart;<a href="http://www.mozilla.org/">&aboutPage.t elemetryMozillaLink;</a>&aboutPage.telemetryEnd; 48 &aboutPage.telemetryStart;<a href="http://www.mozilla.org/">&aboutPage.t elemetryMozillaLink;</a>&aboutPage.telemetryEnd;
49 #endif 49 #endif
50 </p> 50 </p>
51 </div> 51 </div>
52 52
53 </div> 53 </div>
54 54
55 <ul id="aboutLinks"> 55 <ul id="aboutLinks">
56 <div class="top-border"></div> 56 <div class="top-border"></div>
57 <li><a href="https://adblockplus.org/en/faq">&aboutPage.faq.label;</a></li > 57 <li><a id="faqURL">&aboutPage.faq.label;</a></li>
58 <li><a href="https://adblockplus.org/en/privacy">&aboutPage.privacyPolicy. label;</a></li> 58 <li><a id="privacyURL">&aboutPage.privacyPolicy.label;</a></li>
59 <li><a href="https://adblockplus.org/en/contributors">&aboutPage.credits.l abel;</a></li> 59 <li><a id="creditsURL">&aboutPage.credits.label;</a></li>
60 <div class="bottom-border"></div> 60 <div class="bottom-border"></div>
61 </ul> 61 </ul>
62 62
63 <div id="aboutDetails"> 63 <div id="aboutDetails">
64 <p>&logoTrademark;</p> 64 <p>&logoTrademark;</p>
65 </div> 65 </div>
66 66
67 <script type="application/javascript;version=1.8"><![CDATA[ 67 <script type="application/javascript;version=1.8"><![CDATA[
68 let Ci = Components.interfaces, Cc = Components.classes, Cu = Components.u tils, Cr = Components.results; 68 let Ci = Components.interfaces, Cc = Components.classes, Cu = Components.u tils, Cr = Components.results;
69 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); 69 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
(...skipping 28 matching lines...) Expand all
98 98
99 let distroAbout = Services.prefs.getComplexValue("distribution.about", Ci.nsISupportsString); 99 let distroAbout = Services.prefs.getComplexValue("distribution.about", Ci.nsISupportsString);
100 let distroField = document.getElementById("distributionAbout"); 100 let distroField = document.getElementById("distributionAbout");
101 distroField.textContent = distroAbout; 101 distroField.textContent = distroAbout;
102 distroField.hidden = false; 102 distroField.hidden = false;
103 } 103 }
104 } catch (e) { 104 } catch (e) {
105 // Pref is unset 105 // Pref is unset
106 } 106 }
107 107
108 // 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
109 // get URLs from prefs
110 try {
111 let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getServ ice(Ci.nsIURLFormatter);
112
113 let links = [
114 {id: "faqURL", pref: "app.faqURL"},
115 {id: "privacyURL", pref: "app.privacyURL"},
116 {id: "creditsURL", pref: "app.creditsURL"},
117 ];
118
119 links.forEach(function(link) {
120 let url = formatter.formatURLPref(link.pref);
121 let element = document.getElementById(link.id);
122 element.setAttribute("href", url);
123 });
124 } catch (ex) {}
125
108 #ifdef MOZ_UPDATER 126 #ifdef MOZ_UPDATER
109 let Updater = { 127 let Updater = {
110 update: null, 128 update: null,
111 129
112 init: function() { 130 init: function() {
113 Services.obs.addObserver(this, "Update:CheckResult", false); 131 Services.obs.addObserver(this, "Update:CheckResult", false);
114 }, 132 },
115 133
116 observe: function(aSubject, aTopic, aData) { 134 observe: function(aSubject, aTopic, aData) {
117 if (aTopic == "Update:CheckResult") { 135 if (aTopic == "Update:CheckResult") {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 break; 203 break;
186 case "DOWNLOADED": 204 case "DOWNLOADED":
187 downloadedSpan.style.display = "block"; 205 downloadedSpan.style.display = "block";
188 break; 206 break;
189 } 207 }
190 } 208 }
191 #endif 209 #endif
192 ]]></script> 210 ]]></script>
193 </body> 211 </body>
194 </html> 212 </html>
OLDNEW
« no previous file with comments | « mobile/android/base/strings.xml.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld