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

Unified Diff: includes/index.tmpl

Issue 29749588: Fixes #53 - Added detection and install links for iOS safari (Closed) Base URL: https://hg.adblockplus.org/web.adblockplus.org
Patch Set: Created April 11, 2018, 8:48 p.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
« no previous file with comments | « no previous file | static/js/vendor/bowser.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: includes/index.tmpl
===================================================================
--- a/includes/index.tmpl
+++ b/includes/index.tmpl
@@ -189,8 +189,28 @@
<li>
{{"We listen to our users. If an Acceptable Ads proposal is flagged by our community for a legitimate reason, we will remove it from the whitelist."|translate("footnote-value-users")}}
</li>
<li>
{{"We are able to keep our open source product free by charging large entities a fee for whitelisting services. For the other roughly 90 percent of our partners, these services are offered free of charge."|translate("footnote-keep-free")}}
</li>
</ul>
</div>
+
+<script src="/js/vendor/bowser.js"></script>
+<script>
+ if (bowser instanceof Object)
+ {
+ var installButton = document.querySelector("install-button");
ire 2018/04/12 07:44:48 Missing class identifier ".install-button" Also,
juliandoucette 2018/04/12 11:58:01 Wow... *blushes*
+
+ if (bowser.ios)
+ {
+ //because ua-safari is not applied to iOS safari
+ document.getElementById("content").classList.add("ua-safari");
+ installButton.setAttribute("href", "https://itunes.apple.com/us/app/adblock-plus-abp-remove-ads-browse-faster-without-tracking/id1028871868?mt=8");
ire 2018/04/12 07:44:48 Why are you handling this here instead of the way
juliandoucette 2018/04/12 11:58:01 I ~incorrectly assumed that our backend browser de
+ }
+
+ else if (bowser.samsungBrowser)
+ {
+ installButton.setAttribute("href", "https://play.google.com/store/apps/details?id=org.adblockplus.adblockplussbrowser");
+ }
+ }
+</script>
« no previous file with comments | « no previous file | static/js/vendor/bowser.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld