Find Button.

  • Is it possible to place a find in page button on the address bar with custom css code?

  • @CantankRus No, because no element with such a function exists, therefore you would have to code it first with js.

  • No need for a button. Just hit Ctrl+F to open a search box for the current page contents

  • @LinuxRev
    I know the keyboard shortcuts. You can also just hit F3.
    I was asking this because I am predominantly a mouse man(some say I'm just a rat). 😲

  • Are you willing to run a custom.js file? If so I will attempt to create such a button.

  • @LinuxRev said in Find Button.:

    No need for a button. Just hit Ctrl+F to open a search box for the current page contents

    Is it possible actually?

  • I already tried to do this when I said I would attempt it. The problem is I don't know how to invoke the find in page element. I tried to find it in bundle.js, but it's all written in react or something, and I really don't know how this works. Moreover Vivaldi doesn't really want anyone to use their code, they use variables like a, b and c to give everyone a hard time trying to figure out what is happening.

    My first idea was to just bind the keyboard shortcut to the button, but apparently chromium thinks it's unsafe for javascript to simulate keypresses. There are some hacks around, but none worked. I did get the right keycode to show up in devtools when pressing the button, but nothing happened. Maybe someone can give me information on what function to call, and how to call it in regular javascript, otherwise I'm afraid this won't happen.

  • Moderator

    @luetage I had a look. I had an idea that you could add a bit of code directly to bundle.js that way it evaluates when the browser starts, that way you'll have all of the correct references without needing to simulate a keystroke. Alternatively, you could add your own event listener in there to intercept a keystroke to "activate" the mod when it's needed to avoid interference.

    Taking the browser inspector and formatting it using dev tools, I have the following notes which may or may not be helpful:

    at bundle.js:formatted:9203 this event fires a thing which makes the toolbar visible
    Somehow fire
                type: "WEBPAGEVIEW_ACTIONS",
                action: "findInPage",
                page:, <- theres a getActivePage function hidden away in here somewhere
                modifiers: t.modifiers <- not sure if this is actually needed
    c in this case is defined (i think) starting line 9153

    I doubt this is in any way helpful, but it's as far as I got before I got annoyed with the minified code.

  • @LonM I'm amazed you read the minified code, it gives me headaches the moment I look at it. I used this beautifier
    and just pasted the sane looking code into a text editor to search it.

  • Moderator

    @luetage I use the built-in de-minifier in the dev tools. It's kind of annoying because it takes ages on my computer to read in, process and de-minify it. But even then because they've put it through some sort of compiler / optimiser, it loses all readability anyway, no matter how you try to beautify it.

    I understand why they did that, but it's still a bit annoying.


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