Zoom, Find in Page & other actions in Web Panels
-
I've tried doing some experimenting. I can set the zoom mode of a panel's webview to "per-origin", which should allow the zoom level to be saved.
However whenever the panel navigates to a new page, or reloads, the mode gets set back to "per-view", which resets the zoom back to 100%.
-
Perhaps I'm weird, but I actually prefer having the panel actions in the header like in v1 instead of the footer, so that both the inbuilt as well as mod-added panel actions are in a single location. (Also, I hid web panel titles with CSS because some of my web panels have ugly looking titles, so I have enough space to have mod-added panel actions in the header.) Would it be easy to tweak the code to have the buttons in the header instead of the footer again, and if so, how should the code be tweaked?
-
@valiowk Try to change the line that says
panel.appendChild(footer);
to this:
panel.insertBefore(footer, panel.querySelector("section"))
-
@lonm This moves the footer a row below the toolbar instead of appending the buttons behind the existing toolbar buttons, but once I saw from your instructions exactly what small chunk of code needed to be tweaked I was able to tweak it back into v1 style with a bit of guesswork by comparing with your v1 code on Github. Thanks!
-
@LonM Hey, I appreciate this mod and what you're doing for the community, but when I use it with discord, the zoom level resets every time I enter a different channel. Is there a way to fix that?
-
@Jefatultimate I've made an issue and will investigate that when I get some free time
-
Can we search for text on the web panel with this?
-
@joao-rossa This is something I've looked in to. It could be doable by writing a custom panel action which
- has an
<input>
as itsdisplay
- does
webview.find(input.text)
as its script
If anyone wants to experiment building that, they would be free to do so, but I don't have that in the mod right now.
I made an issue: https://github.com/LonMcGregor/VivaldiMods/issues/17
- has an
-
@Jefatultimate Hi, I've done some investigating and unfortunately there seems to be (if I've understood correctly) a limitation in how vivaldi web panels work that prevent this from working properly.
If anyone else wants to chime in with a clean solution or explain if I've misunderstood, feel free to let me know. I've left some more technical details at the issue
-
@LonM Congratulations also for this, i hope you can find a solution for the zoom, it would be perfect.
-
Unsure why it happens (tried to remove other mods and still happens)
@LonM Mod works fine (post 2.4) but path is out of screen for invert/mute Svg also is 0 x 0 in size.
Buttons are working, so for some awkard reason only the svg icon is not working. -
@Hadden89 That's very strange. You could always remove the SVGs from the
display
keys as a workaround and replace it with an emoji likeπ
orπ
-
@LonM
//edit:
Thanks.
The emoticon was supposed to be in js display.. Now it works.
I was over-complicating the things.
Guess I'll change the x too for a better look.Kill button probably should be activated with double click to avoid misclicks. It's pretty fast to turn off them ^^,
-
@Hadden89 said in Zoom & other Page Actions in Web Panels:
Kill button probably should be activated with double click to avoid misclicks. It's pretty fast to turn off them ^^,
Good point. I'll make a note of that.
-
Hi, I don't know too much about HTML or JS 'cause I'm still learning (I'm a really beginner) and I would love to use Vivaldi web Panels on my 1024x600 display.
So, my question is... Is there a way to set my default zoom for web panels to a specific number? I just want to set the zoom to 70% for all my panels, instead 100%.
Thanks for this mod and sorry for my English, it's not my native language...
-
@NeTenebrae That might be tricky to do. Not impossible, but tricky. The main issues making it tricky are:
- You would need to either load all the web panels in advance, or zoom them once they load.
- Then, you would need an easy way to give the user control over the zoom.
- And lastly you would need to work around the issue where panels randomly change their zoom levels when you navigate to a different page within them.
-
Is it difficult to add a find text to the webpanels option?
-
@joao-rossa It could be done, but it would take time. That's something I seem to be lacking recently.
-
@LonM Sure, it still would be optimal that if this was something you could do with the normal page F2 search option.
-
@Hadden89 said in Zoom & other Page Actions in Web Panels:
@LonM
//edit:
Thanks.
The emoticon was supposed to be in js display.. Now it works.
I was over-complicating the things.
Guess I'll change the x too for a better look.Kill button probably should be activated with double click to avoid misclicks. It's pretty fast to turn off them ^^,
Hi can you tell how to get that look for the icons?Mines are white: