Hi...
I made a little client side script which plays a sound when you receive notifications on the forums,
How to install
Chrome - Click
Firefox - Click
Opera - Click
As of right now there's no version of ViolentMonkey for Microsoft Edge, there might be a different addon similair to ViolentMonkey, haven't looked for alternatives myself.
The script refreshes your page every 30 seconds unless the tab is focussed, you can change this easily by editing "var refreshTime = 30;", the sound can also be changed by editing the url @ "var notification = new Audio('http://landviz.nl/host/plucky.mp3');" (Keep in mind that some browsers might not support other file formats)
For whoever knows how to use Greasy Fork:
https://greasyfork.org/nl/scripts/32163-cubecraft-alerts
Install link doesnt have the correct link for the sound file, if you don't know how to edit it, just use the videos to install instead
I made a little client side script which plays a sound when you receive notifications on the forums,
Code:
// ==UserScript==
// @name Cubecraft Alerts
// @namespace Landviz' script
// @grant none
// @match https://*.cubecraft.net/*
// ==/UserScript==
var refreshTimer = 30;
var notification = new Audio('http://landviz.nl/host/plucky.mp3');
var newAlerts = Number(document.querySelector('#VisitorExtraMenu_AlertsCounter span.Total').innerHTML);
var newConv = Number(document.querySelector('#VisitorExtraMenu_ConversationsCounter span.Total').innerHTML);
var notified;
if(sessionStorage.getItem('alerts') !== null) {
if( newAlerts > sessionStorage.getItem('alerts') || newConv > sessionStorage.getItem('conv')) {
notification.play();
}
}
sessionStorage.setItem('alerts', newAlerts);
sessionStorage.setItem('conv', newConv);
setInterval(function() {
if(!document.hasFocus()) {
location.reload();
}
}, refreshTimer*1000);
How to install
Chrome - Click
Firefox - Click
Opera - Click
As of right now there's no version of ViolentMonkey for Microsoft Edge, there might be a different addon similair to ViolentMonkey, haven't looked for alternatives myself.
The script refreshes your page every 30 seconds unless the tab is focussed, you can change this easily by editing "var refreshTime = 30;", the sound can also be changed by editing the url @ "var notification = new Audio('http://landviz.nl/host/plucky.mp3');" (Keep in mind that some browsers might not support other file formats)
For whoever knows how to use Greasy Fork:
https://greasyfork.org/nl/scripts/32163-cubecraft-alerts
Install link doesnt have the correct link for the sound file, if you don't know how to edit it, just use the videos to install instead
Last edited: