/scrolltotop

Scroll To Top extension for Chrome, Firefox, Safari, Opera.

Primary LanguageJavaScriptMIT LicenseMIT

Scroll To Top

Scroll to top and vice versa in a desktop browser. A browser extension for Chrome, Firefox, Safari, Opera.

Release Notes | @scrolltotop | Discuss

Download:

Contribute:

  • Spread the word by sharing this page.
  • Rate the extension on Chrome, Firefox, Opera galleries.
  • Support development by Donating.
  • Help me translate the addon.

How to Build:

Currently the build system is based on Apache Ant.

  • Load the ants/build.xml file in the Ant view.
  • Execute the respective browser task.
  • You can also run ant on ants/build.xml directly, in this case it will generate the deployment code for all browsers.
  • This can then be used in respective browsers to load as a temporary extension.

Bookmarklet

If someone does not like installing an extension. Then you can create this Bookmark in your bookmark toolbar.

This bookmarklet will scroll up or down based on the location of your screen.

Bookmark Name: ↑↓

javascript:(function () {var paBody = document.body, paHtml = document.documentElement, paMaxY = Math.max(paBody.scrollHeight, paBody.offsetHeight, paHtml.clientHeight, paHtml.scrollHeight, paHtml.offsetHeight) - window.innerHeight, paBreakPoint = 300; if(window.scrollY > paBreakPoint || paBreakPoint >= paMaxY && window.scrollY != 0) window.scroll({top: 0, behavior: 'smooth'}); else window.scroll({top: paMaxY, behavior: 'smooth'});})();

Read more about the author.