Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name AveNoel
- // @namespace http://tampermonkey.net/
- // @version 3.22.1
- // @description Spartanz en sueur
- // @author MrPointVult
- // @match https://avenoel.org/*
- // @require http://www.chartjs.org/dist/2.7.2/Chart.bundle.js
- // @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js
- // @require https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js
- // @grant GM_addStyle
- // @grant GM_getResourceText
- // ==/UserScript==
- //-----------------------------------------------------
- // TODO list
- //-----------------------------------------------------
- //classer les MPs en catégorie
- //voir ce que je peux faire des vidéos (possible de synchoniser ?)
- //-----------------------------------------------------
- //Profils
- var regexList;
- var bansRegex;
- var profilUsers;
- var favProfiles;
- var banProfiles;
- var currentProfile;
- var colorListProfil = [
- "White",
- "LightBlue",
- "LightCoral",
- "LightCyan",
- "LightGoldenRodYellow",
- "LightGrey",
- "LightGreen",
- "LightPink",
- "LightSalmon",
- "LightSeaGreen",
- "LightSkyBlue",
- "LightSlateGrey",
- "LightSteelBlue"
- ];
- //Topic
- var favs;
- var bans;
- // Global
- var id = 0;
- var profil = {name:"rien", quoted:"", noneRead:"", nbMail:"", tabName:document.title};
- const space = " ";
- const url = "https://avenoel.org";
- const imgQuote = "<img style=\"cursor: pointer;\" src=\"/images/topic/quote.png\" alt=\"Icône citation\" width=\"20\">";
- const imgEdit = "<img style=\"cursor: pointer;\" src=\"/images/topic/edit.png\" alt=\"Icône éditer\" title=\"Éditer le message\" width=\"20\">";
- const imgDelete = "<img style=\"cursor: pointer;\" src=\"/images/topic/delete.png\" alt=\"Icône suppression\" width=\"20\">";
- const imgLivraisonList =
- ["https://image.noelshack.com/fichiers/2018/08/1/1519061174-watamote15.png",
- "https://image.noelshack.com/fichiers/2018/01/6/1515207003-hif.gif",
- "https://image.noelshack.com/fichiers/2017/04/1485268586-hackeur-v1.png",
- "https://image.noelshack.com/fichiers/2017/02/1484089609-coeur.png",
- "https://image.noelshack.com/fichiers/2017/15/1492271548-alerte.gif",
- "https://image.noelshack.com/fichiers/2018/11/6/1521293603-negan3png.png",
- "https://image.noelshack.com/fichiers/2017/17/1493408788-modo-eplingle.png",
- "https://image.noelshack.com/fichiers/2018/10/3/1520427923-74679246-817a-4df6-8077-a4659b8048e8.jpeg",
- "https://i.imgur.com/aHLhmoa.png"];
- const imgLivraison = "<img class=\"board-noelshack\" src=\""+imgLivraisonList[Math.floor(Math.random() * imgLivraisonList.length)]+" \">";
- (function() {
- 'use strict';
- var t0 = performance.now();
- //debugger;
- //localStorage.removeItem("favs");
- //localStorage.removeItem("bans");
- //localStorage.removeItem("favProfiles");
- //localStorage.removeItem("banProfiles");
- //localStorage.removeItem("profilUsers");
- addStyle();
- initProfil();
- initFunctions();
- setInterval(initCache, 1500);
- initCache();
- scrollBack();
- var path = window.location.pathname;
- if (path.startsWith('/profil')) {
- traiterProfil();
- } else {
- ajouterBarFav();
- if (path.startsWith('/forum')) {
- traiterForum();
- } else if (path.startsWith('/topic')) {
- traiterTopic();
- } else if (path === '/messagerie') {
- traiterMessagerie();
- } else if (path.startsWith('/stats')) {
- traiterStats();
- } else if (path.startsWith('/messagerie')) {
- } else {
- console.log('Cas ' + path + " non traité.");
- }
- }
- enhanceTextArea();
- controlVersion();
- var t1 = performance.now();
- console.log("Call to AveNoel took " + (t1 - t0) + " milliseconds.");
- })();
- function initProfil() {
- var navbarUserAvatar = document.getElementsByClassName('navbar-user-avatar')[0];
- if (!navbarUserAvatar) {
- return;
- }
- var split = navbarUserAvatar.parentElement.href.split("/");
- profil.name = split[split.length-1];
- }
- function initFunctions() {
- if (!String.prototype.splice) {
- /**
- * {JSDoc}
- *
- * The splice() method changes the content of a string by removing a range of
- * characters and/or adding new characters.
- *
- * @this {String}
- * @param {number} start Index at which to start changing the string.
- * @param {number} delCount An integer indicating the number of old chars to remove.
- * @param {string} newSubStr The String that is spliced in.
- * @return {string} A new string with the spliced substring.
- */
- String.prototype.splice = function(start, delCount, newSubStr) {
- return this.slice(0, start) + newSubStr + this.slice(start + Math.abs(delCount));
- };
- }
- if (!Date.prototype.getString) {
- Date.prototype.getString = function() {
- var yyyy = this.getFullYear();
- var mm = this.getMonth() < 9 ? "0" + (this.getMonth() + 1) : (this.getMonth() + 1); // getMonth() is zero-based
- var dd = this.getDate() < 10 ? "0" + this.getDate() : this.getDate();
- var hh = this.getHours() < 10 ? "0" + this.getHours() : this.getHours();
- var min = this.getMinutes() < 10 ? "0" + this.getMinutes() : this.getMinutes();
- var ss = this.getSeconds() < 10 ? "0" + this.getSeconds() : this.getSeconds();
- //return "".concat(dd).concat("/").concat(mm).concat("/").concat(yyyy).concat(" ").concat(hh).concat(":").concat(min).concat(":").concat(ss);
- return "".concat(yyyy).concat("/").concat(mm).concat("/").concat(dd).concat(" ").concat(hh).concat(":").concat(min).concat(":").concat(ss);
- };
- }
- if (!Date.prototype.addHours) {
- Date.prototype.addHours = function(hour) {
- this.setTime(this.getTime() + (hour*60*60*1000));
- return this;
- }
- }
- }
- function initCache() {
- profilUsers = localStorage.profilUsers === undefined ? {} : JSON.parse(localStorage.profilUsers);
- regexList = localStorage.regexList === undefined ? [] : JSON.parse(localStorage.regexList);
- bansRegex = localStorage.bansRegex === undefined ? [] : JSON.parse(localStorage.bansRegex);
- favs = localStorage.favs === undefined ? {} : JSON.parse(localStorage.favs);
- bans = localStorage.bans === undefined ? [] : JSON.parse(localStorage.bans);
- favProfiles = localStorage.favProfiles === undefined ? [] : JSON.parse(localStorage.favProfiles);
- banProfiles = localStorage.banProfiles === undefined ? [] : JSON.parse(localStorage.banProfiles);
- }
- function controlVersion() {
- httpGetApiAsync("messages/1611709", function(res) {
- var matchVersion = res.data.content.match(/[0-9]+\.[0-9]+\.[0-9]+/g);
- if (matchVersion && version !== matchVersion[0]) {
- var patchNotes = res.data.content.split("Je compte l'enrichir")[0].match(/\+.*/g);
- var div = document.getElementById('alertversion');
- var innerHTML =
- "Version <a href=\"https://avenoel.org/topic/101099-1-aide-voici-un-script-pour-vous-faciliter-la-vie-sur-avn\">" + matchVersion[0] + "</a> disponible."+
- "<br>N'oubliez pas de laisser un commentaire." +
- "<br>"+ imgLivraison;
- div.innerHTML = innerHTML;
- div.style.color = "red";
- }
- });
- }
- function scrollBack() {
- var buttonUp = createElem(document.getElementsByTagName("body")[0],
- "<button id=\"idBtnScrollBackUp\" ><img class=\"board-noelshack\" src=\"https://i.imgur.com/5jJBFmD.png \"></button>");
- buttonUp.onclick = function() {
- document.body.scrollTop = 0; // For Safari
- document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
- };
- var buttonDown = createElem(document.getElementsByTagName("body")[0],
- "<button id=\"idBtnScrollBackDown\" ><img class=\"board-noelshack\" src=\"https://i.imgur.com/5jJBFmD.png \"></button>");
- buttonDown.onclick = function() {
- document.body.scrollTop = document.body.scrollHeight; // For Safari
- document.documentElement.scrollTop = document.body.scrollHeight; // For Chrome, Firefox, IE and Opera
- };
- var event = function(e) {
- if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
- document.getElementById("idBtnScrollBackUp").style.display = "block";
- } else {
- document.getElementById("idBtnScrollBackUp").style.display = "none";
- }
- if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
- document.getElementById("idBtnScrollBackDown").style.display = "none";
- } else {
- document.getElementById("idBtnScrollBackDown").style.display = "block";
- }
- };
- window.addEventListener('scroll', event);
- event.apply();
- }
- //-----------------------------------------------------
- // Editeur de texte
- //-----------------------------------------------------
- function enhanceTextArea() {
- var textArea = document.getElementsByTagName("textarea")[document.getElementsByTagName("textarea").length - 1];
- if (!textArea) {
- return;
- }
- function doc_keyUp(e) {
- if (e.ctrlKey && e.keyCode == 81) {
- var display = document.getElementById("risi-overlay").style.display;
- document.getElementById("risi-overlay").style.display = (display === "") ? "none" : "";
- if (document.getElementById("risi-overlay").style.display !== "") {
- textArea.focus();
- } else {
- document.getElementById("risi-recherche").focus();
- }
- }
- }
- document.addEventListener('keyup', doc_keyUp, false);
- document.getElementsByClassName("risi-r")[0].innerHTML = "Raccourci => Ctrl+Q" + document.getElementsByClassName("risi-r")[0].innerHTML;
- // dragElement(document.getElementsByClassName("col-md-10 col-md-offset-1")[0].children[0]);
- //document.getElementsByClassName("col-md-10 col-md-offset-1")[0].children[0].id = 'dxy';
- if (textArea.value.length > 0) {
- textArea.selectionStart = textArea.value.length;
- textArea.focus();
- }
- var edit = function(tagIn, tagOut) {
- var start = textArea.selectionStart;
- var end = textArea.selectionEnd;
- textArea.value = textArea.value.splice(textArea.selectionEnd, 0, tagOut).splice(textArea.selectionStart, 0, tagIn);
- textArea.selectionStart = start + tagIn.length;
- textArea.selectionEnd = end + tagIn.length;
- textArea.focus();
- };
- var textAreaButtons = document.getElementsByClassName("form-group bbcodes")[document.getElementsByClassName("form-group bbcodes").length - 1];
- var list = [
- {name:"R", tagIn:"<color=red>", tagOut:"</color>", color:"red"},
- {name:"G", tagIn:"<color=green>", tagOut:"</color>", color:"green"},
- {name:"B", tagIn:"<color=blue>", tagOut:"</color>", color:"blue"}
- ];
- var div = document.createElement('div');
- list.forEach(function(each) {
- div.innerHTML = "<button type=\"button\" class=\"btn\" tabindex=\"-1\" data-type=\"tag\"><span>" + each.name + "</span></button>";
- var btn = div.firstChild;
- textAreaButtons.appendChild(btn);
- btn.style.color = each.color;
- btn.onclick = function() {edit(each.tagIn, each.tagOut);};
- });
- div.innerHTML = "<div style=\"max-height: 122px;overflow-y: scroll;\"></div>";
- var risibank = div.firstChild;
- textAreaButtons.appendChild(risibank);
- var risiList = document.getElementsByClassName("risi-rlist")[0];
- risiList.childNodes.forEach(function(each) {
- var img = each.cloneNode(true);
- img.classList = [];
- img.style.cssText = "position: relative;display: inline-block;padding: 5px;";
- img.children[0].classList = [];
- img.children[0].style.cssText = "width: 68px;height: 51px;cursor:pointer;";
- risibank.appendChild(img);
- img.onclick = function() {edit(img.children[0].src+" ", "");};
- });
- div.remove();
- textArea.onfocusout = function () {
- var value = textArea.value;
- regexList.forEach(function(each) {
- value = value.replace(new RegExp(each.reg, "gm"), each.res);
- });
- // Mort aux cucks
- textArea.value = value
- .replace(new RegExp(" cuck", "gm"), " candaule")
- .replace(new RegExp(" Cuck", "gm"), " Candaule")
- .replace(new RegExp(" CUCK", "gm"), " CANDAULE");
- };
- //manageRisiBank();
- }
- function manageRisiBank() {
- var risiList = document.getElementsByClassName("risi-rlist")[0];
- console.log(risiList);
- risiList.childNodes[1].parentNode.insertBefore(risiList.childNodes[1], risiList.childNodes[0]);
- }
- function dragElement(elmnt) {
- var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
- // if (document.getElementById(elmnt.id + "header")) {
- /* if present, the header is where you move the DIV from:*/
- // document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
- // } else {
- /* otherwise, move the DIV from anywhere inside the DIV:*/
- elmnt.onmousedown = dragMouseDown;
- // }
- elmnt.style.position = 'absolute';
- function dragMouseDown(e) {
- e = e || window.event;
- // get the mouse cursor position at startup:
- pos3 = e.clientX;
- pos4 = e.clientY;
- document.onmouseup = closeDragElement;
- // call a function whenever the cursor moves:
- document.onmousemove = elementDrag;
- }
- function elementDrag(e) {
- e = e || window.event;
- // calculate the new cursor position:
- pos1 = pos3 - e.clientX;
- pos2 = pos4 - e.clientY;
- pos3 = e.clientX;
- pos4 = e.clientY;
- // set the element's new position:
- elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
- elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
- }
- function closeDragElement() {
- /* stop moving when mouse button is released:*/
- document.onmouseup = null;
- document.onmousemove = null;
- }
- }
- //-----------------------------------------------------
- // Fav/Courriers
- //-----------------------------------------------------
- function loadYoutube(profil) {
- document.getElementById("youtubeFav").innerHTML = "";
- httpGetAsync("https://avenoel.org/profil/" + profil, function(html) {
- var button = createElem(document.getElementById("youtubeFav"), imgDelete);
- button.onclick = function() {
- document.getElementById("youtubeFav").innerHTML = "";
- };
- var innerHTML = space + space + "Pas de musique."
- if (html.getElementsByTagName("iframe")[0]) {
- innerHTML =
- "<iframe src=\""+
- html.getElementsByTagName("iframe")[0].src.split("?")[0]+
- "\"> </iframe>";
- }
- createElem(document.getElementById("youtubeFav"), innerHTML);
- });
- }
- function ajouterBarFav() {
- var barFav = document.getElementsByClassName("col-md-3 col-sm-12 col-xs-12 pull-right hidden-sm hidden-xs");
- if (barFav.length === 0) {
- return;
- }
- var idCourrier = getId();
- var idFavoris = getId();
- barFav[0].replaceChild(barFav[0].children[0].cloneNode(true), barFav[0].children[0]);
- var listDiv = barFav[0].children[1];
- listDiv.classList = [];
- listDiv.innerHTML =
- "<section>"+
- //" <div><iframe src=\"https://www.youtube.com/embed/xh_bqcyqp64\"> </iframe></div>"+
- " <div id=\"youtubeFav\"></div>"+
- " <div id=\"alertversion\"></div>"+
- " <div id=\""+idCourrier+"\"></div>"+
- " <div id=\""+idFavoris+"\"></div>"+
- "</section>";
- var rect = listDiv.getBoundingClientRect(),
- scrollTop = window.pageYOffset || document.documentElement.scrollTop;
- var top = rect.top + scrollTop;
- var event = function(e) {
- if (window.scrollY > top) {
- listDiv.style.position = "absolute";
- listDiv.style.top = window.scrollY + 'px';
- } else {
- listDiv.style.position = null;
- listDiv.style.top = top + 'px';
- }
- };
- window.addEventListener('scroll', event);
- event.apply();
- var setMails = function(){
- httpGetAsync("https://avenoel.org/messagerie", function (html) {
- var mails = html.getElementsByClassName("active");
- if (mails.length > 2) {
- profil.nbMail = "(" + (mails.length-2) + ") ";
- var innerHTMLCourrier = "Courrier" + ((mails.length-2) > 1 ? "s" : "") + " (" + (mails.length-2) + ")";
- for(var i = 1; i < mails.length -1; ++i) {
- innerHTMLCourrier += "<li>";
- innerHTMLCourrier += mails[i].getElementsByClassName("author")[0].innerHTML + " : ";
- innerHTMLCourrier += mails[i].getElementsByClassName("title")[0].innerHTML;
- innerHTMLCourrier += "</li>";
- }
- document.getElementById(idCourrier).innerHTML = innerHTMLCourrier;
- } else {
- profil.nbMail = "";
- document.getElementById(idCourrier).innerHTML = "";
- }
- changeTitle();
- });
- };
- setInterval(setMails, 30000);
- setMails.apply();
- var setFavs = function(){
- httpGetAsync("https://avenoel.org/favoris", function (html) {
- var list = html.getElementsByTagName("tBody")[0].children;
- var buttonBar = document.getElementById(idFavoris);
- var innerHTMLFav = "Favoris";
- var hasNoneRead = false;
- profil.quoted = "";
- for(var i = 0; i < list.length; i++) {
- var fav = list[i];
- var sNbDiff = "";
- var nbDiff = 0;
- var href = fav.children[1].children[0].href;
- var nb = fav.children[3].innerHTML.trim();
- if (fav.children[0].children[0].href === window.location.href) {
- favs[href] = nb;
- localStorage.setItem("favs", JSON.stringify(favs));
- }
- if (favs[href]) {
- if( favs[href] !== nb) {
- nbDiff = (nb - favs[href]);
- sNbDiff = "(" + nbDiff + ") ";
- hasNoneRead = true;
- }
- } else {
- favs[href] = nb;
- localStorage.setItem("favs", JSON.stringify(favs));
- }
- var hrefEnd = fav.children[0].children[0].href;
- fav.children[1].children[0].href = hrefEnd;
- fav.removeChild(fav.children[2]);
- fav.removeChild(fav.children[2]);
- fav.removeChild(fav.children[2]);
- fav.removeChild(fav.children[0]);
- var idLi = getId();
- innerHTMLFav += "<li id=\"" + idLi + "\">" + sNbDiff + fav.innerHTML + "</li>";
- if (nbDiff !== 0) {
- scanQuote(hrefEnd, nbDiff, idLi);
- }
- }
- document.getElementById(idFavoris).innerHTML = innerHTMLFav;
- profil.noneRead = hasNoneRead ? "*" : "";
- changeTitle();
- });
- };
- setInterval(setFavs, 30000);
- setFavs.apply();
- }
- function changeTitle() {
- document.title = profil.nbMail + profil.noneRead + profil.quoted + profil.tabName;
- }
- function scanQuote(href, nb, idLi) {
- deepScan(href, nb, idLi);
- }
- function deepScan(href, nb, idLi) {
- httpGetAsync(href, function (html) {
- var commentaires = html.getElementsByClassName("topic-messages")[0].children;
- for (var i = commentaires.length - 1; i > -1 && nb !== 0; i--) {
- nb--;
- var children = commentaires[i].children[1].children;
- if (isQuoted(children[1].innerHTML, children[0].children[1].children[0].innerHTML)) {
- document.getElementById(idLi).children[0].style.color = "red";
- nb = 0;
- profil.quoted = "! ";
- break;
- }
- }
- if (nb > 0) {
- deepScan(getPageFromUrl(href, false) , nb, idLi);
- }
- changeTitle();
- });
- }
- function isQuoted(innerHTML, author) {
- return stringContents(innerHTML, "https://avenoel.org/profil/" + profil.name + "\"")
- || author === "MrPointVult" && stringContents(innerHTML, "@tous")
- || stringContents(innerHTML, "@" + profil.name);
- }
- //-----------------------------------------------------
- // Topic
- //-----------------------------------------------------
- function traiterTopic() {
- overloadButtonDeleteTopic();
- var maxPage = window.location.href;
- var lstTopic = document.getElementsByClassName("topic-messages");
- var trsTopic = lstTopic[0].children;
- var body = document.body,
- html = document.documentElement;
- var height = Math.max( body.scrollHeight, body.offsetHeight,
- html.clientHeight, html.scrollHeight, html.offsetHeight );
- var textArea = document.getElementsByTagName("textarea")[document.getElementsByTagName("textarea").length - 1];
- var event = function(e) {
- if (
- textArea !== document.activeElement &&
- document.body.scrollHeight === window.scrollY + window.innerHeight
- ) {
- maxPage = getPageFromUrl(maxPage, true);
- httpGetAsync(maxPage, function (html) {
- var nbPage = html.getElementsByTagName("title")[0].innerHTML.match(/Page [0-9]+ /g);
- if(nbPage[0] === "Page 1 ") {
- return;
- }
- var size = lstTopic[0].children.length;
- lstTopic[0].innerHTML += "<div>"+nbPage+"</div>" + html.getElementsByClassName("topic-messages")[0].innerHTML;
- enhanceListTopicMessage(lstTopic[0].children, size);
- });
- }
- };
- window.addEventListener('scroll', event);
- httpGetAsync(getPageFromUrl(maxPage, false), function (html) {
- var nbPage = html.getElementsByTagName("title")[0].innerHTML.match(/Page [0-9]+ /g);
- if(nbPage[0] === "Page 0 ") {
- enhanceListTopicMessage(trsTopic);
- return;
- }
- var messages = html.getElementsByClassName("topic-messages")[0].children;
- lstTopic[0].insertBefore(createElem(html.getElementsByClassName("topic-messages")[0], "<div>Page actuelle</div>"), lstTopic[0].firstChild);
- lstTopic[0].insertBefore(messages[19], lstTopic[0].firstChild);
- lstTopic[0].insertBefore(messages[18], lstTopic[0].firstChild);
- enhanceListTopicMessage(trsTopic);
- });
- traiterNavBarTopic();
- }
- function enhanceListTopicMessage(trsTopic, start) {
- var iTopic = 0;
- if (start) {
- iTopic = start;
- }
- for(; iTopic < trsTopic.length; ++iTopic) {
- traiterTrTopic(trsTopic[iTopic]);
- collapseQuote(trsTopic[iTopic]);
- overloadButtons(trsTopic[iTopic]);
- }
- }
- function findNewTop(isUp, listTop) {
- for(var i = 0; i < listTop.length - 1; ++i) {
- if (listTop[i] <= window.scrollY && window.scrollY <= listTop[i + 1]) {
- return isUp ? listTop[i] : listTop[i + 1];
- }
- }
- }
- function traiterNavBarTopic() {
- var relativePath = "";
- getPath().split("-").splice(2).forEach(function(split) {
- relativePath += split + "-";
- });
- relativePath = relativePath.slice(0, -1);
- var buttons = addButtonToNavBar(["buttonBan"]);
- var buttonBan = buttons[0];
- // Bouton des bans
- var isInBan = contentsString(bans, relativePath) != -1;
- if (isInBan) {
- buttonBan.innerHTML = "DEBAN";
- buttonBan.onclick = function() {
- deleteFromCache(bans, "bans");
- };
- } else {
- buttonBan.innerHTML = "BAN";
- buttonBan.onclick = function() {
- addInCache(bans, "bans");
- };
- }
- }
- function addInCache(cacheList, cacheName) {
- console.log("addInCache : " + cacheName);
- cacheList.push(getPath());
- localStorage.setItem(cacheName, JSON.stringify(cacheList));
- ajouterBarFav();
- traiterNavBarTopic();
- }
- function deleteFromCache(cacheList, cacheName) {
- console.log("deleteFromCache : " + cacheName);
- var relativePath = "";
- getPath().split("-").splice(2).forEach(function(split) {
- relativePath += split + "-";
- });
- relativePath = relativePath.slice(0, -1);
- var i = contentsString(cacheList, relativePath);
- if (i !== -1) {
- cacheList.splice(i, 1);
- localStorage.setItem(cacheName, JSON.stringify(cacheList));
- }
- ajouterBarFav();
- traiterNavBarTopic();
- }
- function traiterTrTopic(tr) {
- if (tr.children.length === 0) {
- return;
- }
- if (tr.innerHTML.split("<iframe title=\"YouTube video player\"").length > 20) {
- tr.getElementsByClassName("message-content")[0].innerHTML = "<b><i>Message supprimé pour cause de flood.</i></b>";
- return;
- }
- var name = tr.getElementsByClassName("message-username")[0].children[0];
- if (profilUsers[name.innerHTML]) {
- if (profilUsers[name.innerHTML].color) {
- name.style.color = profilUsers[name.innerHTML].color;
- }
- if (profilUsers[name.innerHTML].pdp) {
- tr.getElementsByClassName("message-avatar")[0].children[0].src = profilUsers[name.innerHTML].pdp;
- }
- if (profilUsers[name.innerHTML].isHidePdp) {
- tr.children[0].children[0].children[0].src = "http://4.bp.blogspot.com/-MdNpMeXfP3k/UYkDoyQ32VI/AAAAAAAAcNU/q3Dnc5zB4Ic/s1600/Blocage.jpg";
- }
- if (profilUsers[name.innerHTML].name) {
- name.innerHTML = profilUsers[name.innerHTML].name;
- }
- }
- var message = null;
- var rank = -1;
- // Suppression des FDP
- banProfiles.some(function(connard) {
- var id = getId();
- message = null;
- if (hasProfilLink(tr, connard.name)) {
- message = "<div id=\"" + id + "\"><span>Réponse sur" + space + "</span><a href=\"https://avenoel.org/profil/" + connard.name + "\">" + connard.name + "</a></div>";
- }
- if (hasProfilAvatar(tr, connard.name)) {
- message = "<div id=\"" + id + "\"><span>Message de" + space + "</span><a href=\"https://avenoel.org/profil/" + connard.name + "\">" + connard.name + "</a></div>";
- }
- if (message !== null) {
- rank = connard.rank;
- return true;
- }
- return false;
- });
- if (rank == 2) {
- tr.innerHTML = message;
- tr.focus();
- } else {
- addButtonHiddenTopicMessage(tr, rank == 1);
- }
- if (tr.getElementsByTagName("ul")[0]) {
- var buttonYoutube = createElem(tr.getElementsByTagName("ul")[0],
- "<button style=\"background-color:transparent;border:none;\"><li><img class=\"board-noelshack\" src=\"http://simpleicon.com/wp-content/uploads/music-note-1.png\"></li></button>");
- buttonYoutube.onclick = function() {
- loadYoutube(name.innerHTML);
- }
- }
- return tr.offsetTop;//getBoundingClientRect().top + window.pageYOffset;
- }
- function collapseQuote(tr) {
- var content = tr.getElementsByClassName("message-content")[0];
- if (!content) {
- return;
- }
- var lines = content.innerHTML.match(/[^\r\n]+/g);
- var ids = [];
- var currentLine;
- var lastRank = -1;
- var currentRank = -1;
- for(var i = lines.length - 1; i > -1; --i) {
- currentRank = calculRank(lines[i]);
- if (lastRank !== -1 && Math.abs(currentRank - lastRank) > 1) {
- var err = tr.getElementsByClassName("message-edited hidden-xs")[0];
- err.style.display = "";
- err.innerHTML = "Erreur lors du masquage des citations.";
- return;
- }
- if (lastRank > 0 && currentRank > lastRank) {
- lines.splice(i + 1, 0, "</div>");
- } else if (currentRank > 0 && currentRank < lastRank) {
- var idButton = getId();
- var idDiv = getId();
- var beforeButton = "";
- for(var iGt = 0; iGt < currentRank; ++iGt) {
- beforeButton += "> ";
- }
- var buttonAll = "";
- if (currentRank === 1) {
- var idButtonAll = "buttonAll" + getId();
- buttonAll = "<button id=\"" + idButtonAll + "\" ></button>";
- ids.push({idButton:idButtonAll, idDiv:idDiv});
- }
- var maskInnerHTML = "<span class=\"message-content-quote\">" + beforeButton + "<i><button id=\"" + idButton + "\" ></button>" + buttonAll + "</i></span><div id=\"" + idDiv + "\" >";
- ids.push({idButton:idButton, idDiv:idDiv});
- lines.splice(i + 1, 0, maskInnerHTML);
- }
- lastRank = currentRank;
- }
- content.innerHTML = lines.join('');
- addCollapseEvent(tr, ids);
- }
- function addCollapseEvent(tr, ids) {
- ids.forEach(function(id) {
- var button = document.getElementById(id.idButton);
- button.style.border = "none";
- button.innerHTML = ">";
- button.style.textAlign = "center";
- var div = document.getElementById(id.idDiv);
- div.style.display = "none";
- if (id.idButton.startsWith("buttonAll")) {
- button.innerHTML = "=>";
- button.onclick = function() {
- button.innerHTML = button.innerHTML === "<=" ? "=>" : "<=";
- var innerHTML = button.innerHTML === "<=" ? "<" : ">";
- var buttonList = div.getElementsByTagName("button");
- for (var i = 0; i < buttonList.length; i++) {
- buttonList[i].innerHTML = innerHTML;
- }
- var divList = div.getElementsByTagName("div");
- var display = button.innerHTML === "<=" ? "" : "none";
- div.style.display = display;
- for (var j = 0; j < divList.length; j++) {
- divList[j].style.display = display;
- }
- button.previousSibling.innerHTML = button.innerHTML === "<=" ? "<" : ">";
- };
- } else {
- button.onclick = function() {
- button.innerHTML = button.innerHTML === "<" ? ">" : "<";
- div.style.display = div.style.display === "none" ? "" : "none";
- if (button.nextSibling !== null) {
- button.nextSibling.innerHTML = button.innerHTML === "<" ? "<=" : "=>";
- }
- };
- }
- });
- }
- function calculRank(line) {
- var rank = -1;
- var index;
- var matcher = "quote\">> ";
- while (index != -1) {
- rank++;
- index = line.indexOf(matcher);
- matcher += "> ";
- }
- return rank;
- }
- function addButtonHiddenTopicMessage(tr, isHidden) {
- var aside = tr.getElementsByClassName("message-aside hidden-xs")[0];
- if (!aside) {
- return;
- }
- var content = tr.getElementsByClassName("message-content")[0];
- var header = tr.getElementsByClassName("message-header")[0];
- var ulHeader = header.getElementsByClassName("message-actions")[0];
- var footer = tr.getElementsByClassName("message-footer")[0];
- var idButton = getId();
- content.isHidden = isHidden;
- var innerButton = content.isHidden ? "Afficher" : "Masquer";
- ulHeader.innerHTML = "<button id=\"" + idButton + "\" >" + innerButton + "</button>" + ulHeader.innerHTML;
- var imageUp = "<li><img src=\"https://img-fi-n2.akamaized.net/icons/svg/53/53604.svg\"></li>";
- var imageDown = "<li><img src=\"https://img-fi-n2.akamaized.net/icons/svg/53/53598.svg\" alt=\"Icône citation\"></li>";
- var button = document.getElementById(idButton);
- button.style.backgroundColor = "Transparent";
- button.style.border = "none";
- button.onclick = function() {
- content.isHidden = !content.isHidden;
- button.innerHTML = content.isHidden ? imageUp : imageDown;
- content.style.display = content.isHidden ? "none" : "";
- footer.style.display = content.isHidden ? "none" : "";
- aside.style.display = content.isHidden ? "none" : "";
- };
- content.isHidden = !content.isHidden;
- button.onclick.apply();
- }
- function overloadButtons(tr) {
- var header = tr.getElementsByClassName("message-header")[0];
- if (!header) {
- return;
- }
- var imgs = header.getElementsByTagName("img");
- var img;
- for(var i = 0; i < imgs.length; ++i) {
- if (imgs[i].src === "https://avenoel.org/images/topic/delete.png") {
- img = imgs[i];
- }
- }
- if (!img) {
- return;
- }
- var button = img.parentElement;
- var href = button.href;
- button.href = "#";
- button.onclick = function() {
- if (window.confirm("Voulez vous supprimer le message ?")) {
- window.location.href = href;
- }
- };
- }
- function overloadButtonDeleteTopic() {
- var buttons = document.getElementsByClassName("btn btn-danger");
- if (!buttons) {
- return;
- }
- for(var i = 0; i < buttons.length; ++i) {
- var button = buttons[i];
- button.href2 = button.href;
- button.href = "#";
- button.onclick = function() {
- if (window.confirm("Voulez vous " + this.innerHTML.toLowerCase() + " le topic ?")) {
- window.location.href = this.href2;
- }
- };
- }
- }
- //-----------------------------------------------------
- // Forum
- //-----------------------------------------------------
- function traiterForum() {
- if (window.location.href.indexOf("?") !== -1) {
- return;
- }
- var page = Number(getPath().split("/")[4]);
- if (!page) {
- page = 1;
- }
- page = (page-1)*2 + page;
- httpGetAsync("https://avenoel.org/forum/"+(page+1), function (html1) {
- httpGetAsync("https://avenoel.org/forum/"+(page+2), function (html2) {
- var innerHTML2 = traiterTrsForum(html2).getElementsByClassName("table table-striped topics")[0].children[1].innerHTML;
- document.getElementsByClassName("table table-striped topics")[0].children[1].innerHTML += innerHTML2;
- });
- var innerHTML1 = traiterTrsForum(html1).getElementsByClassName("table table-striped topics")[0].children[1].innerHTML;
- document.getElementsByClassName("table table-striped topics")[0].children[1].innerHTML += innerHTML1;
- });
- traiterTrsForum(document);
- }
- function traiterTrsForum(html) {
- var trs = html.getElementsByClassName("table table-striped topics")[0].children[1].children;
- for(var i = 0; i < trs.length; ++i) {
- traiterTrForum(trs[i]);
- }
- return html;
- }
- function traiterTrForum(tr) {
- var name = tr.getElementsByClassName("topics-author")[0].children[0];
- if (profilUsers[name.innerHTML]) {
- if (profilUsers[name.innerHTML].color) {
- name.style.color = profilUsers[name.innerHTML].color;
- }
- if (profilUsers[name.innerHTML].name) {
- name.innerHTML = profilUsers[name.innerHTML].name;
- }
- }
- // Suppression des caracteres ching chong
- // if (tr.innerText.match(/[\u3400-\u9FBF]/) || tr.innerText.match(/[\u0250-\u02AF)]/)) {
- // console.log("Suppression des caracteres ching chong");
- // tr.innerHTML = "";
- // return;
- // }
- var test = [];// document.getElementsByClassName("topic-icon");
- for(var i = 0; i < test.length; ++i) {
- test[i].children[0].children[0].src = "https://i.imgur.com/K5gqpN2.png";
- }
- //
- // Suppression des FDP
- if (banProfiles.some(function(connard) {
- if (hasProfilLink(tr, connard.name)) {
- console.log("Suppression du FDP : " + connard.name);
- tr.innerHTML = "";
- return true;
- }
- return false;
- })) {
- return;
- }
- if (bans.some(function(url) {
- if (hasUrl(tr, url)) {
- console.log("Suppression du sujet : " + url);
- tr.innerHTML = "";
- return true;
- }
- return false;
- })) {
- return;
- }
- if (bansRegex.some(function(regex) {
- if (tr.innerHTML.match(new RegExp(regex, "gm"))) {
- console.log("Suppression du sujet regex : " + regex);
- tr.innerHTML = "";
- return true;
- }
- return false;
- })) {
- return;
- }
- // Surlignage
- if (favProfiles.some(function(surligne) {
- if (hasProfilLink(tr, surligne.name)) {
- console.log("Surlignage : " + surligne.name);
- tr.style.background = colorListProfil[surligne.color];
- return true;
- }
- return false;
- })) {
- return;
- }
- }
- //-----------------------------------------------------
- // Profil
- //-----------------------------------------------------
- function traiterProfil() {
- var isMine = profil.name === document.getElementsByTagName("h2")[0].innerHTML;
- currentProfile = window.location.href.substring("https://avenoel.org/profil/".length);
- // Partie droite
- var elem = document.getElementsByClassName("profile-wrapper-right");
- elem[0].innerHTML += "<div " + (isMine ? "hidden" : "") + ">Banni de rang <select id=\"idBanRank\"></select><div id=\"idBanRankDetail\"></div></div>";
- elem[0].innerHTML += "<div>Topic couleur <select id=\"idFavColor\"></select><br/></div>";
- elem[0].innerHTML += "<div>Profil couleur <select id=\"idProfilColor\"></select><br/></div>";
- elem[0].innerHTML += "<div>Profil name <input class=\"profile-biography\" id=\"idProfilName\" type=\"text\" style=\"height: 30px;\" placeholder=\"" + currentProfile + "\"/></div>";
- elem[0].innerHTML += "<div>Profil photo <input class=\"profile-biography\" id=\"idProfilPhoto\" type=\"text\" style=\"height: 30px;\" placeholder=\"Pas de photo\"/></div>";
- elem[0].innerHTML += "<div>Ami : <input class=\"profile-biography\" id=\"idProfilFriend\" type=\"checkbox\" /></div>";
- elem[0].innerHTML += "<div>Cacher pdp : <input class=\"profile-biography\" id=\"idProfilHidePdp\" type=\"checkbox\" /></div>";
- // ami --------------------------------------------------------------
- if (profilUsers[currentProfile] && profilUsers[currentProfile].isFriend) {
- document.getElementById("idProfilFriend").checked = true;
- }
- document.getElementById("idProfilFriend").onclick = function(e) {
- updateFriendProfil(e.currentTarget.checked);
- };
- // pdp --------------------------------------------------------------
- if (profilUsers[currentProfile] && profilUsers[currentProfile].isHidePdp) {
- document.getElementsByClassName("profile-avatar")[0].children[0].src = "http://4.bp.blogspot.com/-MdNpMeXfP3k/UYkDoyQ32VI/AAAAAAAAcNU/q3Dnc5zB4Ic/s1600/Blocage.jpg";
- document.getElementById("idProfilHidePdp").checked = (profilUsers[currentProfile] && profilUsers[currentProfile].isHidePdp);
- }
- document.getElementById("idProfilHidePdp").onclick = function(e) {
- updateHidePdp(e.currentTarget.checked);
- };
- if (profilUsers[currentProfile] && profilUsers[currentProfile].pdp) {
- document.getElementsByClassName("profile-avatar")[0].children[0].src = profilUsers[currentProfile].pdp;
- }
- document.getElementById("idProfilPhoto").onkeypress = function(e) {
- if (e.charCode === 13) {
- updatePhotoProfil(document.getElementById("idProfilPhoto").value);
- }
- };
- // name -------------------------------------------------------------
- if (profilUsers[currentProfile] && profilUsers[currentProfile].name) {
- document.getElementsByClassName("profile-title")[0].children[0].innerHTML = profilUsers[currentProfile].name;
- }
- document.getElementById("idProfilName").onkeypress = function(e) {
- if (e.charCode === 13) {
- renameProfil(document.getElementById("idProfilName").value);
- }
- };
- // color list -------------------------------------------------------
- var colorList = [];
- for (var iColor = 0; iColor < colorListProfil.length; iColor++) {
- colorList.push(iColor);
- }
- // color ------------------------------------------------------------
- var hasColor = false;
- var colorProfil;
- if (profilUsers[currentProfile]) {
- colorProfil = profilUsers[currentProfile].color;
- colorizeProfil(colorProfil);
- }
- createComboBox("idProfilColor", colorList);
- var comboProfilColor = document.getElementById("idProfilColor");
- for (var k = 0; k < comboProfilColor.length; k++) {
- comboProfilColor[k].innerHTML = "";
- comboProfilColor[k].style.backgroundColor = colorListProfil[k];
- }
- if (hasColor) {
- comboProfilColor.selectedIndex = parseInt(color);
- comboProfilColor.style.backgroundColor = colorListProfil[color];
- }
- comboProfilColor.onchange = function(event) {
- colorizeProfil(colorListProfil[event.target.selectedOptions[0].value]);
- };
- // favoris ----------------------------------------------------------
- var isFav = false;
- var color = 0;
- favProfiles.some(function(fav) {
- if (fav.name === currentProfile) {
- isFav = true;
- color = fav.color;
- return true;
- }
- return false;
- });
- createComboBox("idFavColor", colorList);
- var comboFavColor = document.getElementById("idFavColor");
- for (var j = 0; j < comboFavColor.length; j++) {
- comboFavColor[j].innerHTML = "";
- comboFavColor[j].style.backgroundColor = colorListProfil[j];
- }
- if (isFav) {
- comboFavColor.selectedIndex = parseInt(color);
- comboFavColor.style.backgroundColor = colorListProfil[color];
- }
- comboFavColor.onchange = function(event) {
- favProfile(event.target.selectedOptions[0].value);
- };
- // bans ----------------------------------------------------------
- detailRankProfile();
- var isBan = false;
- var rank = 0;
- banProfiles.forEach(function(connard) {
- if (connard.name === currentProfile) {
- isBan = true;
- rank = connard.rank;
- return;
- }
- });
- createComboBox("idBanRank", ["non","0","1","2"]);
- var comboBanRank = document.getElementById("idBanRank");
- if (isBan) {
- comboBanRank.selectedIndex = parseInt(rank) + 1;
- }
- detailRankProfile(rank);
- comboBanRank.onchange = function(event) {
- banProfile(event.target.selectedOptions[0].value);
- };
- // Partie gauche
- var elemLeft = document.getElementsByClassName("profile-wrapper-left")[0];
- var div = document.createElement('div');
- div.innerHTML = "<button>Statistiques</button>";
- var statsButton = div.firstChild;
- elemLeft.appendChild(statsButton);
- statsButton.onclick = function() {window.open('https://avenoel.org/stats/' + currentProfile);};
- div.remove();
- // Partie config
- if (isMine) {
- afficherConfig(isMine);
- }
- }
- function afficherConfig(isMine) {
- var container = document.getElementsByClassName("col-md-7 col-centered profile")[0];
- var editorContainer = container.appendChild(container.children[0].cloneNode(true));
- editorContainer.style.textAlign = "left";
- editorContainer.style.marginTop = "15px";
- editorContainer.innerHTML = "";
- var config = container.appendChild(container.children[0].cloneNode(true));
- config.style.textAlign = "left";
- config.style.marginTop = "15px";
- var idEditor = getId();
- var idTopic = getId();
- var idBannis = getId();
- var idTopicBannis = getId();
- var idCharts = getId();
- config.innerHTML =
- "<div>Liste mots clés de l'éditeur de texte :</div>"+
- "<div id=\"" + idEditor + "\"></div>"+
- "<br>"+
- "<div>Liste mots clés du masques des sujets :</div>"+
- "<div id=\"" + idTopic + "\"></div>"+
- "<br>"+
- "<div>Liste des bannis :</div>"+
- "<div id=\"" + idBannis + "\"></div>"+
- "<br>"+
- "<div>Liste des sujets bannis :</div>"+
- "<div id=\"" + idTopicBannis + "\"></div>";
- addEditorToProfil(editorContainer);
- createConfigEditor(document.getElementById(idEditor));
- createConfigTopic(document.getElementById(idTopic));
- createConfigBannis(document.getElementById(idBannis));
- createConfigTopicBannis(document.getElementById(idTopicBannis));
- }
- function addEditorToProfil(container) {
- if (true) {
- container.style.display = "none";
- }
- httpGetAsync("https://avenoel.org/forum", function (html) {
- var form = html.getElementsByTagName("form")[1];
- //var risi = html.getElementsByClassName("btn risi-wlogo")[0];
- // risi.formAction = "https://avenoel.org/forum/#risibank";
- // console.log(risi.formAction);
- container.appendChild(form.children[2]);
- container.appendChild(form.children[2]);
- container.appendChild(form.children[2]);
- enhanceTextArea();
- });
- }
- function createConfigEditor(container) {
- var lines = [];
- var innerHTML = "<li>";
- regexList.forEach(function (each) {
- var res;
- if (each.res.startsWith("https://")) {
- res = "<img class=\"board-noelshack\" src=\"" + each.res + "\">";
- } else {
- res = each.res;
- }
- var idButton = getId();
- innerHTML +=
- each.reg + " => " + res + space +
- "<button id=\"" + idButton + "\">" + imgDelete + "</button>" +
- "</li>" +
- "<li>";
- lines.push({id:idButton, each:each});
- });
- var idButtonPlus = getId();
- var idInputKey = getId();
- var idInputValue = getId();
- innerHTML +=
- "<input class=\"profile-biography\" id=\"" + idInputKey + "\" type=\"text\" style=\"height: 30px;\"/>" +
- " => " +
- "<input class=\"profile-biography\" id=\"" + idInputValue + "\" type=\"text\" style=\"height: 30px;\"/>" +
- "<button id=\"" + idButtonPlus + "\">" + imgEdit + "</button>" +
- "</li>";
- container.innerHTML = innerHTML;
- lines.forEach(function (line, i) {
- var button = document.getElementById(line.id);
- button.style.backgroundColor = "Transparent";
- button.style.border = "none";
- button.onclick = function() {
- regexList.splice(i, 1);
- localStorage.setItem("regexList", JSON.stringify(regexList));
- createConfigEditor(container);
- };
- });
- var buttonPlus = document.getElementById(idButtonPlus);
- buttonPlus.style.backgroundColor = "Transparent";
- buttonPlus.style.border = "none";
- buttonPlus.onclick = function() {
- regexList.push({reg:document.getElementById(idInputKey).value, res:document.getElementById(idInputValue).value});
- localStorage.setItem("regexList", JSON.stringify(regexList));
- createConfigEditor(container);
- };
- }
- function createConfigTopic(container) {
- var lines = [];
- var innerHTML = "<li>";
- bansRegex.forEach(function (each) {
- var idButton = getId();
- innerHTML +=
- each + space +
- "<button id=\"" + idButton + "\">" + imgDelete + "</button>" +
- "</li>" +
- "<li>";
- lines.push({id:idButton, each:each});
- });
- var idButtonPlus = getId();
- var idInputKey = getId();
- innerHTML +=
- "<input class=\"profile-biography\" id=\"" + idInputKey + "\" type=\"text\" style=\"height: 30px;\"/>" +
- "<button id=\"" + idButtonPlus + "\">" + imgEdit + "</button>" +
- "</li>";
- container.innerHTML = innerHTML;
- lines.forEach(function (line, i) {
- var button = document.getElementById(line.id);
- button.style.backgroundColor = "Transparent";
- button.style.border = "none";
- button.onclick = function() {
- bansRegex.splice(i, 1);
- localStorage.setItem("bansRegex", JSON.stringify(bansRegex));
- createConfigTopic(container);
- };
- });
- var buttonPlus = document.getElementById(idButtonPlus);
- buttonPlus.style.backgroundColor = "Transparent";
- buttonPlus.style.border = "none";
- buttonPlus.onclick = function() {
- bansRegex.push(document.getElementById(idInputKey).value);
- localStorage.setItem("bansRegex", JSON.stringify(bansRegex));
- createConfigTopic(container);
- };
- }
- function createConfigBannis(container) {
- var lines = [];
- var idButtonPlus = getId();
- var idInputKey = getId();
- var innerHTML =
- // "<li><input class=\"profile-biography\" id=\"" + idInputKey + "\" type=\"text\" style=\"height: 30px;\"/>" +
- // "<button id=\"" + idButtonPlus + "\">" + imgEdit + "</button>" +
- // "</li>"+
- "<ul style=\" columns: 3; -webkit-columns: 3; -moz-columns: 3;\">";
- banProfiles.forEach(function (each) {
- var idButton = getId();
- innerHTML +=
- "<li>"+
- each.name + " / " + each.rank + space +
- "<button id=\"" + idButton + "\">" + imgDelete + "</button>" +
- "</li>";
- lines.push({id:idButton, each:each});
- });
- innerHTML += "</ul>";
- container.innerHTML = innerHTML;
- lines.forEach(function (line, i) {
- var button = document.getElementById(line.id);
- button.style.backgroundColor = "Transparent";
- button.style.border = "none";
- button.onclick = function() {
- banProfiles.splice(i, 1);
- localStorage.setItem("banProfiles", JSON.stringify(banProfiles));
- createConfigBannis(container);
- };
- });
- // var buttonPlus = document.getElementById(idButtonPlus);
- // buttonPlus.style.backgroundColor = "Transparent";
- // buttonPlus.style.border = "none";
- // buttonPlus.onclick = function() {
- // banProfiles.push({reg:document.getElementById(idInputKey).value, res:document.getElementById(idInputValue).value});
- // localStorage.setItem("banProfiles", JSON.stringify(banProfiles));
- // createConfigBannis(container);
- // };
- }
- function createConfigTopicBannis(container) {
- var lines = [];
- var innerHTML = "";
- bans.forEach(function (each) {
- var idButton = getId();
- innerHTML += "<li>"+
- each + space +
- "<button id=\"" + idButton + "\">" + imgDelete + "</button>" +
- "</li>";
- lines.push({id:idButton, each:each});
- });
- container.innerHTML = innerHTML;
- lines.forEach(function (line, i) {
- var button = document.getElementById(line.id);
- button.style.backgroundColor = "Transparent";
- button.style.border = "none";
- button.onclick = function() {
- bans.splice(i, 1);
- localStorage.setItem("bans", JSON.stringify(bans));
- createConfigTopicBannis(container);
- };
- });
- }
- function updateHidePdp(isChecked) {
- if (isChecked) {
- updateProfilUser("isHidePdp", isChecked);
- } else {
- if (profilUsers[currentProfile]) {
- delete profilUsers[currentProfile].isHidePdp;
- localStorage.setItem("profilUsers", JSON.stringify(profilUsers));
- }
- }
- document.getElementsByClassName("profile-avatar")[0].children[0].src = "http://4.bp.blogspot.com/-MdNpMeXfP3k/UYkDoyQ32VI/AAAAAAAAcNU/q3Dnc5zB4Ic/s1600/Blocage.jpg";
- }
- function updateFriendProfil(isChecked) {
- if (isChecked) {
- updateProfilUser("isFriend", isChecked);
- } else {
- if (profilUsers[currentProfile]) {
- delete profilUsers[currentProfile].isFriend;
- localStorage.setItem("profilUsers", JSON.stringify(profilUsers));
- }
- }
- }
- function updatePhotoProfil(src) {
- if (src.trim().length === 0) {
- if (profilUsers[currentProfile]) {
- delete profilUsers[currentProfile].pdp;
- localStorage.setItem("profilUsers", JSON.stringify(profilUsers));
- }
- } else {
- updateProfilUser("pdp", src.trim());
- }
- document.getElementsByClassName("profile-avatar")[0].children[0].src = src;
- }
- function renameProfil(name) {
- if (name.trim().length === 0) {
- if (profilUsers[currentProfile]) {
- delete profilUsers[currentProfile].name;
- localStorage.setItem("profilUsers", JSON.stringify(profilUsers));
- }
- name = currentProfile;
- } else {
- updateProfilUser("name", name.trim());
- }
- document.getElementsByClassName("profile-title")[0].children[0].innerHTML = name;
- }
- function colorizeProfil(color) {
- document.getElementsByClassName("profile-title")[0].children[0].style.color = color;
- updateProfilUser("color", color);
- document.getElementById("idProfilColor").style.backgroundColor = color;
- }
- function updateProfilUser(property, value) {
- if (!profilUsers[currentProfile]) {
- profilUsers[currentProfile] = {};
- }
- profilUsers[currentProfile][property] = value;
- localStorage.setItem("profilUsers", JSON.stringify(profilUsers));
- }
- function favProfile(color) {
- console.log("favProfile : " + currentProfile + ", color : " + colorListProfil[color]);
- var index = -1;
- for(var i = 0; i < favProfiles.length; ++i) {
- if (stringContents(favProfiles[i].name, currentProfile)) {
- index = i;
- break;
- }
- }
- if (index !== -1) {
- favProfiles.splice(index, 1);
- localStorage.setItem("favProfiles", JSON.stringify(favProfiles));
- }
- if (color !== "0") {
- favProfiles.push({name:currentProfile, color:color});
- localStorage.setItem("favProfiles", JSON.stringify(favProfiles));
- }
- document.getElementById("idFavColor").style.backgroundColor = colorListProfil[color];
- }
- function banProfile(rank) {
- console.log("banProfile : " + currentProfile + ", rang : " + rank);
- var index = -1;
- for(var i = 0; i < banProfiles.length; ++i) {
- if (stringContents(banProfiles[i].name, currentProfile)) {
- index = i;
- break;
- }
- }
- if (index !== -1) {
- banProfiles.splice(index, 1);
- localStorage.setItem("banProfiles", JSON.stringify(banProfiles));
- }
- if (rank !== "non") {
- banProfiles.push({name:currentProfile, rank:rank});
- localStorage.setItem("banProfiles", JSON.stringify(banProfiles));
- }
- detailRankProfile(rank);
- }
- function detailRankProfile(rank) {
- var innerHTML;
- if (rank === "0") {
- innerHTML = "Ses sujets sont supprimés.";
- } else if (rank === "1") {
- innerHTML = "Ses sujets sont supprimés et ses messages sont masqués.";
- } else if (rank === "2") {
- innerHTML = "Ses sujets et messages sont supprimés.";
- } else {
- innerHTML = "Non banni.";
- }
- document.getElementById("idBanRankDetail").innerHTML = innerHTML;
- }
- //-----------------------------------------------------
- // Messagerie
- //-----------------------------------------------------
- function traiterMessagerie() {
- createFriendList();
- overideDeleteButtonMessagerie();
- var title = document.getElementsByTagName("thead")[0].children[0];
- title.insertBefore(title.children[1].cloneNode(true), title.children[1]);
- title.children[1].innerHTML = "COMMENTAIRE";
- var mails = document.getElementsByTagName("tbody")[0].children;
- for(var i = 0; i < mails.length; ++i) {
- mails[i].insertBefore(mails[i].children[1].cloneNode(true), mails[i].children[1]);
- getLastCommenter(mails[i].children[1], mails[i].children[0].children[0].href);
- }
- }
- function createFriendList() {
- var barFav = document.getElementsByClassName("col-md-3 col-sm-12 col-xs-12 pull-right hidden-sm hidden-xs");
- if (barFav.length === 0) {
- return;
- }
- //" <div style=\"display:flex;justify-content:center;align-items:center;\">"+
- var idFriendList = getId();
- var listDiv = barFav[0].children[0];
- listDiv.classList = [];
- listDiv.style.marginBottom = "20px";
- listDiv.innerHTML =
- "<section>"+
- "<div id=\""+idFriendList+"\"></div>"+
- "</section>";
- var sansAmi = true;
- var innerHTML = "Liste d'amis :";
- for (var user in profilUsers) {
- if (profilUsers[user].isFriend) {
- sansAmi = false;
- innerHTML +=
- "<li>"+
- " <span class=\"message-username \"><a href=\"https://avenoel.org/profil/" + user + "\" target=\"_blank\">" + user + "</a></span>"+
- " <span style=\"height:20px; width:20px;\">"+
- " <button id=\""+user+"\" style=\"background-color:transparent;border:none;\">"+
- " <img src=\"https://www.memoclic.com/medias/var/2014-10/Courrier-Windows-8.png\" style=\"height:20px; width:20px;\">"+
- " </button>"+
- " </span>"+
- "</li>";
- }
- }
- if (sansAmi) {
- innerHTML += "<img src=\"http://www.mon-diplome.fr/Diplome/700-291025-Diplome+du+sans+ami+++amie+++amis+++amies.jpg\" style=\"height:100%; width:100%;\">";
- }
- document.getElementById(idFriendList).innerHTML = innerHTML;
- var input = document.getElementsByTagName("input")[1];
- for (var user in profilUsers) {
- if (profilUsers[user].isFriend) {
- document.getElementById(user).onclick = function(event) {
- input.value = event.currentTarget.id;
- };
- }
- }
- }
- function onclickFirendMail(friend) {
- console.log(friend);
- }
- function getLastCommenter(node, href) {
- var replace = node.children[0].innerHTML;
- node.innerHTML = node.innerHTML.replace(replace, "error").replace(replace, "error");
- replace = "error";
- httpGetAsync(href, function (html) {
- var commentaires = html.getElementsByClassName("topic-messages")[0].children;
- var name = commentaires[commentaires.length-1].getElementsByClassName("message-username")[0].children[0].innerHTML;
- node.innerHTML = node.innerHTML.replace(replace, name).replace(replace, name);
- });
- }
- function overideDeleteButtonMessagerie() {
- var button = document.getElementsByClassName("btn btn-danger")[0];
- if (!button) {
- return;
- }
- button.parentElement.onsubmit = function() {
- return window.confirm("Voulez vous quittez le MP ?");
- };
- }
- //-----------------------------------------------------
- // Stats
- //-----------------------------------------------------
- function traiterStats() {
- currentProfile = getPath().split("/")[4];
- document.title = "Statistiques - " + currentProfile;
- deleteElement(document.getElementsByClassName("nav navbar-nav navbar-right hidden-xs hidden-sm navbar-user")[0]);
- deleteElement(document.getElementsByTagName("img")[1]);
- var idCharts = getId();
- document.getElementsByClassName("row container-content")[0].innerHTML =
- "<div class=\"col-xs-12 col-sm-12 col-md-9\">"+
- "<section style=\"text-align: center;\">"+
- "<div class=\"topic-messages\">Messages postés :</div>"+
- "<div id=\"" + idCharts + "\"><br/><div class=\"loader\" >"+imgLivraison+"</div></div>"+
- "<br>"+
- "<section>"+
- "</div>";
- createChartsEditor(idCharts);
- }
- var count = 0;
- function createChartsEditor(idCharts) {
- //var dateStart = new Date(2018, 3 - 1, 30);
- var dateStart = new Date();
- dateStart.setHours(0,0,0,0);
- var dateEnd;
- if (!dateEnd) {
- dateEnd = new Date();
- dateEnd.setDate(dateEnd.getDate() + 1);
- dateEnd.setHours(0,0,0,0);
- }
- var currentDate = new Date(dateStart.getTime());
- var labelsArray = {};
- while (currentDate < dateEnd) {
- labelsArray[currentDate.getString().splice(13, 6, "h")] = 0;
- currentDate.addHours(1);
- }
- findAllTopicsBetweenDates(0, dateStart, dateEnd, labelsArray);
- setTimeout(function () {
- console.log(count);
- var labels = [];
- var data = [];
- for (var prop in labelsArray) {
- data.push(labelsArray[prop]);
- labels.push(prop);
- }
- var config = {
- label: 'Nombre de commentaires',
- labels: labels,
- data: data
- //labels: ["a", "b", "c", "d", "e", "f"],
- //data: [12, 19, 3, 5, 2, 3]
- };
- //http://www.chartjs.org/docs/latest/charts/line.html
- createChartLine(document.getElementById(idCharts), config);
- }, 10000);
- }
- function findAllTopicsBetweenDates(page, dateStart, dateEnd, labelsArray) {
- httpGetApiAsync("topics?size=50", function(res1) {
- for(var i = 0; i < res1.data.length; ++i) {
- var date = new Date(res1.data[i].updated_at);
- if (date > dateStart && date < dateEnd) {
- for(var j = 0; j < (res1.data[i].messages_count[0].aggregate/50); ++j) {
- httpGetApiAsync("messages?reverse=true&with_user=true&size=50&topic_id="+res1.data[i].id+"&start=" + (j*50), function(res2) {
- count = count+1;
- for(var i = 0; i < res2.messages.length; ++i) {
- if (res2.messages[i].user.username === currentProfile) {
- var messageDate = res2.messages[i].updated_at;
- var date = new Date(messageDate);
- if (date > dateStart && date < dateEnd) {
- labelsArray[date.getString().splice(13, 6, "h")] = labelsArray[date.getString().splice(13, 6, "h")] + 1;
- }
- }
- }
- });
- }
- }
- }
- });
- }
- //-----------------------------------------------------
- // Utils
- //-----------------------------------------------------
- function deleteElement(element) {
- element.outerHTML = "";
- delete element;
- }
- function createImageButton(idButton, buttonHtml) {
- var button = document.getElementById(idButton);
- button.innerHTML = buttonHtml;
- return button;
- }
- function createComboBox(idParent, list) {
- var sel = document.getElementById(idParent);
- var optionoption = null;
- for(i = 0; i < list.length; i++) {
- optionoption = document.createElement('option');
- optionoption.value = list[i];
- optionoption.innerHTML = list[i];
- sel.appendChild(optionoption);
- }
- return sel;
- }
- function httpGetAsync(theUrl, callback) {
- var xmlHttp = new XMLHttpRequest();
- xmlHttp.onreadystatechange = function() {
- if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
- callback(new DOMParser().parseFromString(xmlHttp.responseText, "text/html"));
- };
- xmlHttp.open("GET", theUrl, true); // true for asynchronous
- xmlHttp.send(null);
- }
- function httpGetApiAsync(path, callback) {
- var xmlHttp = new XMLHttpRequest();
- xmlHttp.onreadystatechange = function() {
- if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
- callback(JSON.parse(xmlHttp.responseText));
- }
- };
- xmlHttp.open("GET", "https://avenoel.org/api/v1/" + path, true); // true for asynchronous
- xmlHttp.send(null);
- }
- function contentsString(list, match) {
- for(var i = 0; i < list.length; ++i) {
- if (stringContents(list[i], match)) {
- return i;
- }
- }
- return -1;
- }
- function getPath() {
- return url + window.location.pathname;
- }
- function designTopButton(button) {
- button.style.color = "white";
- button.style.backgroundColor = "transparent";
- button.style.border = "none";
- }
- function hasProfilLink(elem, name) {
- return stringContents(elem.innerHTML, "https://avenoel.org/profil/" + name + "\"");
- }
- function hasProfilAvatar(elem, name) {
- return stringContents(elem.innerHTML, "alt=\"Avatar de "+ name + "\"");
- }
- function hasUrl(elem, url) {
- return stringContents(elem.innerHTML, "<a href=\"" + url + "\">");
- }
- function stringContents(string, match) {
- return string.indexOf(match) !== -1;
- }
- function addButtonToNavBar(names) {
- var buttons = [];
- if (document.getElementById(names[0]) === null) {
- var navbar = document.getElementsByClassName("nav navbar-nav navbar-links");
- var innerHTML = "";
- names.forEach(function(name) {
- innerHTML += "<li class=\"\"><a><button id=\"" + name + "\" ></button></a></li>";
- });
- navbar[0].innerHTML += innerHTML;
- names.forEach(function(name) {
- designTopButton(document.getElementById(name));
- });
- }
- names.forEach(function(name) {
- buttons.push(document.getElementById(name));
- });
- return buttons;
- }
- function getId() {
- return "id" + id++;
- }
- function getPageFromUrl(url, next) {
- var split = url.split("-");
- if (next) {
- split[1]++;
- }else {
- split[1]--;
- }
- return split.join("-");
- }
- function createChartLine(container, config) {
- console.log(config.data);
- var idChart = getId();
- if (!document.getElementById(idChart)) {
- container.innerHTML = "<canvas id=\"" + idChart + "\" width=\"400\" height=\"400\"></canvas>";
- }
- var ctx = document.getElementById(idChart).getContext('2d');
- var myChart = new Chart(ctx, {
- type: 'line',
- data: {
- labels: config.labels,
- datasets: [{
- label: config.label,
- data: config.data,
- backgroundColor: [
- 'rgba(255, 99, 132, 0.2)'
- ],
- borderColor: [
- 'rgba(255,99,132,1)'
- ],
- borderWidth: 1
- }]
- },
- options: {
- scales: {
- yAxes: [{
- ticks: {
- beginAtZero:true
- }
- }]
- }
- }
- });
- }
- function createElem(parent, innerHTML) {
- var div = document.createElement('div');
- div.innerHTML = innerHTML;
- var elem = div.firstChild;
- parent.appendChild(elem);
- div.remove();
- return elem;
- }
- function invertColor(hex) {
- // invert color components
- var r = (255 - parseInt(hex.slice(4, 7))),
- g = (255 - parseInt(hex.slice(9, 12))),
- b = (255 - parseInt(hex.slice(14, 17)));
- return "rgb("+r+", "+g+", "+b+")";
- }
- function addStyle() {
- var colorBody = window.getComputedStyle(document.getElementsByTagName("body")[0]).getPropertyValue( "background-color" );
- var css =
- "ul li a:visited {color: grey;}"+
- ".loader { animation: spin 2s linear infinite; display: inline-block;}"+
- "@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }}"+
- "#idBtnScrollBackUp { display: none; position: fixed; bottom: 80px; left: 30px; z-index: 99; font-size: 18px; border: none; outline: none; background-color: "+colorBody+"; color: white; cursor: pointer; border-radius: 4px;}"+
- "#idBtnScrollBackUp:hover { background-color: "+invertColor(colorBody)+";}"+
- "#idBtnScrollBackDown { -webkit-transform: scaleY(-1); position: fixed; bottom: 20px; left: 30px; z-index: 99; font-size: 18px; border: none; outline: none; background-color: "+colorBody+"; color: white; cursor: pointer; border-radius: 4px;}"+
- "#idBtnScrollBackDown:hover { background-color: "+invertColor(colorBody)+";}"
- ;
- GM_addStyle(css);
- }
- //-----------------------------------------------------
- // Patch
- //-----------------------------------------------------
- //
- // https://openuserjs.org/scripts/ImThatGuy/AvenoelExt/source
- // https://avenoel.org/topic/40062-1-api-documentation-de-lapi-davenoel
- // https://pastebin.com/raw/geMuZm39
- var version = "3.22.1";
- // 3.23.0 : Pastebin => pastebin
- // 3.22.1 : Pastebin => pastebin
- // 3.22.0 : Pastebin => https://pastebin.com/raw/cVSGw209
- // + possibilite de citer quelqu'un avec @NomDeProfil (Apparaitra en rouge dans les favoris, si le sujet est en favoris)
- // + gestion du bug des citations
- // + correction du bug de la rechercher des sujets
- // + deplacement du bonton musique
- // 3.21.1 : Pastebin => https://pastebin.com/raw/hc3LYY6S
- // + correction d'un bug sur la 3.21.0 dans la 1ere page
- // 3.21.0 : Pastebin => https://pastebin.com/raw/CiP1fTge
- // + ajout des 2 derniers commentaires de la page précédente
- // 3.20.1 : Pastebin => https://pastebin.com/raw/h2TSHh2H
- // + changement des images des boutons pour aller en haut/bas de la page
- // 3.20.0 : Pastebin => https://pastebin.com/raw/rA2j1K3j
- // + affichage des musiques de profil
- // 3.19.0 : Pastebin => https://pastebin.com/raw/ZYmhNy7G
- // + ajout des boutons pour aller en haut/bas de la page
- // 3.18.0 : Pastebin => https://pastebin.com/raw/cWNkPAfe
- // + Ajout des statistiques à partir du profile
- // 3.17.2 : Pastebin => https://pastebin.com/raw/WV7jEvJh
- // + antiflood moins restrictif
- // 3.17.1 : Pastebin => https://pastebin.com/raw/F5xzCrFn
- // + correction d'encodage pastebin
- // 3.17.0 : Pastebin => https://pastebin.com/raw/bM2CsLGb
- // + correction bug 3.16.0
- // 3.16.0 : Pastebin => https://pastebin.com/raw/NwTQS5mX
- // + optimisation de la liste des sujets
- // + ajout d'un raccourci clavier pour la risibank
- // 3.15.0 : Pastebin => https://pastebin.com/raw/Nm0nTsb2
- // 3.14.0 : Pastebin => https://pastebin.com/raw/9qhpri2C
- // + affichage de 3 pages au lieu d'un pour les sujets.
- // 3.13.0 : Pastebin => https://pastebin.com/raw/tid89WKZ
- // + gestion des sujets bannis
- // 3.12.0 : Pastebin => https://pastebin.com/raw/eyyM9HKm
- // + modif de l'affichage de la version avec images random
- // 3.11.1 : Pastebin => https://pastebin.com/raw/JpfgCQKH
- // + correction bug (les pages d'un topic déjà visitées sont grisées)
- // 3.11.0 : Pastebin => https://pastebin.com/raw/20u9Q15N
- // + les pages d'un topic déjà visitées sont grisées.
- // 3.10.2 : Pastebin => sdfsdf
- // + correction du bug d'affichage de la mise à jour
- // 3.10.1 : Pastebin => https://pastebin.com/raw/D9r4eAax
- // + correction (risitas fav donc l'éditeur de texte)
- // 3.10.0 : Pastebin => https://pastebin.com/raw/SAXEV6L5
- // + risitas fav donc l'éditeur de texte
- // 3.9.0 : Pastebin => https://pastebin.com/raw/bUvBDs7z
- // + possibilité de masquer la pdp
- // 3.8.0 : Pastebin => https://pastebin.com/raw/BFjHXUtX
- // + ajout d'une liste d'ami dans la messagerie
- // 3.7.0 : Pastebin => https://pastebin.com/raw/A1U8UXs5
- // + affichage du dernier commentateur d'un MP
- // 3.6.0 : Pastebin => https://pastebin.com/raw/QDRm7nQn
- // + affichage sur l'onglet quand un topic en favoris a un nouveau message
- // + affichage sur l'onglet quand un topic en favoris vous cite
- // 3.5.0 : Pastebin => https://pastebin.com/raw/KWMc09GP
- // + changement des pdp de profil
- // 3.4.0 : Pastebin => https://pastebin.com/raw/aSCAu6hA
- // + changement des noms de profil
- // + changement des couleurs de profil
- // + suppression du controle des caractères ching chong et tamoul
- // 3.3.2 : Pastebin => https://pastebin.com/raw/tHBFbsmW
- // + suppression des caractere tamoul
- // 3.3.1 : Pastebin => https://pastebin.com/raw/L4U0Sd1Z
- // + correction du bug sur les surcharges des boutons
- // 3.3.0 : Pastebin => https://pastebin.com/raw/2RVx8RGc
- // + inifinte scroll
- // + correction bug sur les favoris en citation
- // 3.2.0 : Pastebin => https://pastebin.com/raw/9tfLr09X
- // + correction du bug sur les url avec cuck
- // + le favoris est surligné en rouge quand on est cité
- // 3.1.0 : Pastebin => https://pastebin.com/gFPB9jJA
- // + fin de la gestion des configs des données en cache
- // 3.0.0 : Pastebin => https://pastebin.com/6nFzmeFp
- // + début de la page de config dans le profil
- // + Ajout de la gestion des mots clés éditeur dans le profil
- // 2.6.0 : Pastebin => https://pastebin.com/17GWSM7A
- // + initialisation de la page de configuration de l'appli
- // + ajout du ban de topic par mots clés
- // + optimisation de l'affichage des sujets
- // 2.5.0 : Pastebin => https://pastebin.com/JKKB1RJi
- // + ajout d'une liste de mots clés qui seront transformés dans l'éditeur.
- // 2.4.0 : Pastebin => https://pastebin.com/JCfGHLZ4
- // + ajout des dialogs de confirmation pour la suppression des topics/messages et ignorer.
- // + ajout des modifs dans la notifs des patchs.
- // 2.3.0 : Pastebin => https://pastebin.com/QXe2AJ6v
- // + Ajout d'une popup de confirmation pour quitter les MP
- // 2.2.0 : Pastebin => https://pastebin.com/0gPthPD4
- // + ajout d'un bouton pour afficher/masquer toutes les citations.
- // + amélioration de l'affichage de la nouvelle version
- // 2.1.0 : https://pastebin.com/T2dP5ryX
- // + controle de la version
- // + affichage du nombre de postes dans les favoris depuis la dernière visite
- // + controle de la version
- // + affichage du nombre de postes dans les favoris depuis la dernière visite
- // 2.0.8 : Pastebin => https://pastebin.com/21a6u01a
- // + correction du bug sur les citations (redirection bas de page)
- // 2.0.7 : Pastebin => https://pastebin.com/cD6VqLUY
- // + correction d'un bug sur la barre des favoris
- // + ajout de nouvelles actions dans l'éditeur de texte
- // + la barre des courriers est rafraichie toutes les 30s
- // 2.0.6 : Pastebin => https://pastebin.com/GvTLjLaF
- // + l'élément favoris/courrier se déplace avec le scroll
- // 2.0.5 : Pastebin => https://pastebin.com/pNqRphzh
- // + ajout du nombre de courriers non lus sur l'onglet
- // + possibilité d'afficher/masquer les citiations (masquées par défaut)
- // 2.0.4 : Pastebin => https://pastebin.com/4mCdppfi
- // + affichage de la liste des favoris dans les topics noirs
- // + correction bug sur les BL
- // + optimisation des listes
- // 2.0.3 : Pastebin =>https://pastebin.com/nPvLrBbV
- // + correction du bug d'affichage des courriers
- // 2.0.2 : Pastebin => https://pastebin.com/haqi3XRa
- // + Modification du bouton pour afficher/masquer
- // 2.0.1 : Pastebin => https://pastebin.com/vNmgUrCs
- // + Le clique sur le favoris emmene à la dernière page
- // 2.0.0 : Pastebin => https://pastebin.com/eHCt5h8E
- // + Prise en compte de la liste de favoris (affichage reste à droite)
- // L'icone du fichier n'est pas encore mise
- // + Changement du bouton afficher/masquer un commentaire.
- // 1.1.0 : Pastebin => https://pastebin.com/85F6ydsC
- // + gestion de la lovelist sur les profils
- // + plus besoin d'aller dans le code pour gérer ses listes
- // 1.0.3 : Pastebin => https://pastebin.com/RNWPdyyF
- // + suppression de 'Courriers' quand la liste est vide
- // + gestion de la banlist sur les profils
- // 1.0.2 : https://pastebin.com/TJzUnw69
- // + ajout de la liste des messages non lus au niveau de la barre des favs
- // 1.0.1 : https://pastebin.com/mFv7z7wb
- // + correction du bug des bans de topics
- // + detection du favoris/ban à chaque page du topic
- // 1.0.0 : https://pastebin.com/bjVmYYgM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement