| Index: chrome/content/ui/firstRun.js |
| =================================================================== |
| --- a/chrome/content/ui/firstRun.js |
| +++ b/chrome/content/ui/firstRun.js |
| @@ -15,8 +15,59 @@ |
| * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| */ |
| +(function() |
| +{ |
| + var shade; |
| + var scrollTimer; |
| + |
| + function onDomReady() |
| + { |
| + shade = document.getElementById("shade"); |
| + |
| + shade.addEventListener("mouseover", scrollPage, false); |
| + shade.addEventListener("mouseout", stopScroll, false); |
| + |
| + window.addEventListener('resize', onWindowResize, false); |
| + document.addEventListener('scroll', onScroll, false); |
|
Wladimir Palant
2013/05/15 12:12:02
Nit: double quotation marks here and above please.
Thomas Greiner
2013/05/23 09:17:21
Done.
|
| + |
| + onWindowResize(); |
| + } |
| + |
| + function onScroll() |
| + { |
| + var currentHeight = document.documentElement.scrollTop + document.body.scrollTop + document.documentElement.clientHeight; |
| + shade.style.opacity = (document.documentElement.scrollHeight == currentHeight) ? "0.0" : "0.5"; |
| + } |
| + |
| + function onWindowResize() |
| + { |
| + onScroll(); |
| + } |
| + |
| + function scrollPage() |
| + { |
| + if (scrollTimer) |
| + stopScroll(); |
| + |
| + scrollTimer = setInterval(function() |
| + { |
| + window.scrollBy(0, 5); |
| + }, 20); |
| + } |
| + |
| + function stopScroll() |
| + { |
| + clearTimeout(scrollTimer); |
| + scrollTimer = null; |
| + } |
| + |
| + document.addEventListener("DOMContentLoaded", onDomReady, false); |
| +})(); |
| + |
| function init() |
| { |
| + E("currentVersion").textContent = Prefs.currentVersion; |
| + |
| generateLinkText(E("changeDescription")); |
| for each (let subscription in FilterStorage.subscriptions) |
| @@ -87,3 +138,4 @@ |
| else |
| UI.openFiltersDialog(); |
| } |
| + |