Vivaldi

  • Browser
  • Mail
  • News
  • Community
  • About

Navigation

    • Browser
    • Mail
    • News
    • Community
    • About
    • Register
    • Login
    • Search
    HomeBlogsForumHelpThemes
    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Let's talk about Vivaldi
    3. Tips & Tricks
    4. Command Chain Recipes

    Command Chain Recipes

    Tips & Tricks
    24
    122
    10984
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • luetage
      luetage @Farturex last edited by

      @Farturex It used to work, or I wouldn’t have posted it. The code hasn’t changed. I don’t know what goes wrong. Maybe you can play with it a little and find out more about it.

      github ◊ vfm

      1 Reply Last reply Reply Quote 1
      • luetage
        luetage last edited by luetage

        Add POST search

        1. Open Link in New Tab
          Parameter: vivaldi://settings/search/
        2. Previous Tab (Recent)
        3. Open Link in Current Tab
          Parameter: javascript:(function()%7Bvar%20x,i%3Bx%3Ddocument.forms%3Bfor(i%3D0%3Bi%3Cx.length%3B++i)x%5Bi%5D.method%3D%22get%22%3Balert(%22Changed%20%22%20+%20x.length%20+%20%22%20forms%20to%20use%20the%20GET%20method.%5Cn%5CnDON'T%20USE%20THE%20ALTERED%20PAGE%20NOW!%5Cn%5Cn%20-%20Right-click%20in%20the%20search%20field%5Cn%20-%20select%20%5C%22Add%20as%20search%20engine%5C%22%5Cn%20-%20Open%20%5C%22Settings%5C%22%20%3E%20%5C%22Search%5C%22%5Cn%20-%20Click%20the%20edit%20button%20for%20the%20new%20search%5Cn%20-%20Check%20%5C%22Use%20Post%5C%22%5Cn%5CnEnjoy!%22)%3B%7D)()%3B

        Gives you the option to add a search engine which uses POST method to Vivaldi. All credit goes to @QuHno, who wrote the bookmarklet. Please read his blog post about it ☛ https://quhno.vivaldi.net/2017/10/20/how-to-add-search-engines-that-use-post-to-vivaldi/. This command chain does nothing more than opening search settings for your convenience and then triggering the bookmarklet on the current page. Follow directions on screen.

        github ◊ vfm

        1 Reply Last reply Reply Quote 5
        • MasterLeo29
          MasterLeo29 - Ambassador - last edited by

          Follow PiP

          1. Open Link in Current Tab
            Parameter:
          javascript:(()=>{var visible=true;document.addEventListener("visibilitychange", (e) => {visible = !visible; if (!visible){[...document.querySelectorAll('video')].filter(v => !v.paused)[0].requestPictureInPicture();return;}document.pictureInPictureElement && document.exitPictureInPicture();});history.replaceState({},"",location.href)})();
          

          (it uses a trick posted in previously in this post to revert the url back to its state)

          Purpose : if you have a video running on the page you run this, when you switch tabs it triggers the picture-in-picture so you can keep looking at the video. If you return to the source tab, the pip disables.

          It has a small "drawback" : when switching tabs out, to work, one has to have interacted with the page first (one click 'anywhere' will do)

          luetage 1 Reply Last reply Reply Quote 5
          • luetage
            luetage @MasterLeo29 last edited by

            @MasterLeo29 It’s an interesting idea, but it doesn’t work for me for some reason. I copy/pasted the code and ran it on a page with video. Tried to switch tabs with both shortcut and clicking and pip didn’t trigger.

            github ◊ vfm

            MasterLeo29 1 Reply Last reply Reply Quote 0
            • MasterLeo29
              MasterLeo29 - Ambassador - @luetage last edited by

              @luetage Seems odd. Did you interact with the page after pasting the code ? (the "drawback" I mentioned).
              Also, was the video running ? Was on a particular website, or in any ? (I tested on Youtube and Twitch)

              luetage 1 Reply Last reply Reply Quote 0
              • luetage
                luetage @MasterLeo29 last edited by luetage

                @MasterLeo29 Tested on youtube. When it reacts to switching tabs it doesn’t switch tabs, fullscreens the video and shows pip as empty overlay. When closing pip manually tab switches afterwards. This is completely broken in my case. Might depend on platform. Maybe it would work better listening for tabs.onActivated, checking whether it’s the video tab and then either showing pip or showing original video depending on the outcome.

                github ◊ vfm

                MasterLeo29 1 Reply Last reply Reply Quote 0
                • MasterLeo29
                  MasterLeo29 - Ambassador - @luetage last edited by

                  @luetage That's ... very weird. Next time I work on some mod/improv, I'll try improving it. Sorry that it doesnt work for your setup

                  luetage 1 Reply Last reply Reply Quote 1
                  • luetage
                    luetage @MasterLeo29 last edited by

                    @MasterLeo29 Might take a look at it at some point. Automatic pip is a good idea.

                    github ◊ vfm

                    MasterLeo29 1 Reply Last reply Reply Quote 0
                    • MasterLeo29
                      MasterLeo29 - Ambassador - @luetage last edited by

                      @luetage Thanks. The idea actually came from a friend of mine. He as a few "unique" ideas that I try to implement every so often with mods.

                      luetage 1 Reply Last reply Reply Quote 0
                      • luetage
                        luetage @MasterLeo29 last edited by

                        @MasterLeo29 I got this to work on a newer version, don’t know what went wrong before. The required click is absolutely annoying and makes this useless. But this is not your fault of course and I doubt there is something we can do about it. The pip api is user gesture restricted and simulating a user event isn’t possible. I tried different versions as page action and also wrote some of my own, but in the end they all have the same problem.

                        One interesting api would be autopictureinpicture, which is a boolean attribute that can be set on a video. Theoretically it should go into pip when tab or app is changed and exit pip when the tab is activated again. This would make the visibility-change event listener obsolete. I didn’t get it to work though…

                        github ◊ vfm

                        MasterLeo29 1 Reply Last reply Reply Quote 0
                        • MasterLeo29
                          MasterLeo29 - Ambassador - @luetage last edited by

                          @luetage Well, Im glad it ended up working for you. As for the required click, I ended up "not noticing" it during my daily use because I usually switch tabs by right click + mouse wheel, which works just fine for this (the "right click" also acts as interacting with the page, so all ended well).

                          About that 'autopictureinpicture', after a quick search it seems like that currently is only implemented on safari browsers (mac/iOS), so its normal that you couldnt get it to work.

                          Maybe soon, when I pick up some other mod, I end up finding a solution for this.

                          luetage 1 Reply Last reply Reply Quote 1
                          • luetage
                            luetage @MasterLeo29 last edited by

                            @MasterLeo29 Yeah, when you change tabs like that, it doesn’t matter. A context click seems to be a user gesture. But if you don’t, the click matters, because you might as well have clicked the pip button and foregone the whole automation. Another problem is that focus seems to be on the pip window when it’s being triggered. It’s hard to get this to work in an effortless manner.

                            github ◊ vfm

                            MasterLeo29 1 Reply Last reply Reply Quote 0
                            • MasterLeo29
                              MasterLeo29 - Ambassador - @luetage last edited by

                              @luetage Well ... I did try, I guess. But yeah, to be "generally usable" it needs improvements

                              luetage 1 Reply Last reply Reply Quote 0
                              • luetage
                                luetage @MasterLeo29 last edited by

                                @MasterLeo29 Hopefully the autoPictureInPicture api will be available at some point. I expect it not to require a user gesture, which would solve this cleanly.

                                github ◊ vfm

                                1 Reply Last reply Reply Quote 1
                                • deneban
                                  deneban @Pesala last edited by

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • stardepp
                                    stardepp Vivaldi Translator @luetage last edited by

                                    I created this chain of command:

                                    https://forum.vivaldi.net/topic/80132/command-chain-toggle-read-view-hide-tabbar

                                    🍀Ambassador🍀Search Engine Collection🍀My Themes🍀Windows 11 22H2🍀Realme 8 Pro Android 12🍀

                                    1 Reply Last reply Reply Quote 3
                                    • D
                                      dude99 @luetage last edited by

                                      @luetage after v team "fixed" the tab selection bug, now the Select Next Tab command no longer loop at the end of the last tab. So it broke this CC & can't close the first tab in tabbar, it close the last tab instead when Close tab move left... faint

                                      ◊ More CSS Mod ◊

                                      luetage 1 Reply Last reply Reply Quote 0
                                      • luetage
                                        luetage @dude99 last edited by

                                        @dude99 This has always been the case, at least in the version of the chain I use. I close tab and move right for first, move left for last tab.

                                        github ◊ vfm

                                        1 Reply Last reply Reply Quote 0
                                        • stardepp
                                          stardepp Vivaldi Translator last edited by

                                          New chain of command "Deezer Quiz"

                                          Bild Text

                                          Bild Text

                                          Deezle is a music quiz from Deezer, I enjoy it a lot. Every day there is a different musician to find.

                                          Bild Text

                                          🍀Ambassador🍀Search Engine Collection🍀My Themes🍀Windows 11 22H2🍀Realme 8 Pro Android 12🍀

                                          1 Reply Last reply Reply Quote 0
                                          • neltherion
                                            neltherion @luetage last edited by

                                            @luetage Is there a "Open Selected Text in New Background Tab" command chain as well?

                                            luetage 1 Reply Last reply Reply Quote 0
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            • Reply as topic
                                            Log in to reply
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 6 / 7
                                            • First post
                                              Last post

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

                                            Copyright © Vivaldi Technologies™ — All rights reserved. Privacy Policy | Code of conduct | Terms of use | Vivaldi Status