NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name BonjourBonsoir // @namespace CrazyJeux/Daring-Do // @author CrazyJeux/Daring-Do // @version 1 // @description Affiche "Bonjour" ou "Bonsoir" à côté de votre pseudo, en haut à droite de la page. // @match http://*.jeuxvideo.com/* // @match http://*.forumjv.com/forums/* // @grant none // ==/UserScript== function callMe() { var target = document.getElementsByClassName("nom-head-avatar")[0]; var el = document.createElement("span"); var d = new Date(); var n = d.getHours(); if (n < 18 && n > 4) { el.innerHTML = "Bonjour "; } else { el.innerHTML = "Bonsoir "; } el.style.cssText = "color: #fff; float: left; font-size: 12px; font-weight: 700; line-height: 1em; " + "margin-left: 7px; max-width: 90px; overflow: hidden; padding-bottom: 2px; position: relative;" + "text-overflow: ellipsis; top: 12px; white-space: nowrap;"; target.parentNode.insertBefore(el, target); } callMe(); //Respeed addEventListener('instantclick:newpage', callMe);