NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Atelier801 frontpage notifications
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author Jordynl
// @match atelier801.com/forums
// @grant none
// ==/UserScript==
var locale = [];
locale.nouveau = ["<br/> Unread thread", "#2ecf73"];
locale.reponses = ["<br/> New posts ", "#babd2f"];
locale.lu = ["<br/> ", "#fff"]
$(document).ready(function(){
var notifications = ["reponses", "nouveau", "lu"];
setTimeout(function(){
for (var i in notifications) {
notify(notifications[i]);
}
}, 2000);
});
function notify(notification) {
element = document.getElementsByClassName("nombre-messages-"+notification);
for(var i=0;i<element.length;i++) {
element[i].style.fontSize = "14px";
element[i].style.color = "#c2c2da";
if (locale[notification]) {
var newMessageElement = document.createElement("span");
newMessageElement.style.fontSize = "10px";
newMessageElement.style.color = locale[notification][1];
newMessageElement.innerHTML = " "+locale[notification][0];
element[i].appendChild(newMessageElement);
}
}
}