To install it follow this instructions:
1.- Install the extension Tampermonkey:
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo
6d7eee9a-432b-4c64-b239-392c9952a600-image.png
2.- Click the icon of the extension:
2c28c81b-6605-4598-b2d7-a05e783babe3-image.png
and click "Create a new script.."
3e2a8a5d-fe82-42d4-97e0-d79a607a8f2f-image.png
3.- Delete the template:
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
})();
4.- Paste this script:
// ==UserScript==
// @name Auto reload Vivaldi Forum
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://forum.vivaldi.net/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
(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");
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());
});
})();
})();
5.- In the File Menu:
577b8874-0598-4138-818f-5b295af5ed47-image.png
Click "Save":
00d9633d-bd0f-4940-9fbf-0aef97018279-image.png
With this script you forget to click the banner, because automatically auto reload Vivaldi Forum when there is a new post or thread.
be6a13c5-a901-4d16-93e2-54211c8376c5-image.png