VivaldiHooks - more useful mods!

  • @Pathduck said:

    What does "defaultLoad" actually do?

    See start of this page (if you don’t have pagination on 20 posts, start at post 161).

    Each time Vivaldi starts, the main hooks file checks for files under hooks/ and makes notes about them to your storage (that is per-profile, this is why it’s fine in both guest (another profile) and private (same profile) window). Some of the files are already known (i.e. entries for them are present in the storage) so their state is how you set it before. Some are not known (i.e. you added the files since the last check) and these are either all activated or all deactivated, depending on defaultLoad.

  • @den_po Thank you very much!

  • Warning: a bug with speeddial-downloads.js with the latest snapshot 3.3.2001.3

    After updating I noticed speeddial-downloads.js cause the new tab speed dial to only show the splashscreen. Not a Vivaldi bug but I reported it on github aswell

  • @iAN-CooG said in VivaldiHooks - more useful mods!:


    Oh! I don't have that one, so i suppose that means that my version of Hooks is obsolete. I never remember to periodically check its homepage "just in case" a new version arrived.

  • @den_po Just a FYI I noticed that Quick Commands broke in Vivaldi 3.3 with qc-close-tabs activated. Fortunately installing the latest commit seems to have fixed it.

    Tried to go through the commits to see what might have been fixed, but qc-close-tabs was last updated 3 months ago, so the fix must've been in the v3.3.2001.3 commit? Lucky fix?

    Anyway, all working now 😉

  • New jdhooks.js solved the issue, good work

  • Finally made my first Hook!

    Still have a ways to go in my understanding of how it works, but even a small step forward is something.

    @nomadic said in (Help) Button to hide vertical tabbar?:

    Hadden89 luetage There is the option of using VivaldiHooks to trigger inbuilt Vivaldi commands.

    I am far from an expert at writing a hook mod, but looking at panel-right-toggle-button.js and bookmarks-button.js as examples and setting a breakpoint to see the function that was called on toggling the tab bar, I made this:

    //Toggle tab button before AddressBar
      function toggleTabsOnClick() {
        const WindowActions = vivaldi.jdhooks.require("WindowActions");
      vivaldi.jdhooks.hookClass("toolbars_Toolbar", (origClass) => {
        const React = vivaldi.jdhooks.require("React");
        const SettingsPaths = vivaldi.jdhooks.require("_PrefKeys");
        const ToolbarButton = vivaldi.jdhooks.require("toolbars_ToolbarButton");
        return class extends origClass {
          render() {
            let ret = super.render();
            if ( == SettingsPaths.kToolbarsNavigation) {
                React.createElement(ToolbarButton, {
                  tooltip: "Toggle Tab Bar",
                  onClick: toggleTabsOnClick,
                  image: vivaldi.jdhooks.require("_svg_tabs_large"),
            return ret;

    There is probably a better way to do it, but if you want a button that toggles the tab bar, this works.


  • VivaldiHooks seems to break new profiles including using a clean --user-data-dir. Just leads to a an empty URL.

  • Since 3.4.2066.70, qc-close-tab.js appears to be breaking Quick Commands entirely. Any time I have it enabled, Quick Commands stops working and just presents this error:
    Quick Commands Crash.PNG
    This is still the case as of the most recent snapshot. I originally reported this as a Vivaldi issue [VB-73195], but have now determined it to not be a Vivaldi bug and have isolated the cause to this one mod. Disabling qc-close-tab.js and restarting the browser makes Quick Commands work again.

  • @Crimsonshade Thank you SO MUCH for this! Eureka. I have had no idea why for several weeks or more, my mouse-gesture to open Quick Commands resulted in no QC popup & instead a weird error bar along the bottom of the page. Now that i disabled this one & relaunched, it's good again. Hugs to you!

  • @Steffie Have you guys updated VivaldiHooks from the git lately?

  • @Crimsonshade You should never report bugs before testing with clean profile without any modifications running. Posting a topic about a bug you found and then waiting for someone to confirm it before reporting it, is also a very good idea. The way you did it will just cost someone else time, which hurts every user in the long run, because that time could be spent more productively.

    I mean it’s not like this is a tragedy 🎭, but just post about it on the forum first next time.

    On a somewhat related note: I think they changed the Vivaldi internal command from “Report a bug” to “Report a bug on the forum”. They might have their reasons…

  • @Pathduck said in VivaldiHooks - more useful mods!:


    Not a guy, but here's my response anyway 😜

    I've not actually updated my VH for months, but every so often i go to the page to see if there's something new. Apart from just now for this post, i last did it a few weeks back, when then as now it is still only this:


    Given i do not use that one anyway, i have continued with my VH version installed several months back.

  • OK then. You Sheilas. Better? 😉
    Or maybe "y'all"? Too country 🐐 ? "You folks"? 🤠

    Anyway, just saying it might be an idea to do a git pull and reapply the hooks by running installhooks just to be sure.

    QC still works for me on Win10 even with the QC hook enabled. Although the actual function of the hook, being able to close tabs from the QC no longer seems to work as it should... I'll report that to @den_po on Github.

  • @luetage Tbh I only reported the bug because the dialogue suggested I should; and I was pretty frazzled after a long day at work that day. It was only a few days later, when I was a bit less stressed and encountered the bug again, that I took time to investigate the cause.

    EDIT: I should perhaps also add that I rarely if ever use the Quick Commands feature anyway, so I had no point of reference to begin with.

  • @Pathduck said in VivaldiHooks - more useful mods!:

    You Sheilas. Better?

    It is much better, & i encourage you + everyone else to now adopt this instead of That Other One.

    I can't foresee much blowback...

    @Pathduck said in VivaldiHooks - more useful mods!:

    might be an idea to do a git pull and reapply the hooks by running installhooks just to be sure

    Clearly you get git much more than i do, so i ask this not as a Doubting Tomasina, but more as someone simply clueless -- if the dates published per my pic say that there's been no updates for x months, can i not just rely on that? Is it possible something new has been pushed there but the dates never updated to match? Definitely for a long time now, i have been simply trusting those dates when deciding to update or not.

  • @Steffie said in VivaldiHooks - more useful mods!:

    if the dates published per my pic say that there's been no updates for x months, can i not just rely on that?

    Sure you should... but do you remember exactly when you last ran a git pull? Less than a month, for sure?

    I tested in a clean profile with just the QC-close-tab hook enabled. QC still didn't break. I also tried enabling all the hooks and still no crashing. But didn't spend ages trying to find a clean reproduction of what you're seeing, that's really up to you sheilas...

  • @Steffie Oh damnit, i've just updated to the new Snapshot, but upon relaunch once again there's only the empty dove-grey window. I wonder which specific VH is the culprit i need to track down this time?

    Grumble, whine, moan...

  • I've just updated both my Vivaldi Snapshot and VivaldiHooks. The Quick Commands crash has been fixed, but now if I enable "loading.js", the whole Vivaldi UI crashes - after starting Vivaldi, it does not progress beyond the initial grey Vivaldi logo.

  • @Crimsonshade Muchas gracias again -- you saved me lots of time! Posting this now from the new Snapshot, phew. So now that's two of my fav hooks disabled coz of breaking Snapshot launches, rats.

Log in to reply

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.