* Tests if smooth scrolling is allowed. Shuts down everything if not.
()
| 196 | * Tests if smooth scrolling is allowed. Shuts down everything if not. |
| 197 | */ |
| 198 | function initTest() { |
| 199 | // disable keyboard support if the user said so |
| 200 | if (!options.keyboardSupport) { |
| 201 | removeEvent("keydown", keydown); |
| 202 | } |
| 203 | // disable everything if the page is blacklisted |
| 204 | if (options.excluded) { |
| 205 | let domains = options.excluded.split(/[,\n] ?/); |
| 206 | domains.push("mail.google.com"); // exclude Gmail for now |
| 207 | domains.push("play.google.com/music"); // problem with Polymer elements |
| 208 | for (let i = domains.length; i--; ) { |
| 209 | if (document.URL.indexOf(domains[i]) > -1) { |
| 210 | isExcluded = true; |
| 211 | cleanup(); |
| 212 | return; |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | } |
| 217 | /** |
| 218 | * Sets up scrolls array, determines if frames are involved. |
| 219 | */ |
no test coverage detected