Tab Scroll
-
@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. -
@luetage I discovered this modification today and I like it very much, very useful.
Thank you very much for your work.
-
Heya! This mod had been working wonderfully for me, but then it suddenly stopped functioning properly. Now nothing happens when I click on the tab, even tough I haven't changed the custom.js in any way whatsoever. Any ideas on what could've happened?
-
@Joaoz1n Welcome to the forum!
TheEdit: The update was already made. Somehow got the old version by mistake.executeScript
function that this mod makes use of has changed. It is now in thescripting
API and requires a tab ID to be provided instead of defaulting to the active tab. There will need to be an update to the mod.There is still the command chain version if you want to trigger the scrolling with a keyboard shortcut, button, or quick commands: https://forum.vivaldi.net/post/509249
Also, since you are a new forum user, are you aware that JavaScript mods need to be re-added after every browser update?
-
@Joaoz1n I just loaded the mod, it still works. Maybe you need to update it, check out the original post of this topic.
-
@luetage I'm not tech savvy at all, so it's hard for me to understand what's going wrong. I'm pretty sure I'm using Vivaldi's latest build, this being 5.6.2867.58. As for the custom.js, I just copied the whole thing from your post and pasted it on TamperMonkey so I could download it. When the script stopped working, I tried to do that all over again. There's a warning on TamperMonkey stating that "chrome" is undefined, though I don't have the slightest idea of what that could mean.
-
@Joaoz1n You can’t install this script with Tampermonkey. While the tab scroll itself works on a webpage, all the rest of the code targets Vivaldi’s user interface, which is not reachable by extensions. Please read ☛ https://forum.vivaldi.net/post/10549 carefully and follow the steps.
In any case, as @nomadic mentioned a little while ago; should modding the application itself be too complicated you could always create a command chain, which is supported native by Vivaldi, no need to mess with the application files/batch scripts. In the newest versions of Vivaldi there is even the possibility to enable the custom buttons experiment from ☛
vivaldi://experiments/
. With this you could place a button anywhere in the UI to trigger tab scroll on the current page. The only thing this modification does is allowing you to trigger it by clicking on the tab, nothing more is being gained from it. -
I did follow the modding tutorial. I didn't really use TamperMonkey to run the script, but to download it as a .js file. I couldn't for the life of me find a better way to do it, I'd never toyed with javascript before. It did work for some 6 days, until it suddenly stopped about 2 days ago. No idea what could've been the catalyst.
-
@Joaoz1n You copy the code in the original post. You create a file with a text editor and paste the code in there. Then you save the file and name it (e.g.
custom.js
). And then you need to move it inside of the application. When you load it within Tampermonkey and then download it, there is a chance that Tampermonkey writes a bunch of garbage code needed for userscripts into the file and then it will never work. Don’t do it like that. I mean we can take a look at your downloaded file, could you paste the contents here? Then we’ll know whether it could potentially work. -
@luetage Haha, so you're telling me I could've just used notepad all along? Well, the more you learn. So, I did just that, but still it doesn't seem to work. The custom.js file is, I presume, exactly the same as yours, now that I created it through a text editor. The body element on the browser.html looks like this:
<<script src="custom.js"></script>/body> -
@Joaoz1n Yes, but where is the file? I can assure you the code works.