Scrollable Speed-Dials
-
@smerugu28 Try this:
// Scrollable Startpage Navigation // version 2022.03.1 // https://forum.vivaldi.net/post/561919 // Navigate startpage categories with mousewheel. (function () { let scroll = (e) => { const btns = Array.from( document.querySelectorAll(".startpage-navigation-group button") ); const index = btns.findIndex((x) => x.classList.contains("active")); const dir = e.wheelDelta > 0 ? "up" : "down"; if (dir === "up") { if (index > 0) { btns[index - 1].click(); } else { btns[btns.length - 1].click(); } } else { if (index < btns.length - 1) { btns[index + 1].click(); } else { btns[0].click(); } } }; chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) { try { if (changeInfo.url.startsWith("chrome://vivaldi-webui/startpage")) { const check = document.querySelector(".vm-scroll"); if (!check) { const nav = document.querySelector(".startpage-navigation"); nav.classList.add("vm-scroll"); nav.addEventListener("wheel", (event) => { let timeout; if (timeout) window.cancelAnimationFrame(timeout); timeout = window.requestAnimationFrame(() => scroll(event)); }, {passive: true}); } } } catch (error) { void 0; } }); })();
provided as is
-
@luetage Added it as css in Modification folder but its not working. Am I missing something?
-
@smerugu28 Yes, you are. It’s a Javascript modification. Read pinned topics on this forum board how to install/update modifications after each application upgrade.
-
@luetage Read that and I have couple of other css file in the folder which are working. Also I restart the browser after each update in CSS folder.
But one you shared is not working.
-
@luetage said in Scrollable Speed-Dials:
@smerugu28 Yes, you are. It’s a Javascript modification. Read pinned topics on this forum board how to install/update modifications after each application upgrade.
Unable to make it work. Need little direction to see if I am missing anything.
-
@luetage Ok, now I got it. It works only when I move the move pointer to the speed dial folder on the start page.
Can't it be independent of mouse cursor? I mean wherever I scroll on the start page, it should scroll the folders.
-
@smerugu28 It changes over any point in the navigation bar. And no, scrolling it from wherever would be stupid, since the scrollwheel is used to scroll the page content. Whenever you would want to scroll to something out of sight, you would change the navigation view. This is what I’d consider broken UI. It’s also the first thing I mentioned when I replied here:
@luetage said in Scrollable Speed-Dials:
Scroll already scrolls page on speed dials. This would only make sense when you hover the speed dial categories at top.
-
@luetage said in Scrollable Speed-Dials:
@smerugu28 It changes over any point in the navigation bar. And no, scrolling it from wherever would be stupid.
If I have to move the cursor to the speed dial then its as good as clicking it. I don't see much use of it if mouse cursor needs to be moved to the speed dial.
I don't think anything would break on the start page because, it works only on the start page and I do not have any scroll bars on start page.
You should check this extension, it does same. Scrollable speed dial folders on start page. But I do not want to use it as Vivaldi is not compatible with Tab extensions and it breaks the internal Vivaldi links like vivaldi://bookmarks/
-
@smerugu28 Hey, that’s also what I told you. Your request made no sense to begin with. If you want something efficient, single key shortcuts, quick commands and bookmark nicknames, then you can launch pages without even looking at the UI.
Anyway, take it or leave it. I’m done here.
-
@luetage No problem. Thank you for your valuable time. I really appreciate it. Have a nice day.
-
@luetage said in Scrollable Speed-Dials:
@smerugu28 Try this:
// Scrollable Startpage Navigation // version 2022.03.0 // https://forum.vivaldi.net/topic/72601/scrollable-speed-dials/14 // Navigate startpage categories with mousewheel. (function () { let scroll = (event) => { const btns = Array.from( document.querySelectorAll(".startpage-navigation-group button") ); let index = btns.findIndex((x) => x.classList.contains("active")); delta = event.wheelDelta / 60; direction = delta > 0 ? "up" : "down"; if (direction === "up") { if (index > 0) { btns[index - 1].click(); } else { btns[btns.length - 1].click(); } } else { if (index < btns.length - 1) { btns[index + 1].click(); } else { btns[0].click(); } } }; chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) { if (changeInfo.url.startsWith("chrome://vivaldi-webui/startpage")) { const check = document.querySelector(".vm-scroll"); if (!check) { const nav = document.querySelector(".startpage-navigation"); nav.classList.add("vm-scroll"); nav.addEventListener("mousewheel", scroll); } } }); })();
provided as is
It broke after upgrade. Just upgraded to stable version.
-
@smerugu28 Javascript modifications are being saved to the application directly. On every update everything gets replaced, which means our mods disappear. That’s why most modders run batchscripts to load the mod after each upgrade. Doing it manually becomes boring quickly, especially when using snapshot. See https://forum.vivaldi.net/topic/10592/patching-vivaldi-with-batch-scripts
-
@luetage That means bat file will copy all js files content to custom.js (single file) and place it in the same folder as that of browser.html and also updates it.
Thank you very much
-
@smerugu28 If u r using Windows, then you can simplify the task with Vivaldi Mod manager. Search for it in the forum.