Command Chain Recipes
-
@janrif But then you don’t get stuck on the last step, but right after the first step, namely showing mail, as expected. Whatever it is you’re trying to do.
-
@WildEnte You would probably have to use the api ☛ https://docs.joinmastodon.org/client/intro/
-
@luetage well, the problem here is the lack of competence on my end, which ends quite quickly after copy & paste.
-
@WildEnte Seems Mastodon has a fairly similar "share" URL. There is a bit or trouble if you need to figure out the correct instance, but in this case, since you know it is Vivaldi Social, it should be easy.
Give this a try in place of the Twitter part:
javascript:window.open("https://social.vivaldi.net/share?text="+encodeURIComponent(document.title)+" "+encodeURIComponent(location.href))
And you could probably use some JS from this project if you needed a way to determine the correct instance.
@WildEnte said in Command Chain Recipes:
well, the problem here is the lack of competence on my end, which ends quite quickly after copy & paste.
Already 90% of the way there to being a full programmer. I concocted that JS by copying from 3 different spots and pasting them together
-
-
@WildEnte Yes! Just a few changes the above Command Chain.
- Capture Area to Clipboard (or Capture page to Clipboard)
- Open Link in Current Tab
Parameter:
javascript:window.open("https://social.vivaldi.net/share?text="+encodeURI(document.title)+"&url="+location.href);
- Delay (Parameter:2000)
- Paste
-
i set up 2 Theme changer Commands lol My Matrix theme is activated when i Type My Name is Neo and Jarvis system activates by typing i am iron man lol
-
Removed the html + title, because I only needed the link. And this is faster then the other copy url solution from the tips.
javascript: function copy(c) { c.clipboardData.setData("text", location.href); c.preventDefault(); } document.addEventListener("copy", copy); document.execCommand("copy"); document.removeEventListener("copy", copy); history.replaceState({}, "", location.href);
-
So I made a custom command chain to open Vivaldi help articles and the forums simultaneously and just recently deleted the default Vivaldi help And replaced it with my command chain in the Help menu as well as assign F1 to execute the command instead of just triggering help it opens the forums as well
1.Vivaldi Help
2. Open link in New tab:Forum.vivaldi.net
3.Tile vertically -
@kjvdven said in Command Chain Recipes:
because I only needed the link.
C-l
(focus address bar field) >C-c
(copy)does this not work for u?
-
@yashpalgoyal1304 This is about command chains, not commands entered manually in series.
-
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
-
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,
-
@yashpalgoyal1304 Broke in Chromium 120, too.
-
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
orquery
as url search param), then this command chain will open the same search query in Google, DuckDuckGo, and Brave and tile to grid:-
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));})();
-
Delay
Command Parameter: 1000 -
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)); })();
-
Select Current Tab
-
Delay
Command Parameter: 500 -
Select Previous Tab
-
Delay
Command Parameter: 500 -
Stack Tabs
-
Delay
Command Parameter: 500 -
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');})();
-
Delay
Command Parameter: 100 -
Tile to Grid
-
-
If you are a romantic and want to please your beloved with just one button:
Open Link in New Tab
:https://web.telegram.org/k/#@{login}
Delay
: 1000Open 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); })()
Delay
: 500Close Tab
-
If you want to use Yandex for page translation + tiling. Actually, you can choose your favorite translator and modify this command chain:
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.Delay
: 200Open Link in Current Tab
:
javascript:(() => { u = "https://translate.yandex.ru/translate?view=compact&url=" + encodeURIComponent(location.href); window.open(u); })()
Delay
: 200Select Previous Tab
Delay
: 200Tile Vertically
Delay
: 200Deselect Tabs
-
If you use my previous command chain and want to change source language:
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. -
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:
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); })();
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.
-
@aminought I like your
Scroll Up
andScroll 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); })();