Command Chain Recipes
-
@erazer101 Thanks for the HotkeyHighlightSearch command chain, very useful. Am I right when I say a single key shortcut, instead of a "normal shortcut like
CTRL+Q
, does not work? -
@luetage Thanks for the DeepL command chain.
You also stated:
command chains have replaced bookmarklets
I have a bookmarklet that kills so-called stickies on a webpage, like a pop-up at the bottom of the page.
I don't know which command to use for that. This is the parameter:
javascript:(function%20()%20{%20var%20i,%20elements%20=%20document.querySelectorAll('body%20*');%20%20for%20(i%20=%200;%20i%20<%20elements.length;%20i++)%20{%20if%20([%22sticky%22,%20%22fixed%22].includes(getComputedStyle(elements[i]).position))%20{%20elements[i].parentNode.removeChild(elements[i]);%20}%20}%20})();
-
@luetage re your command chain Copy Page Address, can you tell me where to add the code?
I ask because after command 6, Focus Page, there is no box to add the code.
-
@Granite1 said in Command Chain Recipes:
after command 6, Focus Page, there is no box to add the code.
The stuff in
{ }
brackets at the end of these posts is a repeat of the steps listed above them, but in a form you can directly import into Vivaldi if you use a JS mod that adds that functionality.See this section of the first post in the thread:
@luetage said in Command Chain Recipes:Backup and Share
Command Chains are not part of Vivaldi Sync. This means we lose our chains when we setup a new profile, or create a separate installation. Inputting everything again is tiresome, especially with a big chain collection. Fortunately @tam710562 has created a custom modification, which can both import and export command chains from and to files and the clipboard. This makes it possible to share chains directly, because he has even coded a direct install button for command chains shared on the forum. It’s definitely worth it and a big help and I would urge you to try it out, even if you haven’t bothered with Javascript modifications before. Here a link to the modification ☛ https://forum.vivaldi.net/post/723047, and here a link to the modifications forum board ☛ https://forum.vivaldi.net/category/52/modifications. Read pinned topics for introduction and help.
-
@nomadic said in Command Chain Recipes:
The stuff in { } brackets at the end of these posts
Many thanks for that explanation. The 6 steps work, I have not tried the JS side.
-
@Granite1 Bookmarklets are bookmarks containing Javascript code. They have to be opened in the same tab to work on the page. Therefore the command would be “open link in current tab” and the parameter is your script. It replaces the URL.
-
Therefore the command would be “open link in current tab” and the parameter is your script.
Yep, that works fine. Thanks for your help.
-
This post is deleted! -
-
@Granite1 You have to enable mail, calendar, and feeds from
vivaldi:settings/mail/
. -
@luetage said in Command Chain Recipes:
There is no good reason (other than sync) for saving Javascript code as a bookmark when using Vivaldi.
I adopted this enthusiastically to declutter my bookmarks bar. Trigering a bookmarklet means that, as per the recipe, the URL of page is replaced by the command's parameter (the former bookmarklet's code) and there is no way to get the URL back than by relaunching the page from where it came originally.
Are you aware of this, @luetage ?
-
@luetage said in Command Chain Recipes:
You have to enable mail, calendar, and feeds from vivaldi:settings/mail/
Of course I have those enabled, basically from the day I installed Vivaldi.
BTW, I assume your reply refers to my Mail Panel remark.
-
@Granite1 Try out the tab scroll command chain ☛ https://forum.vivaldi.net/post/509249 and check its code. You can fix the address by using the
history.replaceState()
method, most bookmarklets shared here use it.If you have mail enabled, but no mail panel, you can drop it on the panel container by customizing the toolbar/opening the toolbar editor and choosing “panel” in the dropdown. There you’ll find it.
-
I am afraid I am out of my depth.
@luetage said :
Try out the tab scroll command chain ☛ https://forum.vivaldi.net/post/509249 and check its code.
Here it is (presumably you mean the javascript part):
You then say:
You can fix the address by using the history.replaceState() method
How do I do that?
You then say:
If you have mail enabled, but no mail panel
To be clear, I do have the mail panel shown on the right.
What I don't have is the mail panel option in the dropdown that I am supposed to use in Command 2.
-
@Granite1 You add history.replaceState as instruction to your bookmarklet. The bookmarklet code you are using and viewing is all minimized, because it has to be on one line to be used as a URL. It helps prettifying the code again to get a clearer look and to learn how to add it to your existing bookmarklets. Take a look at my bookmarklet gist ☛ https://gist.github.com/luetage/6a66af73a4dd264fcb05fe24926b2e36. There you can see it in action. To do this yourself you should get a code editor with automatic formatting, or use the duckduck go feature to prettify/minimize for edits and command chain versions ☛ https://duckduckgo.com/?q=javascript+beautifier&t=vivaldi&ia=answer.
“Mail Panel” is an existing command. There is a mail command, a panel command, and a mail panel command. The mail command opens the mail tab and the mail panel. The mail panel command toggles the mail panel. The panel command toggles the panel container.
-
@luetage said:
You add history.replaceState as instruction to your bookmarklet.
Yep, that was the missing part.
@luetage said in Command Chain Recipes:
It helps prettifying the code again to get a clearer look
That helped.
So, this is 1 issue/1 command chain resolved, which I am grateful for – many thanks.Then there is the other issue /command chain regarding the mail panel, which you have also been trying to help me with.
@luetage said:
“Mail Panel” is an existing command.
My point is that I do not have that command.
I do have the mail command and the panel command, but not the mail panel command.
-
@Granite1 I cannot troubleshoot this for you. Create a new profile, enable mail, and check whether you can access the mail panel command there.
-
@luetage said in Command Chain Recipes:
I cannot troubleshoot this for you.
OK, fair enough. Many thanks for your help and patience, I appreciate it.
-
@idurand I got Startpage, DDG and Brave as the 3 engines.
When I trigger the Command Chain it opens a new tab for Startpage and DDG each, but does go beyond their home page, that empty page with an empty search box.
It does not stack those 2 tabs (Command 8), nor does it open a new tab for Brave, never mind tiling to grid.
-