• Browser
  • Mail
  • News
  • Community
  • About
Register Login
HomeBlogsForumThemesContributeSocial

Vivaldi

  • Browser
  • Mail
  • News
  • Community
  • About

Navigation

    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    We will be doing maintenance work on Vivaldi Translate on the 11th of May starting at 03:00 (UTC) (see the time in your time zone).
    Some downtime and service disruptions may be experienced.
    Thanks in advance for your patience.

    1. Home
    2. Let's talk about Vivaldi
    3. Tips & Tricks
    4. Command Chain Recipes

    Command Chain Recipes

    Tips & Tricks
    45
    235
    56.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • pafflick
      P
      pafflick Vivaldi Team @luetage
      last edited by

      @luetage said in Command Chain Recipes:

      No, opening »search selection with engine« in a background tab isn’t possible.

      Actually, it is possible with "Search Selection with Engine...", but it has to be enabled in Settings > Search:

      Page Selection Search in Background

      Haven't tested it with this particular command chain that you've created, but it respected the setting when I tested it in another chain. 😅

      luetage
      L
      1 Reply Last reply
      Reply Quote 1
      • luetage
        L
        luetage Supporters Soprano @pafflick
        last edited by

        @pafflick That’s a good find. But I have 3 other chains which search with selection and they are supposed to open in a new tab (active). So that’s no general solution.

        github ◊ vfm

        pafflick
        P
        1 Reply Last reply
        Reply Quote 0
        • pafflick
          P
          pafflick Vivaldi Team @luetage
          last edited by

          @luetage Yes, that's a global setting - affecting all searches of selected text, but I thought I should mention that there's at least this option. 🙂

          luetage
          L
          1 Reply Last reply
          Reply Quote 0
          • luetage
            L
            luetage Supporters Soprano @pafflick
            last edited by

            @pafflick I thought about this just today, in my opinion the best solution would be to provide additional parameters to all commands that include a new tab.

            Currently we have e.g. open link and open link in background tab.
            But we could have: open link / link parameter / background parameter
            which would mean less commands overall.

            github ◊ vfm

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

              @luetage This is great! Sadly "Select Previous Tab" doesn't work as you would think in a Tab Stack, instead it selects the entire Tab Stack and not an individual tab. Hence my workaround without selecting anything:

              Close and Right

              1. Next Tab (by Order)
              2. Delay 5
              3. Previous Tab (Recent)
              4. Delay 5
              5. Close Tab
              6. Next Tab (Recent)

              Close and Left

              1. Previous Tab (by Order)
              2. Delay 5
              3. Next Tab (by Order)
              4. Delay 5
              5. Close Tab

              It's important in step 3 of "Close and Right" to use "Previous Tab (Recent)" and not "(by Order)"

              Also the "Close and Left" is shorter as it doesn't require to switch back to the necessary tab.

              luetage
              L
              1 Reply Last reply
              Reply Quote 2
              • luetage
                L
                luetage Supporters Soprano @ArthurAkhadov
                last edited by

                @arthurakhadov I don’t think there is a perfect version. This one introduces a flicker because of the tab switching, but of course when using tab stacks it is the way to go. And all versions fail when changing the »close tab activation« order. It seems to me like everyone needs to code their own version depending on tab activation and selection settings; and whether or not one uses tab stacks.

                github ◊ vfm

                1 Reply Last reply Reply Quote 1
                • luetage
                  L
                  luetage Supporters Soprano
                  last edited by luetage

                  I recently added 2 more recipes to my own collection, which replace already existing commands and add a little extra.

                  Tile

                  1. Tile Vertically
                  2. Delay
                    Parameter: 50
                  3. Deselect Tabs
                  {"category":"CATEGORY_COMMAND_CHAIN","chain":[{"key":"854f8a44-50bd-41bc-8277-acd51e719d1b","label":"Tile Vertically","name":"COMMAND_TAB_STACK_TILE_VERTICAL"},{"defaultValue":1000,"key":"2eb81004-6703-46db-9933-6afcfde924e4","label":"Delay","name":"COMMAND_CHAINED_SLEEP","param":50},{"key":"cf44c36e-ab42-4700-a80e-93f5f504c72b","label":"Deselect Tabs","name":"COMMAND_PAGE_SELECTION_CLEAR"}],"key":"cl19xkas700c72z5w9rjg9lra","label":"Tile","name":"COMMAND_cl19xkas700c72z5w9rjg9lra"}
                  

                  Standard vertical tiling, but gets rid of tab selection immediately.

                  Page Source

                  1. View Page Source
                  2. Delay
                    Parameter: 3000
                  3. Open Link in Current Tab
                    Parameter: javascript:(()=>{document.querySelector("input").click();history.replaceState({},"",location.href)})();

                  Opens the page source and enables line wrapping automatically.

                  github ◊ vfm

                  1 Reply Last reply Reply Quote 2
                  • ukanuk
                    U
                    ukanuk Ambassador
                    last edited by ukanuk

                    This particular example may not be useful to anyone else, but the method is useful for anyone trying to automatically fill out a form! It also leaves the last field entry selected, which lets the user just click "Enter" to submit the form.

                    Autofill Form Input Fields and Select (Example: $10.00 Amazon Gift Card)

                    1. Open Link in New Tab https://www.amazon.com/gp/product/B086KKT3RX
                    2. Delay 6000
                    3. Open Link in Current Tab javascript:(function() {document.getElementById('gcui-asv-reload-form-custom-amount').value = '10.00';})();
                    4. Delay 100
                    5. Open Link in Current Tab javascript:(function() {document.getElementById('gcui-asv-reload-form-custom-amount').select();})();

                    This Javascript won't automatically submit the form for this example, but idk it may work on other sites. This is the first Javascript I've ever tried, so there could certainly be something I don't understand that's stopping it!
                    6. Open Link in Current Tab
                    javascript:(function() {document.getElementsByName("submit.gc-buy-now")[0].click()})()

                    luetage
                    L
                    1 Reply Last reply
                    Reply Quote 3
                    • luetage
                      L
                      luetage Supporters Soprano @ukanuk
                      last edited by

                      @ukanuk You could probably get rid of the extra steps and bring all the Javascript together. If you need a delay between steps, you can do it with the setTimout method.

                      github ◊ vfm

                      K
                      1 Reply Last reply
                      Reply Quote 1
                      • K
                        kichrot @luetage
                        last edited by kichrot

                        A chain of commands to search for the selected text on the current site in GOOGLE :

                        Chain Name :
                        🔎 Search for the highlighted on the site in GOOGLE

                        Command 1:
                        Open the link in the current tab

                        Team Parameter:

                        javascript:window.open(%22http://www.google.com/search?num=100&q=site:%22%20+%20escape(location.hostname)%20+%22%20%22+encodeURIComponent(document.getSelection()));history.pushState(null, null, null);
                        

                        This chain is convenient to use as a context menu item for the selected text on the page.

                        1 Reply Last reply Reply Quote 3
                        • F
                          Farturex @luetage
                          last edited by

                          @luetage Hi, does this still works? Whenever I try it the first page to open is always a Vivaldi help menu...

                          luetage
                          L
                          1 Reply Last reply
                          Reply Quote 0
                          • luetage
                            L
                            luetage Supporters Soprano @Farturex
                            last edited by

                            @Farturex Which command chain are you testing?

                            github ◊ vfm

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

                              @luetage Follower Tab

                              1 Reply Last reply Reply Quote 0
                              • luetage
                                L
                                luetage Supporters Soprano
                                last edited by

                                @Farturex Yes, or the page just reloads or does some other weird stuff. I can’t tell you why right now. Something has changed. Will have to investigate. Do other chains which use javascript code work for you?

                                github ◊ vfm

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

                                  @luetage So yes it still works? Or yes it opens the help page? Ahaha sorry didn't get which one of those is. It's the only JavaScript chain that I have. Do you need me to test some other one?

                                  luetage
                                  L
                                  1 Reply Last reply
                                  Reply Quote 0
                                  • luetage
                                    L
                                    luetage Supporters Soprano @Farturex
                                    last edited by

                                    @Farturex Wait, I think the chain clicks the first link automatically to create the follower tab and tile it. All the other links should open in this tab then. But something goes wrong along the way. I don’t use this chain 😕

                                    github ◊ vfm

                                    F
                                    1 Reply Last reply
                                    Reply Quote 1
                                    • F
                                      Farturex @luetage
                                      last edited by Farturex

                                      @luetage Yeah it's not opening the first link. It's instead opening vivaldi help page.

                                      Edit: Ok it kinda works. It opens the first link on page (vivaldi.com cause we're in the forums ) then selects the original tab and the new one, stacks and tile them. But then I click in any link on the mother page and a third tab opens and behaves like the follower. The first page link is in between them doing nothing. Can you help?

                                      luetage
                                      L
                                      1 Reply Last reply
                                      Reply Quote 0
                                      • luetage
                                        L
                                        luetage Supporters Soprano @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
                                          L
                                          luetage Supporters Soprano
                                          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
                                            M
                                            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
                                            L
                                            1 Reply Last reply
                                            Reply Quote 6
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 11
                                            • 12
                                            • 5 / 12
                                            • 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