Update Feeds
-
This is an instructional mod, showing how we can utilize a native command chain, a native custom button, and a custom modification, to introduce a missing feature.
RSS feeds update on a schedule, which can be set for each feed separately. Refreshing the feeds manually is only possible with the »update all feeds« button located in the settings (
vivaldi://settings/rss
). The mail toolbar has a button called »check for mail,« but it doesn’t update feeds. Let’s create a button that does just thatPrerequisites
- Visit
vivaldi://settings/general
and check »enable mail, calendar and feeds« - Add some RSS feeds
- Visit
vivaldi://settings/experiments
and check »enable custom buttons« - Restart
Add the command chain
Visit
vivaldi://settings/qc
, scroll down to the command chains section and click the+
button to add a new chain.Chain Name:
Update Feeds
- Open Link in New Tab
parameter:vivaldi://settings/rss/
- Delay
parameter:500
- Close Tab
This chain opens feeds settings in a new tab and closes them after a delay. The delay gives us time to execute code to click the »update all feeds« button programmatically.
Add the custom modification
-
Follow directions to create a custom JS file ☛ https://forum.vivaldi.net/post/10549
-
Copy following code, paste it into your file and save
// Update feeds // version 2023.1.0 // https://forum.vivaldi.net/post/641164 // Custom button to update feeds from any toolbar. See linked topic for full // instructions. (function updateFeeds() { let appendChild = Element.prototype.appendChild; Element.prototype.appendChild = function () { if (this.tagName === "BUTTON") { setTimeout( function () { if (this.classList.contains("ToolbarButton-Button")) { // make sure following title exactly matches the name of your // command chain if (this.title === "Update Feeds") { this.addEventListener("click", () => { setTimeout(() => { // make sure following input value exactly matches the title // of the button to update all feeds in vivaldi://settings/rss // this is dependent on your browser language settings document .querySelector("input[value='Update All Feeds']") .click(); }, 150); }); } } }.bind(this, arguments[0]) ); } return appendChild.apply(this, arguments); }; })();
-
Restart
This modification adds an event listener to the button we will add in the last step. The execution of the automated click is preceded by a timeout, to give the command chain a chance to load the page first.
Add the button
-
Open the toolbar editor with the »customize toolbar« command. You can trigger the command through Quick Commands, the general menu (under »view«), or by right‐click on any toolbar (panel, navigation, status, mail)
-
Use the dropdown in the toolbar editor popup to select »command chains«
-
Drag & drop the command chain button onto a toolbar of your choice (I placed it on the mail toolbar)
We’re done. Clicking the button will automatically update our feeds. Should you have any questions or concerns, I’m happy to address them. I hope this will inspire some of you to write your own custom buttons, the tools Vivaldi has provided us with are powerful indeed. For an example using a custom page action instead of a modification see this post ☛ https://forum.vivaldi.net/post/639940. For anything that can be achieved fully native, command chain recipes are a good starting point.
- Visit