VivaldiHooks - more useful mods!
-
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. -
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:
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…