OLD | NEW |
(Empty) | |
| 1 <meta name="title" content="Adblock Browser Beta Launch" /> |
| 2 <meta property="og:title" content="Adblock Browser Beta Launch" /> |
| 3 <meta name="description" content="Want Adblock Browser for your smartphone or ta
blet? Join the Adblock Browser for Android Beta Google+ community." /> |
| 4 <meta property="og:description" content="Want Adblock Browser for your smartphon
e or tablet? Join the Adblock Browser for Android Beta Google+ community." /> |
| 5 |
| 6 <style type="text/css"> |
| 7 #content * |
| 8 { |
| 9 box-sizing: content-box; |
| 10 } |
| 11 |
| 12 #content h1 |
| 13 { |
| 14 margin-bottom: 28px; |
| 15 } |
| 16 |
| 17 ol |
| 18 { |
| 19 font-size: 16px; |
| 20 padding-left: 60px; |
| 21 } |
| 22 |
| 23 ol li |
| 24 { |
| 25 margin-bottom: 14px; |
| 26 } |
| 27 |
| 28 #content h3.subscribe-header |
| 29 { |
| 30 font-size: 18px; |
| 31 margin-bottom: 14px; |
| 32 } |
| 33 |
| 34 .subscribe-description |
| 35 { |
| 36 margin: 14px 0px 20px 0px; |
| 37 } |
| 38 |
| 39 .button-community-wrapper |
| 40 { |
| 41 display: inline-block; |
| 42 text-align: center; |
| 43 border: solid 1px #4CAE4C; |
| 44 border-radius: 3px; |
| 45 background-color: #5CB85C; |
| 46 margin: 10px 0px 30px 0px; |
| 47 } |
| 48 |
| 49 .button-community-wrapper a |
| 50 { |
| 51 display: block; |
| 52 padding: 25px 20px; |
| 53 color: #FFFFFF; |
| 54 font-weight: bold; |
| 55 font-size: 14px; |
| 56 text-decoration: none; |
| 57 } |
| 58 |
| 59 #subscribe-textbox |
| 60 { |
| 61 border: solid 1px #B5B4B0; |
| 62 margin-right: 20px; |
| 63 padding-left: 10px; |
| 64 padding-right: 10px; |
| 65 font-size: 16px; |
| 66 width: 276px; |
| 67 line-height: 44px; |
| 68 height: 44px; /* IE 8 */ |
| 69 } |
| 70 |
| 71 #subscribe-textbox.placeholder |
| 72 { |
| 73 color: #B5B4B0; |
| 74 } |
| 75 |
| 76 #subscribe-button |
| 77 { |
| 78 border: solid 1px #357EBD; |
| 79 border-radius: 3px; |
| 80 background-color: #428BCA; |
| 81 color: #FFFFFF; |
| 82 font-size: 14px; |
| 83 font-weight: bold; |
| 84 min-width: 146px; |
| 85 height: 44px; |
| 86 } |
| 87 |
| 88 #subscribe-button span |
| 89 { |
| 90 padding-left: 30px; |
| 91 padding-right: 30px; |
| 92 } |
| 93 |
| 94 .disclaimer |
| 95 { |
| 96 display: none; |
| 97 font-size: 14px; |
| 98 color: #D00; |
| 99 border: 1px solid #D00; |
| 100 border-radius: 5px; |
| 101 padding: 5px; |
| 102 margin-top: 30px; |
| 103 } |
| 104 |
| 105 html[lang="fr"] .disclaimer.lang-fr |
| 106 { |
| 107 display: block; |
| 108 } |
| 109 |
| 110 #subscribe-form .sucess-label, #response-error, |
| 111 #subscribe-form .invalid-label, #subscribe-form.success input, |
| 112 #subscribe-form.success button |
| 113 { |
| 114 display: none; |
| 115 } |
| 116 |
| 117 #subscribe-form .invalid-label |
| 118 { |
| 119 margin-top: 30px; |
| 120 } |
| 121 |
| 122 #subscribe-form.success .sucess-label, |
| 123 #subscribe-form.invalid .invalid-label, |
| 124 #subscribe-form.error #response-error |
| 125 { |
| 126 display: block; |
| 127 } |
| 128 </style> |
| 129 |
| 130 <script type="text/javascript"> |
| 131 //<![CDATA[ |
| 132 function addListener(obj, type, listener, useCapture) |
| 133 { |
| 134 if ("addEventListener" in obj) |
| 135 { |
| 136 obj.addEventListener(type, function(ev) |
| 137 { |
| 138 if (listener(ev) === false) |
| 139 ev.preventDefault(); |
| 140 }, useCapture); |
| 141 } |
| 142 else |
| 143 { |
| 144 if (type == "DOMContentLoaded") |
| 145 type = "readystatechange"; |
| 146 |
| 147 type = "on" + type; |
| 148 // IE 8 |
| 149 if ("attachEvent" in obj) |
| 150 { |
| 151 obj.attachEvent(type, function() |
| 152 { |
| 153 if (document.readyState == "complete" && listener(event) === false) |
| 154 event.returnValue = false; |
| 155 }); |
| 156 } |
| 157 else |
| 158 { |
| 159 obj[type] = listener; |
| 160 } |
| 161 } |
| 162 } |
| 163 |
| 164 function addPlaceholder(textbox) |
| 165 { |
| 166 textbox.setAttribute("class", "placeholder"); |
| 167 textbox.value = getPlaceholderText(); |
| 168 } |
| 169 |
| 170 function getPlaceholderText() |
| 171 { |
| 172 return document.getElementById("subscribe-textbox").getAttribute("placeholder"
); |
| 173 } |
| 174 |
| 175 function contentLoad() |
| 176 { |
| 177 var emailTextbox = document.getElementById("subscribe-textbox"); |
| 178 |
| 179 // IE9 + Safari iOS |
| 180 if (!("placeholder" in document.createElement("input")) |
| 181 && !emailTextbox.value) |
| 182 { |
| 183 addPlaceholder(emailTextbox); |
| 184 addListener(emailTextbox, "focus", function() |
| 185 { |
| 186 if (emailTextbox.value == getPlaceholderText()) |
| 187 { |
| 188 emailTextbox.value = ""; |
| 189 emailTextbox.setAttribute("class", ""); |
| 190 } |
| 191 }, false); |
| 192 |
| 193 addListener(emailTextbox, "blur", function() |
| 194 { |
| 195 if (!emailTextbox.value) |
| 196 addPlaceholder(emailTextbox); |
| 197 }, false); |
| 198 } |
| 199 |
| 200 addListener(document.getElementById("subscribe-form"), "submit", function() |
| 201 { |
| 202 var formElement = document.getElementById("subscribe-form"); |
| 203 if (!window.XMLHttpRequest) |
| 204 { |
| 205 formElement.submit(); |
| 206 return false; |
| 207 } |
| 208 |
| 209 var params = emailTextbox.name + "=" + encodeURIComponent(emailTextbox.value
); |
| 210 var request = new XMLHttpRequest(); |
| 211 request.open("POST", formElement.action, true); |
| 212 request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"
); |
| 213 addListener(request, "readystatechange", function() |
| 214 { |
| 215 if (request.readyState == 4) |
| 216 { |
| 217 if (request.status >= 200 && request.status < 300) |
| 218 { |
| 219 formElement.setAttribute("class", "success"); |
| 220 } |
| 221 else if (request.status == 400) |
| 222 { |
| 223 formElement.setAttribute("class", "invalid"); |
| 224 } |
| 225 else |
| 226 { |
| 227 var errorWrapper = document.getElementById("response-error"); |
| 228 if ("textContent" in errorWrapper) |
| 229 errorWrapper.textContent = request.statusText; |
| 230 else // IE8 |
| 231 errorWrapper.innerText = request.statusText; |
| 232 |
| 233 formElement.setAttribute("class", "error"); |
| 234 } |
| 235 } |
| 236 }, false); |
| 237 request.send(params); |
| 238 return false; |
| 239 }, false); |
| 240 } |
| 241 addListener(document, "DOMContentLoaded", contentLoad, false); |
| 242 //]]> |
| 243 </script> |
OLD | NEW |