Tab Scroll
-
Since the last update this doens't seems to work anymore
-
@Herrifunix Take a look at the console to find out what doesn’t work.
-
I'm very new to this and don't know where to search, console doens't show any errors, i have no adblocks and turned off all extensions. Script doens't seem to show anywhere in the console either.
-
Stopped working for me as well. I don't see anything in the console either, but am similarly unfamiliar with how to use it.
-
@Herrifunix @bleatingherd You’re both correct, it doesn’t work. I don’t know the reason, it should be. It most likely happened when Vivaldi switched from browser to window.html. Unfortunately I don’t use the tab bar anymore, and therefore no mods connected with tabs. Nowadays I tab scroll with a command chain and corresponding keyboard shortcut ☛ https://forum.vivaldi.net/post/509249
-
Oh well, forget what I said, it still works. You have to load your mods through window.html not browser.html, please remember that.
-
I had missed the memo about mods moving to window.html. I updated my batch script and have this working again. Thank you.
-
Not sure what happened, but seems to be broken agina I do use it so much on my everyday work.
-
@MetaVerseNavigator Works for me. You need to find out what is going wrong in your case. Either it’s the same as for the users above (browser/window.html), or something else. Check devtools console for UI for errors/hints.
-
my mistake @luetage I was not aware that upgrading Vivaldi would reset my custom scripts
Any way to get around this custom script reset issue? -
@MetaVerseNavigator You can use a script to patch Vivaldi. You store your JS mods in a folder and the script applies them to Vivaldi.
-
@oudstand Nice thank you.
True this is the price we pay for all the possibilities Vivaldi Give Us -
This post is deleted! -
Thank you for the mod. Actually, I would change
script
to this for smooth scrolling:const script = () => { let offset = window.scrollY; if (offset > 0) { window.sessionStorage.setItem('offset', offset); window.scrollTo({top: 0, behavior: 'smooth'}); } else { window.scrollTo({top: window.sessionStorage.getItem('offset') || 0, behavior: 'smooth'}); } };
-
@aminought Matter of taste. In this case it’s not set, on some pages it will be smooth, otherwise instant. But maybe it should be set to either one or the other specifically, to keep it consistent. I’ll probably make a change to include both.
-
Thank you!
Smooth version is a bit easier to understand that feature is working like intended. Because snap up and down confuses for the first time, but two options is a way better than one -
@luetage said in Tab Scroll:
@kichrot Well, theoretically yes. The issue is it’s never clear what you hit when you click the close button. It could be the path, the svg or the button itself and all these possibilities have to be covered. Personally I hit
W
to close a tab or use a mouse gesture. I’ll take a look at it eventually.So there is no event to catch when mousedown clicks on "X" to close tab? Or it's too complicated? Something like mousehover X tab button?
Because I have the same issue, when click on "X" on the current tab the page scrolling up or down and eventually tab closes. Distracting especially when using smooth version
-
@CfYz And you want me to program a version which respects the tab close button now.
-
@luetage said in Tab Scroll:
@CfYz And you want me to program a version which respects the tab close button now.
Would be nice, yes. But no problem at all if you can't for whatever reason
-
Ok, I updated the mod. I noticed all my tab mods stop working on 6.10, so I made the needed change to get them working again. Additionally the tab close button will be ignored now and scrolling can be set to
instant
orsmooth
. I tried both again and the default will beinstant
, becausesmooth
is incredibly slow and gets old fast. I believe speed is important.I don’t know when exactly the mod broke, but I assume 6.9 still works with the old code. So if you’re not on 6.10 or higher, you will need to change following line
tabId: Number(tab.parentNode.parentNode.id.replace(/\D/g, "")),
to
tabId: Number(tab.parentNode.id.replace(/\D/g, "")),
The reason is Vivaldi has introduced an additional parent element to the header element. Anyway, with these changes everyone should be happy now.