// ==UserScript== // @name [ONCHE] Notes // @version 1.0.0 // @description Script pour https://onche.org, permet d'écrire et stoquer des notes sur chaque forumeur. // @author Programmafion // @match https://onche.org/topic/* // @downloadURL https://codeberg.org:programmafion1/onche_notes/raw/branch/main/onche_blacklist.user.js // @updateURL https://codeberg.org/programmafion1/onche_notes/raw/branch/main/onche_blacklist.meta.js// @icon https://risibank.fr/cache/medias/0/5/544/54444/thumb.png // @grant GM_addStyle // ==/UserScript== (function() { GM_addStyle('.mdi-note-outline::before {font-family: "material design icons"; content: "\\F039B";} .mdi-note-plus-outline::before {font-family: "material design icons"; content: "\\F039D";}'); const {backgroundColor: messageBackgroundColor} = window.getComputedStyle(document.querySelector('.message')); const {color: messageColor, fontSize: messageFontSize} = window.getComputedStyle(document.querySelector('.message-content')); document.querySelectorAll('.message:not(.answer)').forEach(msg => { const author = msg.querySelector('.message-username').textContent.toLowerCase(); const iconCls = localStorage.getItem(`notes_userscript.${author}`) ? 'mdi-note-outline' : 'mdi-note-plus-outline'; msg.querySelector('.message-badges').insertAdjacentHTML('beforeend', `