| Index: adblock-browser-head.html |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/adblock-browser-head.html |
| @@ -0,0 +1,256 @@ |
| +<meta name="title" content="Adblock Browser Beta Launch" /> |
| +<meta property="og:title" content="Adblock Browser Beta Launch" /> |
| +<meta name="description" content="Want Adblock Browser for your smartphone or tablet? Join the Adblock Browser for Android Beta Google+ community." /> |
| +<meta property="og:description" content="Want Adblock Browser for your smartphone or tablet? Join the Adblock Browser for Android Beta Google+ community." /> |
| + |
| +<style type="text/css"> |
| +#content * |
| +{ |
| + box-sizing: content-box; |
| +} |
| + |
| +#content h1 |
| +{ |
| + margin-bottom: 28px; |
| +} |
| + |
| +ol |
| +{ |
| + font-size: 16px; |
| + padding-left: 60px; |
| +} |
| + |
| +ol li |
| +{ |
| + margin-bottom: 14px; |
| +} |
| + |
| +#content h3.subscribe-header |
| +{ |
| + font-size: 18px; |
| + margin-bottom: 14px; |
| +} |
| + |
| +.subscribe-description |
| +{ |
| + margin: 14px 0px 20px 0px; |
| +} |
| + |
| +.button-community-wrapper |
| +{ |
| + display: inline-block; |
| + text-align: center; |
| + border: solid 1px #4CAE4C; |
| + border-radius: 3px; |
| + background-color: #5CB85C; |
| + margin: 10px 0px 30px 0px; |
| +} |
| + |
| +.button-community-wrapper a |
| +{ |
| + display: block; |
| + padding: 25px 20px; |
| + color: #FFFFFF; |
| + font-weight: bold; |
| + font-size: 14px; |
| + text-decoration: none; |
| +} |
| + |
| +#subscribe-textbox |
| +{ |
| + border: solid 1px #B5B4B0; |
| + margin-right: 20px; |
| + padding-left: 10px; |
| + padding-right: 10px; |
| + font-size: 16px; |
| + width: 276px; |
| + line-height: 44px; |
| + height: 44px; |
| +} |
| + |
| +#subscribe-textbox.placeholder |
| +{ |
| + color: #B5B4B0; |
| +} |
| + |
| +#subscribe-button |
| +{ |
| + border: solid 1px #357EBD; |
| + border-radius: 3px; |
| + background-color: #428BCA; |
| + color: #FFFFFF; |
| + font-size: 14px; |
| + font-weight: bold; |
| + min-width: 146px; |
| + height: 44px; |
| +} |
| + |
| +#subscribe-button span |
| +{ |
| + padding-left: 30px; |
| + padding-right: 30px; |
| +} |
| + |
| +.disclaimer |
| +{ |
| + display: none; |
| + font-size: 14px; |
| + color: #D00; |
| + border: 1px solid #D00; |
| + border-radius: 5px; |
| + padding: 5px; |
| + margin-top: 30px; |
| +} |
| + |
| +html[lang="fr"] .disclaimer.lang-fr |
| +{ |
| + display: block; |
| +} |
| + |
| +#subscribe-form .empty-label, #subscribe-form .sucess-label, |
| +#response-error, #subscribe-form .invalid-label, #email-placeholder, |
| +#subscribe-form.success input, #subscribe-form.success button |
| +{ |
| + display: none; |
| +} |
| + |
| +#subscribe-form .empty-label, |
| +#subscribe-form .invalid-label |
| +{ |
| + margin-top: 30px; |
| +} |
| + |
| +#subscribe-form.success .sucess-label, |
| +#subscribe-form.empty .empty-label, |
| +#subscribe-form.invalid .invalid-label, |
| +#subscribe-form.error #response-error |
| +{ |
| + display: block; |
| +} |
| +</style> |
| + |
| +<script type="text/javascript"> |
| +//<![CDATA[ |
| +function addListener(obj, type, listener, useCapture) |
| +{ |
| + if ("addEventListener" in obj) |
| + { |
| + obj.addEventListener(type, function(ev) |
| + { |
| + if (listener(ev) === false) |
| + ev.preventDefault(); |
| + }, useCapture); |
| + } |
| + else |
| + { |
| + if (type == "DOMContentLoaded") |
| + type = "readystatechange"; |
| + |
| + type = "on" + type; |
| + if ("attachEvent" in obj) |
| + { |
| + obj.attachEvent(type, function() |
| + { |
| + if (document.readyState == "complete" && listener(event) === false) |
| + event.returnValue = false; |
| + }); |
| + } |
| + else |
| + { |
| + obj[type] = listener; |
| + } |
| + } |
| +} |
| + |
| +function addPlaceholder(textbox) |
| +{ |
| + textbox.setAttribute("class", "placeholder"); |
| + textbox.value = getPlaceholderText(); |
| +} |
| + |
| +function getPlaceholderText() |
| +{ |
| + var textProperty = "innerText" in document.body ? "innerText" : "textContent"; |
| + return document.getElementById("email-placeholder")[textProperty]; |
| +} |
| + |
| +function contentLoad() |
| +{ |
| + var emailTextbox = document.getElementById("subscribe-textbox"); |
| + |
| + // textbox placeholder implementation for browsers |
| + // that don't support placeholder attribute |
| + if (!("placeholder" in document.createElement("input")) |
| + && !emailTextbox.value) |
| + { |
| + addPlaceholder(emailTextbox); |
| + addListener(emailTextbox, "focus", function() |
| + { |
| + if (emailTextbox.value == getPlaceholderText()) |
| + { |
| + emailTextbox.value = ""; |
| + emailTextbox.setAttribute("class", ""); |
| + } |
| + }, false); |
| + |
| + addListener(emailTextbox, "blur", function() |
| + { |
| + if (!emailTextbox.value) |
| + addPlaceholder(emailTextbox); |
| + }, false); |
| + } |
| + |
| + addListener(document.getElementById("subscribe-form"), "submit", function() |
| + { |
| + var formElement = document.getElementById("subscribe-form"); |
| + if (!emailTextbox.value || emailTextbox.value == getPlaceholderText()) |
| + { |
| + formElement.setAttribute("class", "empty"); |
| + return false; |
| + } |
| + |
| + // Simple email validation for browsers |
| + // that don't support input of type email |
| + var input = document.createElement("input"); |
| + input.setAttribute("type", "email"); |
| + if (input.type !== "email" |
| + && !(/(.+)@(.+){2,}\.(.+){2,}/.test(emailTextbox.value))) |
| + { |
| + formElement.setAttribute("class", "invalid"); |
| + return false; |
| + } |
| + |
| + if (!window.XMLHttpRequest) |
| + { |
| + formElement.submit(); |
| + return false; |
| + } |
| + |
| + var params = emailTextbox.name + "=" + encodeURIComponent(emailTextbox.value); |
| + var request = new XMLHttpRequest(); |
| + request.open("POST", formElement.action, true); |
| + request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); |
| + request.setRequestHeader("Content-length", params.length); |
| + addListener(request, "readystatechange", function() |
| + { |
| + if (request.readyState == 4) |
| + { |
| + if (request.status >= 200 && request.status < 300) |
| + { |
| + formElement.setAttribute("class", "success"); |
| + } |
| + else |
| + { |
| + var textProperty = "innerText" in document.body ? "innerText" : "textContent"; |
| + document.getElementById("response-error")[textProperty] = request.statusText; |
| + formElement.setAttribute("class", "error"); |
| + } |
| + } |
| + }, false); |
| + request.send(params); |
| + return false; |
| + }, false); |
| +} |
| +addListener(document, "DOMContentLoaded", contentLoad, false); |
| +//]]> |
| +</script> |