Skip to content

pratikabu/scrolltotop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scroll To Top

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

Release Notes | @scrolltotop | Discuss

Download:

  • Download for Google Chrome
    • Can be used for other Chromium browsers as well. Like: Microsoft Edge, Brave, Opera, etc.
  • Download for Mozilla Firefox

Contribute:

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

How to Run:

  • The src folder contains all the code to be used in any Chromium browsers to load as a temporary extension.
  • To debug for Firefox, use the firefox folder in the generated folder.
    • You'll have to run ./build.sh to generate the generated folder.

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'});})();

There is a no-permission version of this extension, if someone is concerned about the permissions that this extension requires. https://github.com/pratikabu/scrolltotop-lite

Read more about the author.