Index: pages/android.tmpl |
=================================================================== |
rename from pages/android.md |
rename to pages/android.tmpl |
--- a/pages/android.md |
+++ b/pages/android.tmpl |
@@ -1,1 +1,39 @@ |
+<head> |
+ <style> |
+ /* Hide TOS, install button, and platform buttons on not-samsung Android */ |
ire
2018/05/01 08:04:25
Although I agree that these elements may not be ve
juliandoucette
2018/05/01 11:14:36
RE: Changing this without Product feedback
I agre
ire
2018/05/02 08:06:59
Ack, that is fine.
|
+ .ua-android #terms-message, |
+ .ua-android #install, |
+ .android #other-platform |
+ { |
+ display: none; |
+ } |
+ </style> |
+ <script src="/js/vendor/bowser.js"></script> |
+ <script> |
+ document.addEventListener("DOMContentLoaded", function() |
+ { |
+ var locale = "{{ locale }}"; |
+ |
+ if (bowser instanceof Object && bowser.samsungBrowser) |
+ { |
+ // hide the Adblock Browser banner |
+ document |
+ .getElementById("content") |
+ .classList.remove("ua-android"); |
ire
2018/05/01 08:04:25
Suggest: Add "ua-samsung" to the #content and hide
juliandoucette
2018/05/01 11:14:36
Good idea. That will make testing easier.
|
+ |
+ // change the Android install link to Samsung Browser |
+ document |
+ .getElementById("install-android") |
+ .href = "https://play.google.com/store/apps/details?id=org.adblockplus.adblockplussbrowser"; |
+ |
+ // update the install button text in English *only* |
+ if (locale == "en") |
+ document |
+ .getElementById("install-android") |
+ .textContent = "Agree and Install for Samsung Browser"; |
ire
2018/05/01 08:04:25
This text should be "Agree and Install for Samsung
juliandoucette
2018/05/01 11:14:36
Good catch.
|
+ } |
+ }); |
+ </script> |
+</head> |
+ |
<? include index ?> |