Giter Club home page Giter Club logo

modern-scroll's Introduction

modern scroll is an extension for Opera and Chromium-based browsers that takes scrolling to a whole new level.

What's so awesome about it?

  • its scroll bars don't take up any space so the whole screen width can be used to display what a browser is made for: websites
  • elements or whole pages don't shift by some pixels when content changes and bars become (un)necessary
  • scroll bars are usable in fullscreen mode as well
  • scroll bars automatically hide when they are not needed
  • behavior and appearance is fully customizable
  • can boost your scrolling performance
  • scrolling speed and behavior is adjustable
  • unique "superbar" which makes it possible to scroll horizontally and vertically at the same time
  • buttons for scrolling to top and bottom of the page
  • Interface for custom mouse gestures / bookmarklets

modern-scroll's People

Contributors

acryion avatar ahoj1234 avatar an-dz avatar chocimier avatar christoph142 avatar da2x avatar metude avatar transifex-integration[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

modern-scroll's Issues

Scroll bar stuck

I'm sorry, I'm not sure whether it's a problem with your extension or a problem with my edge update. When my page is loading image resources, I cannot scroll the page with the mouse wheel, and even after loading, there is a high chance of lag. I hope you can help me troubleshoot this issue. Thanks!

Feature request: Add an option to show scrollbar relative to which side the cursor is on

@Christoph142 Thank you for making this extension I'm loving the experience so far!

What I'm suggesting is while browsing the internet I see the main reading contents is on right, many are on the center (like Github) and many are also on the left. some websites provide content on both sides of the page right and left like (https://www.nytimes.com/) what I want to say is the internet has a mixed style of the reading experience. it isn't consistent.
now whenever I read something I usually focus wherever the content is & it's really hard for me to focus on the scrollbar if the content I'm reading is on left and the scrollbar is in right. or vice-versa. now I can easily change the position going in the setting page or just clicking the popup but the problem is I work with too many tabs each website offers its reading contents differently Right, center, and left. so it's really time-consuming to change this process for each one!
so when I was thinking about what could be the best way to fix this I stuck with an epiphany! I tend to make notes and for that, I use my cursor a lot for highlighting purposes. and wherever the content I'm reading the cursor would be just there & there it is the solution just follow the "cursor".
to understand the problem I'm having, experience it yourself just open https://www.nytimes.com/ and place your scrollbar on either side (I have it on my right) now try to read the whole page you will begin to get irritated to go from one far side to another far side just to check on the scrollbar. by the way, the GitHub text area is my fav. text area to scroll bar placement coz it's always in the sight it's not too far so it doesn't cause any issues.

Some alternative features requests would be
Make the scrollbar available on both sides of the browser it would be a bit unpleasant to see but the functionality would increase!
Make the scrollbar follow the mouse and then if the user chooses user can place the scrollbar via pressing a hotkey wherever the user wants.
In fact, I think you should add all the three mentioned feature users love redundancy. It would be a huge + for UX!
Please don't say no!🙏🥺

P.S. I'm not a native English speaker so if you see any grammatical mistakes please forgive me!

More advanced scroll

Hey, I only use this extension for mouse scrolling so it would be nice if you could turn off the other changes relating to the scrollbar and such.

Also, I would love to be able to mess with more of the "physics" of the scrolling. For instance look at this extension. These are the settings I use:

Step size - 100
Animation time - 400
Acceleration scale - 999
Pulse scale - 10

Would be pretty cool of modern scroll could do this as well.

PgUp / PgDn may omit sections of page content

Does modern scroll exert any influence over how the keyboard keys PgUp / PgDn are handled?

I ask for two reasons:

(1) it seems like it does, in a good way -- it feels like PgUp / PgDn are much faster, more of an instant redraw than a slow-wave-lurch like I expect. ('slow' like I can perceive the redraw happening over maybe 100ms of realtime)

(2) I'm currently annoyed at a web page for setting itself up (somehow) so that PgDn has negative overlap. Instead of, let's say, 2 lines which were previously at the bottom of the window now being at the top, instead it leaps forward about 1 whole viewport plus a line. So I more or less need to hit 'PgDn, UpArrow' every time if I want a smooth viewing experience.

... Therefore I'm wondering if modern scroll could take control of that; provide some sort of override control of PgUp/Dn overlap.

Enhance visibility: fade in faster, Smooth scrolling

When scrolling by mousewheel, I'd like to see the scroll bar fade in as fast as possible, so I have a visual feedback of where I am on the page.

Also, I'd like it to not jump to the scrolling end position but I'd like to see it updated while scrolling.

causes scrollbars on exercism.org to disappear

When Modern Scroll is enabled, scrollbars are missing on exercism.org.

I've verified this with default MS settings. However there is some weirdness about changing settings vs. reloading vs. enabling/disabling MS on the specific site. Some effort / fooling around may be required to consistently reproduce the issue.

Note that an exercism.org login is not needed. You can get to a sample exercise without it (tested in 'incognito').

  1. open https://exercism.org/tracks/javascript/exercises/regular-chatbot
  2. make your browser window as narrow as possible. Exercism will prevent it from getting below about 500 pixels
  3. scroll down to the first code box (starts with isValidCommand("Chatbot ...)
  4. due to the narrow window, the code in this box should be nearly twice as wide as the box; the box should have a scrollbar
  5. if MS is active, the scrollbar is missing
  6. if it does not reproduce: go into MS settings, load Default; reload the Exercism page; disable MS for this site; re-enable MS for this site; reload the Exercism page

ms-1

Modern Scroll 4.2.2 from Opera 'store' (ID 'eiinejdcihhdbdbipfapahmjndejdpjb')
Opera opera-developer 88.0.4401.0
LinuxMint 17.3 based on Ubuntu 14.04 'Trusty'
Linux '4.4.0-148-lowlatency #174~14.04.1-Ubuntu SMP PREEMPT'

I'm aware my system is appallingly out of date :) Don't think it relates to the issue.

Two other issues noted in passing:

A. when I disable MS for the site, it pops up 'If there's an issue with the page, please report it so it can get fixed for everybody. [ Report an issue ]' -- clicking this button opens the browser 'store' entry for MS. In this case, https://addons.opera.com/en/extensions/details/modern-scroll/. I expected it to go to https://github.com/Christoph142/modern-scroll/issues

B. as I was testing in 'incognito', I had set Opera to allow MS in incognito mode. Then MS worked, and I was able to operate its options menu, including loading different sets of options (didn't try saving). However, the option to enable / disable MS on that site is missing. Fortunately I could toggle it from a not-incognito tab of the same site, and the incognito tab would follow suit

please delay the bookmarks / headings

The bookmarks / headings setting makes it difficult to use the modern-scroll options within its own menu, pulled down from the browser toolbar menu button. The option checkboxes are near the right edge (I was having a hard time with the 'Save' icon).

This also just generally makes it difficult to use any part of a window which is near its far right edge.

I'm aware I can avoid popping these up if I 'simply' don't touch the window's scrollbar. But I am not habitually that careful: my typical mouse approach probably looks like a big curve which somewhat overshoots the target, then pulls back. Having crossed the scrollbar, even for an instant, blats a bunch of scrollbar bookmark headings over the right side of the page, over the page widgets I was actually trying to interact with.

The bookmark buttons seem to have around a 1500ms fadeout after mousing away from the scrollbar. Please add a corresponding fade in timer. Something like: after the mouse touches the scrollbar, track how long it stays within some delta distance (?50px?) of the scrollbar. If it stays within for 750ms, bring up the bookmarks.

A way to dismiss the bookmarks would also be helpful. e.g.: waggle the mouse left-right-left-right in that area while they're up -- with motions large and sharp enough to be intentional. Stay dismissed until mouse has left and reentered the area.

Doesn't work well with trackpad/touchpad zoom.

Zooming into a page using a trackpad/touchscreen zooms into the "window" (not the page) which also means the scroll bar zooms in and out and can go off-screen if you zoom anywhere to the left of the scroll bar. I don't know how you would fix this.

scroll bar to left + edge vertical tab

the scrollbar is not showing when microsoft edge vertical tab auto show from collapsed to full width.
Idea:scroll bar to left + edge vertical tab
Why:click each tab and scroll a few line is super fast and convenient.

Can't scroll on music.163.com

Just as the title mentioned, I can't scroll the site when using this expansion. But when I unloaded the expansion, everything returned normal.
Can the author of the expansion fix this problem? 
Respect!

'new layout' Facebook notifications menu doesn't receive mouse wheel scroll events

Hi,

This probably can't be reproduced without a Facebook account, so I hope one is available.

On Facebook's recently replaced desktop web UI (the default if you go to www.facebook.com from a desktop), the Notifications menu does not scroll with modern-scroll active.

This is the most direct repro (assuming FB account, sufficiently connected to have more than a screen's worth of notifications):

  1. Go to facebook.com/notifications (*1); the notifications menu appears in the right column and is scrollable
  2. Click on a post notification within the menu; the menu remains open, while the selected post opens in the left part of the page
  3. Use mouse wheel to scroll the post (left part of page); this should work
  4. Use mouse wheel to scroll the still-open notifications menu (right part of page); this should work, but does not. Instead, the post (left part of page) scrolls despite the mouse pointer being on top of the menu

It is as if modern-scroll is routing the scroll events to the wrong layer of the page. I don't know if that means z-index, frames, or what -- did not try to decompose the page internals. I normally expect a different sort of scroll-cascading behavior, in which the pointed-at object scrolls, but when it reaches the end of its scrollable area, then and only then, scroll events bubble outwards to the parent 'layer'. (I'm not sure I'm 100% in favor of that default behavior, but it is the long-observed default which is being violated here; in the direction of always bubbling outwards.)

Particularly note that scrolling the notifications does work initially; it is not until one has been clicked through, instantiating a post in the left part of the page, that it stops working.

(*1) Note that this relates to a new behavior of the FB 'new layout'. In the old layout, clicking an item in the notifications menu replaced the entire page contents; in the new, it puts a post into the left part of the page (as if an iframe, though I think it is not). This behavior happens only when opening facebook.com/notifications, not when merely pulling down the notifications menu from an existing FB page.

Possibly relevant details:

Linux Mint 17.3 (!old!) x86_64
Linux kernel: 4.4.0-119-generic #143~14.04.1-Ubuntu SMP Mon Apr 2 18:04:36 UTC 2018 x86_64
X server: X.org 1.17.1
Window manager: marco 1.12.0
Session: MATE 1.12.0
Browser: Opera 72.0.3791.0 (opera-developer branch)

This is not intended as a 'delta report' suggesting that this worked correctly on FB's 'old layout' or anywhere else. I just started using modern-scroll today, I have no prior experience with it. I see that it works in many places, including internal scrolling areas of many pages; and indeed on the problem page, until clicking a particular post. There are probably other places on FB (and elsewhere) with the same behavior, which I haven't noticed yet. I merely pinpoint one specific case that I know how to reproduce.

It might be modern-scroll-settings related. I did not find a way of saving settings to a text file.

It does not relate to the 'Style all scrollbars' setting -- happens the same whether this is on or off.

Not sure who's at fault.

I'll try to be concise.. haha. When i open an epochtimes.com news article (paywalled) they have an advertisment at the top of the page. with modern scroll enabled, the advertisement gains a scroll bar and you can then hover and scroll down inside the ad's box down into a lot of extra and blank verticle space. So could be a shortcoming in their code as they are just updating the site recently. PHP is a fickle mistress. but in case it's your bug, i figure i would raise the alarm.

The funny bit is, i was zoomed 125%, so the modified ad box took up nearly the whole screen, the scroll bar fell off the visible screen space off to the right, and i'm scrolling up and down, not knowing i'm inside the ad box thinking, well... that page is fubar, what are those guys doing? nothing but white space. lol fool me 6 times but not 7 apparently. heh heh

and dude..... modern scroll is a dream come true for me. can't state that or thank you enough. amazing

Feature Request: Make the scrollbar Moveable, Followable & click/pass through able

As I mentioned in #189 it's hard to follow the scrollbar if the reading content is way far on each end. & the scroll bar is stuck on only one side.
Feature suggested in #189 would work for the above annoyance but if the reading is in the middle
as you can see the main reading content is in the middle right & my scroll bar remains on the left. scrollbar that far feels a distraction constantly moving my eyes from the content and then going back to where I left is annoying & it's not just once in a while. I stumble upon these 50 -60% of my browsing experience! by making the scroll bar follow the cursor we eliminate this problem entirely!

Make the scrollbar follow the mouse and then if the user chooses user can place the scrollbar via pressing a hotkey wherever on the page user wants to drop the scrollbar. this feature also warrants the ability to make it click-through so it doesn't get b/w the user work & a hotkey to quickly disable the effect. (better to make a quick hold and release key or a simple enable/disable key better to provide both because they are equally gonna be in need.) so whenever the users want to use the scroll bar doesn't matter to scroll or move the scrollbar on the page they can do so efficiently!

This feature needs to provide various user choices to make the user experience better

  • Followble & click-through able from the start user can place wherever they wish to. or let the scroll follow the cursor indefinitely.

  • Stick to the sides & only follow if the user activates the function via the hotkey. Making it quickly follows the cursor now user can drag & drop it anywhere on the page or just let it follow the cursor however they want to use it they can use it!

  • A hotkey to make move the scrollbar instantly on either side of the page.

Blacklisting sites

It would be nice to have an opportunity to add some sites to "white list". The extension should not be run on the sites from this list. Or at least not use the own customization and left just the custom behavior, like smooth scrolling, etc.

please clean up errors

Your periodic 'leave feedback' thingie popped up, so here I am...

Using MS 4.1.1.0 in Opera (opera-dev, some back-rev version since my OS is too old to load the most recent binaries; but I am sure this is not relevant).

I turn on the 'Collect errors' setting on all extensions. This accumulates errors emitted by the extension across all tabs and the entire browser uptime (as long as the error log isn't reset). MS is particularly noisy, for instance, the current run has collected 76 uncaught reference errors. I scrolled through these and recorded where:

 3x Uncaught TypeError: Cannot read properties of undefined (reading 'removeRule')
26x Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'removeRule')
    modern_scroll.js:707
       ms_shadow.styleSheets[0].removeRule(ms_shadow.styleSheets[0].cssRules.length-2);

22x Uncaught TypeError: Cannot read properties of undefined (reading 'onChanged')
    modern_scroll.js:170
       chrome.storage.onChanged.removeListener(update_prefs);

22x Uncaught (in promise) TypeError: Cannot read properties of null (reading 'style')
    modern_scroll.js:576
      document.getElementById("modern_scroll").style.display = null;
    modern_scroll.js:996
       ms_shadow.getElementById("ms_"+whichone+"bar_bg").style.transition = "opacity 0s 0s";

3x Uncaught TypeError: Cannot read properties of null (reading 'style')
    modern_scroll.js:437
       ms_shadow.getElementById("ms_hbar_ui").style.height = null;
    modern_scroll.js:1008
       ms_shadow.getElementById("ms_"+whichone+"bar_bg").style.transition = ms_shadow.getElementById("ms_"+whichone+"bar").style.transition = null;

Of these, obviously the various errors depending on getElementById() indicate that element didn't exist at that moment; these are likely due to actions being done right as a tab is being created or (more likely) destroyed. Though that's only a guess.

The ms_shadow.styleSheets[0].removeRule failures must indicate that ms_shadow itself exists and has an array .styleSheets[], or it would have errored on that symbol. So I guess the element exists but at the moment this code is hit, doesn't have any stylesheets attached?

And finally, the chrome.storage.onChanged.removeListener() failure seems particularly odd -- it seems that a chrome object exists, but doesn't have a .storage property. Yet we know that it normally does, or the entire extension would be dead in the water...

In any case, all of these are easily handled with optional chaining; which you are quite free to use now that you've set the minimum Chrome version to 100:

   modern_scroll.js:707
      ms_shadow.styleSheets[0]?.removeRule(ms_shadow.styleSheets[0].cssRules.length-2);
   modern_scroll.js:170
      chrome.storage?.onChanged.removeListener(update_prefs);
   modern_scroll.js:576
      document.getElementById("modern_scroll")?.style.display = null;
   modern_scroll.js:996
      ms_shadow.getElementById("ms_"+whichone+"bar_bg")?.style.transition = "opacity 0s 0s";
   modern_scroll.js:437
      ms_shadow.getElementById("ms_hbar_ui")?.style.height = null;
   modern_scroll.js:1008
      ms_shadow.getElementById("ms_"+whichone+"bar_bg")?.style.transition = ms_shadow.getElementById("ms_"+whichone+"bar").style.transition = null;

However, of course, these will not be the only instances, since each 'fix' lets execution now proceed to subsequent statements which would also have failed, e.g.:

  modern_scroll.js:438
      ms_shadow.getElementById("ms_hbar_bg_ui").style.height = null;

... was also probably about to fail. So perhaps (at least for the getEl calls) a utility function might be better:

const getElById = (doc, id) =>
   (doc?.getElementById && doc.getElementById(id)) || { style: {} };
   ...
   getElById(ms_shadow, "ms_hbar_bg_ui").style.height = null;

That is, return either successful getElementById() result, or an ephemeral stub object with a style property so that code like getElById(ms_shadow, 'something').style.transition = 'foo'; runs happily.

Or maybe a 'setStyle' util would be better:

const setElStyleById = (doc, id, style, value) =>
   (((doc?.getElementById && doc.getElementById(id)) || { style: {} }).style[style] = value);
   ...
   setElStyleById(ms_shadow, "ms_hbar_bg_ui", "height", null);

... In any case, however you want to solve it, please reduce error output to the point where it might indicate actual errors rather than merely unhappy timing glitches during extraordinary timing events like tab closure.

Modern scroll seems to offset elements on some pages

When I have modern scroll enabled, Vine videos as well as Airdroid seem to be pushed up. In fact, in the case of Airdroid, the entire page turns white and is unusable until I disable the extension. On Chrome version 30.0.1573.2 dev-m.

can it Identify the scrollbar of the word search panel of a translation plugin

Hello author! I would like to request an adaptation function from you.
I am using Saladict, a translation plugin. After selecting the text, you can call up the word search panel by clicking the icon that appears in the upper right corner of the text.
I really like using your plug-in, but when I use the mouse wheel, I find that I cannot scroll the content in the word search panel through the wheel.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.