Watch Tab feature: indicator for periodic reload tabs triggered by content change
-
I found this on Mastodon and think it's a good request:
"Hey @Vivaldi, what's the chances I could get a "Watch Tab" feature added? Have a configurable periodic reload (already a feature obviously) in the background and just notify either through a simple dot on the tab or a popup (having that a configurable option would be nice) when the page changes?"
https://social.vivaldi.net/@[email protected]/112435124814417172
-
Not the same but similar:
If this script detect the "Load new posts" button in Vivaldi Forum, the page reload automatically:
// ==UserScript== // @name Auto reload Vivaldi Forum // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author @potmeklecbohdan // @match https://forum.vivaldi.net/* // @grant none // ==/UserScript== (function(){ let observers = []; function callback(mutationList, observer) { for (let mut of mutationList) { if (mut.type === "attributes" && mut.attributeName === "class") { if (mut.oldValue.split(" ").includes("hide") && !mut.target.className.split(" ").includes("hide")) { location.reload(); } } } } function watch() { for (let obs of observers) { obs.disconnect(); let idx = observers.indexOf(obs); if (idx > -1) observers.splice(idx, 1); } let node = document.querySelector("#new-topics-alert.alert.alert-warning.h-100.m-0.px-2.py-1.d-flex.align-items-center"); if (!node) return; let cfg = { attributes: true, attributeFilter: [ "class" ], attributeOldValue: true }; let obs = new MutationObserver(callback); observers.push(obs); obs.observe(node, cfg); } window.addEventListener("load", () => { watch(); // Have to use jQuery coz otherwise it doesn't work if (window.$) $(window).on('action:ajaxify.end', () => watch()); }); })();
Written by @potmeklecbohdan in this post https://forum.vivaldi.net/topic/50529/auto-reload-vivaldi-forum-only-when-there-is-a-new-post-or-thread-ahk-script