Tab Scroll
-
This mod ceases to function on Vivaldi version 3.7 (current snapshot). As found out by @LonM
chrome.tabs.executeScript
isn’t available anymore from the UI. Moreover Vivaldi switched from triggering the active tab on click, to triggering it on mousedown, which hurts this mod too. I don’t see what to do about either of these issues at this point in time.Workaround: Switch to Opera browser immediately.
GMO I’m joking you guys, relax. Vimium provides the functionality to set local marks on webpages, which allows to jump to top and back too. Moreover we can set more than one mark, so it’s actually more advanced, just keyboard driven.
-
@luetage Thanks to @tam710562 this mod works again, see here ☛ https://forum.vivaldi.net/topic/57191/restore-methods-for-chrome-tabs. You will have to insert the code in your modfile, then executing scripts will work as intended on webpages. Additionally I rewrote the mod to work with 2 level tab stacks and apparently we lucked out: The mousedown change implemented by Vivaldi in the latest version doesn’t influence this mod. It seems like the mousedown listener in this script is faster than the switching of tabs in Vivaldi. To make a short story longer: all functionality is restored and the mod should work as expected.
-
A minor observation about Opera forums ☛ https://forums.opera.com/topic/25279/click-the-tab-to-scroll-keyboard-shortcut. User has the right idea: provide tab scroll as keyboard shortcut, because clicking is slow. Moderator doesn’t understand Opera’s new feature, makes a suggestion which isn’t helpful and the topic is closed. User is being downvoted on top of it. Oh boy am I glad we are on an active forum with users, who are actually being helpful (most of the time).
-
@luetage said in Tab Scroll:
Moderator
But look who. It can mean
- I don't know enough of this person
- it is normal there
- it is forced-normal there
-
@guigirl Yeah, when they’re not helpful they’re either memeing or telling other people that they use Arch.
@potmeklecbohdan oh lol… @sgunhouse, you can still fix this!!
-
I could unlock it, sure - the other moderator, Leo, is prone to lock threads as soon as they are answered. But I did understand the question. The feature in Opera under discussion is that when you click on the active tab the page scrolls to the top. Which is what the Home key does if focus is not in a text field.
-
@sgunhouse Hey, that’s not what this feature does. Of course you are correct that clicking the tab scrolls the page to top, just like the home button. But the deciding factor is that clicking the active tab again moves back to the scroll position you previously had! That can’t be done with home and end buttons and is the sole reason this feature is so special and why we recreated/modded it for Vivaldi.
-
Well, if Opera actually had a way of recalling the previous scroll position ... but it doesn't for keyboard interaction.
-
-
@sgunhouse That’s why it was a feature request I suppose, it’s not like this is impossible to implement. Anyway, all of this is kinda unrelated to Vivaldi. I just stumbled upon the topic while trying to find out whether Opera had changed anything about the feature, without having to install the browser.
-
@luetage said in Tab Scroll:
@sgunhouse That’s why it was a feature request I suppose, it’s not like this is impossible to implement. Anyway, all of this is kinda unrelated to Vivaldi. I just stumbled upon the topic while trying to find out whether Opera had changed anything about the feature, without having to install the browser.
It works in Opera exactly like your nice script.
-
@Dancer18 It’s equally @tam710562's mod now, but thanks for testing.
-
You know, years ago I recall a program where the Undo shortcut would actually undo in-document navigation like Home and End. It was one of those programs where the text of the menu item changed to reflect what would be undone (as in, Undo Delete, Undo Typing) and in this case said Undo Navigation. Might actually have been an old version of Word.
-
@luetage I install the Mod and after that Vivaldi reload with a blank page. (Restore Methods for chrome.tabs is my first Mod in custom.js)
What could be the problem?
-
Try without any other mods. Except for the chrome.tabs method of course.
-
Now that we can update our tagged posts again I copied over the new version, which doesn’t rely on the workaround and installation of additional code anymore.
-
@luetage said in Tab Scroll:
2022.4.0 Update functions
@luetage thank you very much for the wonderful script.
But, there is a slight flaw in its implementation. When you close the tab, through the tab close button, the script works, which slows down the tab.
I ask you to make a change to this script that will exclude this phenomenon. -
@kichrot How do you close the tab? If you close the tab by double‐click, I’m afraid it’s impossible. Think about it.
-
@luetage said in Tab Scroll:
@kichrot How do you close the tab? If you close the tab by double‐click, I’m afraid it’s impossible. Think about it.
@luetage, I do not use the "close the tab by double − click" function. I use the classic method to close the tab, through the "Close tab" button on the tab header.
But, you pushed me to think. I replaced the line in your script :arguments[0].addEventListener("mousedown", ts);
on the line :
arguments[0].addEventListener("dblclick", ts);
After this replacement, the script began to work on the double – click of the mouse. The inconvenience indicated by me when closing the tab, through the closing button, was lost.
But, if possible, try adding an exception to your script to click on the "Close tab" button.
-
@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.