VivaldiHooks - more useful mods!
-
@potmeklecbohdan I really don't understand what you mean by that mate
Are you saying this is expected and that the Hooks do still apply in the Guest Profile, even the ones I've disabled?
The only hooks I've enabled is:
disable-VB-25302.js
qc-close-tab.js
speeddial-shortcuts.js
speeddial-spacing.js
zoom-control-wheel.js -
@Pathduck No, I’m saying that guest win can be detected w/ that & so just one more condition in the main hooks file should be enough (if they are expected to be disabled) (please note that I still don’t understand the file & so this statement may not be correct).
-
@potmeklecbohdan OK fair enough, maybe we'll need to hear from @den_po about this one.
Are you able to reproduce the same issue opening a Guest Profile in the latest Snapshot?
I could try to (manually) install the hooks in the last Stable to see if it's snap-related.
-
@Pathduck It’s just that the “startup mode” is on by default (why didn’t I get this idea 2 posts earlier?). (I always spend 32 clicks just disabling all of them )
Sorry, I have now all mods & hooks disabled coz I want to finally write a script for them, but assume that I can reproduce this.
If you want to change the behavior right now, see line 169.
-
Well, I just tested installing the hooks in the Stable standalone, and the same thing. So I guess this is not something new, I guess I've just not used Guest View a lot recently so I've not noticed it
I think the behaviour should be to not apply the hooks to a guest profile, as it is expected to be as default as possible, meant for just that, a "Guest" user borrowing the browser for a bit.
It should still apply to a Private Window though, as that's just a private version of the standard profile.
@potmeklecbohdan
If you want to change the behavior right now, see line 169.
I'm afraid my JS skills are not up to par here. Do you mean just remove the "
defaultLoad: true,
" part?EDIT, sorry I'm an idiot - you obviously just meant set it to "false". D'oh!
Yeah that works -
Could someone help confirm whether
autocomplete-domain.js
has the following problem: Suppose one has a bookmark whose title has at least two words, e.g. "Test words". If one types "Test" in the address bar, then "Test%20words" is suggested in the address bar (instead of "Test words"), and typing a space after "Test" causes the address bar to show "Test%20words" instead of "Test "? Thanks! -
@Pathduck said:
I'm afraid my JS skills are not up to par here. Do you mean just remove the "
defaultLoad: true,
" part?EDIT, sorry I'm an idiot - you obviously just meant set it to "false". D'oh!
Yeah that worksSorry, I somehow expect everyone to be at least a bit programming-literate. Yes, all needed was to change it to
false
Edit: as I’m thinking of it, this was more about knowing how it’s used… I knew it was suspicious that you wouldn’t understand it at all!
-
@valiowk Yeah, exactly. I wanted to test it on
Vivaldi Forum
, typedVivaldi
& gotVivaldi%20UI%20Customisations%20%7C%20Vivaldi%20Forum
(cursor at the end, no selection) -
@potmeklecbohdan said in VivaldiHooks - more useful mods!:
expect everyone to be at least a bit programming-literate
Gulp!
Sweat...
-
@potmeklecbohdan said in VivaldiHooks - more useful mods!:
I somehow expect everyone to be at least a bit programming-literate
Even at an engineering school, programming talk makes people's eyes glaze over.
Being one of the few people with coding experience in an embedded control class is
notfun. -
@Pathduck said in VivaldiHooks - more useful mods!:
@den_po I've noticed that VivaldiHooks causes issues with the Guest Profile
That is an interesting one. Even the simplest solution doesn't look easy to implement at the first glance. Gotta think about it.
@valiowk said in VivaldiHooks - more useful mods!:
Could someone help confirm whether
autocomplete-domain.js
has the following problem:I've pushed a workaround. Please check it.
-
@den_po Thanks for the reply.
I've temporarily fixed it by setting
defaultLoad: false
in in jdhooks.js (as discussed above) but will have to re-apply it for every update obviously. What does "defaultLoad" actually do?Everything else seems to still work as expected, and hooks appear to not load in Guest. They still load in a Private window as expected.
-
@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 ondefaultLoad
. -
@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
https://github.com/justdanpo/VivaldiHooks/issues/41 -
@iAN-CooG said in VivaldiHooks - more useful mods!:
speeddial-downloads.js
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
andbookmarks-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"); WindowActions.toggleTabs(window.vivaldiWindowId); } 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 (this.props.name == SettingsPaths.kToolbarsNavigation) { ret.props.children.push( 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.