Smart Context Scroll-to-Top (Advanced)

Adds a smart back-to-top button not only for the page, but for every scrollable container (modals, divs).

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
rurzowiutka
Daily installs
0
Total installs
10
Ratings
0 0 0
Version
2025.12.29.1.2
Created
2025-12-29
Updated
2025-12-29
Size
6.44 KB
License
MIT
Applies to
All sites

🚀 Stop "Rowing" Upstream! The Ultimate Scroll Solution is Here



How many times have you scrolled through 200 products in a shop, reached the bottom, and realized
you need to change one single filter located at the very top?

Developers forget about it. UX designers ignore it.
And we are left scrolling manually like cavemen. 😤

I've tested dozens of "Scroll to Top" extensions. They all ended up in the trash.

Why are other scripts annoying?

  • They are "dumb": They only work on the main page. Open a modal? Scroll a popup? Good luck manually scrolling back up.
  • They are intrusive: Why do most scripts show the button 100% of the time? It blocks content and distracts you even when you are already at the top. Useless!
  • They are clunky: Instead of taking you to pixel 0, they often leave you "somewhere near the top".



🔥 The Solution: Smart Context Scroll-to-Top


This isn't just a button. It is an intelligent agent that lives in your browser.
It solves every issue mentioned above with surgical precision.

Key Features:

🧠 Contextual Intelligence (The Game Changer)
  • The script detects exactly w h a t you are scrolling.
  • Browsing a Facebook feed? The button works for the page.
  • Reading a long agreement inside a popup/modal?
  • The script "sees" it and attaches the button inside that specific window.

👻 Visible Only When Needed
  • Sitting at the top? The button is invisible.
  • Scroll down (default 300px)? BOOM! It appears discreetly in the corner.

🛡️ Smart Ignore System
  • Writing a long comment or email? Don't worry.
  • The script automatically detects text inputs and won't clutter your textboxes with unnecessary buttons.

🎨 100% Configurable

    Want a bigger button? Different offset?
    Everything is accessible right at the start of the code. No hacking required.


🔧 Configuration Snippet

You can easily customize the behavior by editing the top variables:

const SCROLL_THRESHOLD = 300;     // When to show
const BUTTON_SIZE = 40;           // Size in px
const IGNORE_TEXT_FIELDS = true;  // Smart ignore

✨ Install it once, and you won't be able to live without it.

Simple. Lightweight. Intelligent.