• 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 73.0k 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.
    • 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
    • Mioni
      M
      Mioni
      last edited by

      I need to take the link from the news and open a site to remove the paywall, can I do this via chain?

      The site to remove the paywall is: https://leiaisso.net

      MasterLeo29
      M
      1 Reply Last reply
      Reply Quote 0
    • MasterLeo29
      M
      MasterLeo29 Ambassador @Mioni
      last edited by

      @Mioni the easier way would be to wait a bit for the snapshot version to hit stable. In there, when you use a chain command in a context menu you have access to special variables, like {page_url} (your use case).

      With that, a chain with 1 step of 'open link in new tab' with value as 'https://leiaisso.net/{page_url}' would do the trick.
      4fba3a40-a8f9-40af-b62e-fc35a1c14f13-image.png

      Then, customize the menu for when you right click a link (for example) and add it there.

      55ed699d-2d61-4737-b740-f98c67bd9618-image.png

      finally, on a news site, right click on the article's link you wanna read and pick the chain.
      b4eaa02e-d559-46ad-abd1-3a0a1ed3c6f7-image.png

      Mioni
      M
      1 Reply Last reply
      Reply Quote 4
    • Mioni
      M
      Mioni @MasterLeo29
      last edited by

      @MasterLeo29 Thanks! I'll be waiting 🥳

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

      Embed Youtube: takes the current video and opens it embed.

      1. Open Link in Current Tab
        Parameter: javascript:(()=>{const url=new URL(window.location.href);window.open(`${url.origin}/embed/${url.search.split("=")[1]}`,"_self")})();
      {"category":"CATEGORY_COMMAND_CHAIN","chain":[{"defaultValue":"https://vivaldi.com","key":"0b01337b-4c13-4197-90c8-179c5c91cfff","label":"Open Link in Current Tab","name":"COMMAND_OPEN_LINK_CURRENT","param":"javascript:(()=>{const url=new URL(window.location.href);window.open(`${url.origin}/embed/${url.search.split(\"=\")[1]}`,\"_self\")})();"}],"key":"9bfc5d43-2fbc-4aa2-a1af-9935cca9e07f","label":"Embed Youtube","name":"COMMAND_9bfc5d43-2fbc-4aa2-a1af-9935cca9e07f"}
      

      github ◊ vfm

      1 Reply Last reply Reply Quote 6
    • V
      V1valdiFan
      last edited by

      Hello. Please advise if it is possible to create a chain of commands for:

      1. Search selected text in Google in background tab?
      2. Save a picture to a certain folder or open a picture in the background tab?
        In order to hang these chains on mouse gestures.
        Earlier I used to use "smartUP gestures" extension for this purpose (it's cramped like many other similar extensions), but I switched to gorgeous native mouse gestures.

      I couldn't find it at random. Thank you in advance.

      1 Reply Last reply Reply Quote 0
    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