• Community
    • Community
    • Vivaldi Social
    • Blogs
  • Forum
    • Vivaldi Forum
    • Categories
    • Recent
    • Popular
  • Themes
    • Vivaldi Themes
    • My Themes
    • FAQ
  • Contribute
    • Contribute
    • Volunteer
    • Donate
  • Browser
    • Vivaldi Browser
    • Latest News
    • Snapshots
    • Help
Register Login

Vivaldi

  • Community
  • Themes
  • Contribute
  • Browser

Navigation

    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Let's talk about Vivaldi
    3. Tips & Tricks
    4. Command Chain Recipes

    Command Chain Recipes

    Scheduled Pinned Locked Moved Tips & Tricks
    235 Posts 45 Posters 72.6k Views 34 Watching
    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.
    • luetage
      L
      luetage Supporters Soprano @yashpalgoyal1304
      last edited by

      @yashpalgoyal1304 This is about command chains, not commands entered manually in series.

      github ◊ vfm

      1 Reply Last reply Reply Quote 0
    • Pesala
      P
      Pesala Ambassador
      last edited by

      I have a Command Chain button before the URL Field to copy the URL. I use it frequently.

      • Focus Address Field
      • Delay 10ms
      • Copy
      • Delay 10ms
      • Focus Page

      Blog • Vivaldi Review • Server Status
      Win 10 64-bit build 19045.2486 • Snapshot 7.5.3725.3 (64-bit)

      Granite1
      G
      1 Reply Last reply
      Reply Quote 1
    • Y
      yashpalgoyal1304 Ambassador
      last edited by

      any working one for copying title?

      @yashpalgoyal1304 said in Copy Page Title:

      @pafflick said in Copy Page Title:

      Alternatively, add this as the Command Parameter, in order to preserve the URL in the address field:

      javascript:navigator.clipboard.writeText(document.title);history.replaceState({},"",location.href);
      

      This used to work, but ain't working now, I guess the update broke it,

      DoctorG
      D
      1 Reply Last reply
      Reply Quote 0
    • DoctorG
      D
      DoctorG Soprano @yashpalgoyal1304
      last edited by

      @yashpalgoyal1304 Broke in Chromium 120, too.

      _bug hunter · Volunteer helper · Sopranos tester · Language DE,EN · ♀👵
      Known old dragon lady: Gwen aka Dr. Gwen Agon aka GwenDragon aka DoctorGTesting


      Linux Debian 12 KDE X11 / Windows 11 Pro
      Intel i5-7400 / NVidia GT 710

      1 Reply Last reply Reply Quote 1
    • I
      idurand
      last edited by idurand

      Search current query in 3 different engines (Google, DuckDuckGo, and Brave)

      I have been using this command chain for some time now and it has worked well for me, so I thought of sharing it here.

      Basically, if you are in a search engine (which uses q or query as url search param), then this command chain will open the same search query in Google, DuckDuckGo, and Brave and tile to grid:

      1. Open Link in Current Tab
        Command Parameter:

        javascript:(function(){var urlParams = new URLSearchParams(window.location.search); var queryValue = urlParams.get('q') || urlParams.get('query') || ''; window.open( 'https://www.google.com/search?q=' + encodeURIComponent(queryValue));})();
        
      2. Delay
        Command Parameter: 1000

      3. Open Link in Current Tab
        Command Parameter:

        javascript: (function () { var urlParams = new URLSearchParams(window.location.search); var queryValue = urlParams.get('q') || urlParams.get('query') || ''; window.open('https://duckduckgo.com/?q=' + encodeURIComponent(queryValue)); })();
        
      4. Select Current Tab

      5. Delay
        Command Parameter: 500

      6. Select Previous Tab

      7. Delay
        Command Parameter: 500

      8. Stack Tabs

      9. Delay
        Command Parameter: 500

      10. Open Link in Current Tab
        Command Parameter:

        javascript:(function () { var urlParams = new URLSearchParams(window.location.search); var queryValue = urlParams.get('q') || urlParams.get('query') || ''; window.open( 'https://search.brave.com/search?q=' + encodeURIComponent(queryValue) + '&source=desktop');})();
        
      11. Delay
        Command Parameter: 100

      12. Tile to Grid

      Granite1
      G
      1 Reply Last reply
      Reply Quote 5
    • aminought
      A
      aminought
      last edited by

      If you are a romantic and want to please your beloved with just one button:

      1. Open Link in New Tab: https://web.telegram.org/k/#@{login}
      2. Delay: 1000
      3. Open Link in Current Tab:
      javascript:(() => {
          s = document.getElementsByClassName('input-message-input scrollable scrollable-y no-scrollbar')[0];
          s.innerHTML = "I love you ❤️";
          const e = new KeyboardEvent("keydown", {
              view: window,
              key: 'Enter',
              code: 'Enter',
              keyCode: 13,
              bubbles: true,
              cancelable: true,
          });
          s.dispatchEvent(e);
      })()
      
      1. Delay: 500
      2. Close Tab
      1 Reply Last reply Reply Quote 5
    • aminought
      A
      aminought
      last edited by

      If you want to use Yandex for page translation + tiling. Actually, you can choose your favorite translator and modify this command chain:

      1. Move Tabs to End. First, move the tab to the end of the group. Without this, the link will open at the end as well and be placed next to the previous tab, not the last one.
      2. Delay: 200
      3. Open Link in Current Tab:
      javascript:(() => {
          u = "https://translate.yandex.ru/translate?view=compact&url=" + encodeURIComponent(location.href);
          window.open(u);
      })()
      
      1. Delay: 200
      2. Select Previous Tab
      3. Delay: 200
      4. Tile Vertically
      5. Delay: 200
      6. Deselect Tabs
      1 Reply Last reply Reply Quote 3
    • aminought
      A
      aminought
      last edited by

      If you use my previous command chain and want to change source language:

      1. Open Link in Current Tab:
      javascript:(()=>{
          url = location.href;
          if (url.includes('translated.turbopages.org')) {
              var lang = prompt('Choose source lang:', 'en');
              url = url.replace(/..(-[^0-9]+)/ig, lang + '$1');
              window.location = url;
          } else {
              history.replaceState({}, "", location.href);
              alert('Not translated page!');
          }
      })()
      

      The language is specified as a locale: en, de, ru, es, no and so on.

      1 Reply Last reply Reply Quote 1
    • aminought
      A
      aminought
      last edited by

      Tab Scroll Smooth

      javascript:(() => {
          let o = window.scrollY;
          if (o > 0) {
              window.sessionStorage.setItem("tabOffset", o);
              window.scrollTo({top: 0, behavior: 'smooth'});
          } else {
              window.scrollTo({top: window.sessionStorage.getItem("tabOffset") || 0, behavior: 'smooth'});
          }
          history.replaceState({}, "", location.href);
      })()
      

      Actually, I found more useful commands for myself:

      1. Scroll Up:
      javascript:(() => {
          let o = window.scrollY;
          if (o > 0) {
              window.sessionStorage.setItem("tabOffset", o);
              window.scrollTo({top: 0, behavior: 'smooth'});
          }
          history.replaceState({}, "", location.href);
      })();
      
      1. Scroll Down
      javascript:(() => {
          let o = window.scrollY;
          if (o == 0) {
              window.scrollTo({top: window.sessionStorage.getItem("tabOffset") || 0, behavior: 'smooth'});
          }
          history.replaceState({}, "", location.href);
      })()
      

      Now these commands can be assigned to mouse gestures up and down respectively, very useful and nice.

      oudstand
      O
      1 Reply Last reply
      Reply Quote 1
    • oudstand
      O
      oudstand Supporters @aminought
      last edited by oudstand

      @aminought I like your Scroll Up and Scroll Down, thanks for sharing 🙂
      I've adjusted the code a bit. Now you can scroll to the top/bottom or the last postilion if you're more below/above.

      Scroll Up

      javascript:(() => {
          let o = window.scrollY;
          if (o > window.sessionStorage.getItem("tabOffset")) {
              window.scrollTo({top: window.sessionStorage.getItem("tabOffset") || 0, behavior: 'smooth'});
          } else if (o > 0) {
              window.sessionStorage.setItem("tabOffset", o);
              window.scrollTo({top: 0, behavior: 'smooth'});
          }
          history.replaceState({}, "", location.href);
      })();
      

      Scroll Down

      javascript:(() => {
          let o = window.scrollY;
          if (o < window.sessionStorage.getItem("tabOffset")) {
              window.scrollTo({top: window.sessionStorage.getItem("tabOffset") || 0, behavior: 'smooth'});
          } else {
              window.sessionStorage.setItem("tabOffset", o);
              window.scrollTo({top: document.body.scrollHeight, behavior: 'smooth'});
          }
          history.replaceState({}, "", location.href);
      })();
      
      ukanuk
      U
      Granite1
      G
      2 Replies Last reply
      Reply Quote 2
    • aminought
      A
      aminought
      last edited by

      Copy Page Title (fixed)

      1. Open Link in Current Tab:
      javascript:(() => {
          history.replaceState({}, "", location.href);
          setTimeout(()=>{
              navigator.clipboard.writeText(document.title);
          }, 200);
      })()
      
      1. Focus Page
      shifte
      S
      1 Reply Last reply
      Reply Quote 3
    • shifte
      S
      shifte @aminought
      last edited by

      Rotate a Page (image)
      1, Open Link in Current Tab
       Parameter: javascript:b=document.body;b.style.webkitTransition='-webkit-transform%201s%20ease-in';b.style.WebkitTransform='rotate('+prompt('degrees',180)+'deg)';void(0);window.history.replaceState({},"",location.href);

      1 Reply Last reply Reply Quote 2
    • J
      joelfaras
      last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
    • luetage
      L
      luetage Supporters Soprano
      last edited by

      Some time ago @tam710562 created a modification for importing, exporting and sharing command chains. Here a link to his mod ☛ https://forum.vivaldi.net/post/723047. I also added the same information with a bit of explanation to the OP and added/linked missing command chains throughout this topic. Thanks again everyone for sharing your command chains.

      github ◊ vfm

      1 Reply Last reply Reply Quote 3
    • ukanuk
      U
      ukanuk Ambassador @oudstand
      last edited by ukanuk

      @aminought / @oudstand the scroll up/down doesn't work in PDFs, does it?

      1 Reply Last reply Reply Quote 0
    • arnad
      A
      arnad
      last edited by

      Hi everyone, is it possible to open the "Edit Bookmark" dialog from a command chain?

      shifte
      S
      1 Reply Last reply
      Reply Quote 1
    • shifte
      S
      shifte @arnad
      last edited by

      @arnad
      Weird Command Chain.
      0219_13.png

      1 Reply Last reply Reply Quote 3
    • arnad
      A
      arnad
      last edited by arnad

      @shifte That opens the "Added Bookmark" dialog. I mean the "Edit Bookmark dialog that you get via the "Edit" entry in a bookmarks context menu.

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

      @shifte Ha, that’s indeed useful.

      For direct install

      {"category":"CATEGORY_COMMAND_CHAIN","chain":[{"key":"844219eb-ed35-4b17-a9f4-7789466c233c","label":"Create Bookmark","name":"COMMAND_ADD_BOOKMARK"},{"defaultValue":1000,"key":"2eb81004-6703-46db-9933-6afcfde924e4","label":"Delay","name":"COMMAND_CHAINED_SLEEP","param":200},{"key":"844219eb-ed35-4b17-a9f4-7789466c233c","label":"Create Bookmark","name":"COMMAND_ADD_BOOKMARK"}],"key":"266064c0-3901-4ce8-b3aa-8bd96bb89ff3","label":"Create Bookmark Open Dropdown","name":"COMMAND_266064c0-3901-4ce8-b3aa-8bd96bb89ff3"}
      

      github ◊ vfm

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

      @arnad That can’t be automated with command chains.

      github ◊ vfm

      1 Reply Last reply Reply Quote 2
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    • 1
    • 2
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 8 / 12
    • First post
      Last post

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