le_gang
2021-01-10 00:09:18
Le 10 janvier 2021 à 00:07:07 grosboulay30 a écrit :
Tu racontes quoi la en fait ?
tu sais par exemple pour le script DarkJvc ou Anti Spam ça sa sert à quoi et faut le mettre ou // ==UserScript==
// @name Filtre Anti-Spam MP
// @description Filtre les spams de MP sur JVC selon les patterns définis par l'utilisateur
// @version 11
// @match https://www.jeuxvideo.com/*
// @match https://m.jeuxvideo.com/*
// @match https://www.jeuxvideo.com/*
// @match https://m.jeuxvideo.com/*
// @author Tsr_crew & Alectrona
// @language fr
// @require http://code.jquery.com/jquery-3.4.1.min.js
// @grant GM.getValue
// @grant GM.setValue
// @namespace https://greasyfork.org/users/396340
// ==/UserScript==
var bl1 = [];
var bl2 = [];
var bl3 = [];
var bl1tags;
var bl2tags;
var bl3tags;
var nbrep;
var nbrepattendues;
document.getElementsByClassName('jv-account-number-mp')[0].className = "jv-account-number-mp";
var harcelement = document.getElementsByClassName('jv-nav-harassment-warning')[0];
harcelement.innerHTML = "";
harcelement.style.height = "27px";
harcelement.style.padding = "1px";
harcelement.style.textAlign = "center";
var node = document.createElement("input");
node.setAttribute("type", "button");
node.setAttribute("value", "Liste noire des pseudos");
node.setAttribute("style", "color:black;");
node.setAttribute("id", "editbl1");
harcelement.appendChild(node);
var node2 = document.createElement("input");
node2.setAttribute("type", "button");
node2.setAttribute("value", "Liste noire des objets");
node2.setAttribute("style", "color:black;");
node2.setAttribute("id", "editbl2");
harcelement.appendChild(node2);
var node3 = document.createElement("input");
node3.setAttribute("type", "button");
node3.setAttribute("value", "Liste noire des contenus");
node3.setAttribute("style", "color:black;");
node3.setAttribute("id", "editbl3");
harcelement.appendChild(node3);
document.getElementById('editbl1').onclick = function() {editbl1();};
document.getElementById('editbl2').onclick = function() {editbl2();};
document.getElementById('editbl3').onclick = function() {editbl3();};
document.getElementsByClassName('jv-account-number-mp')[0].onclick = function() {ctrcheck();};
function ctrcheck() {
spamchecker(false);
document.getElementsByClassName('jv-account-number-mp')[0].setAttribute('data-val', 0);
document.getElementsByClassName('jv-account-number-mp')[0].className = "jv-account-number-mp";
var mpluhash = document.getElementsByClassName('jv-nav-dropdown-link account-mp-reset')[0].dataset.url;
$.get('https://www.jeuxvideo.com' + mpluhash);
setTimeout(function(){
var docLinks = document.getElementsByClassName('jv-nav-dropdown-details');
var parent;
for(var i=0;i < docLinks.length; i++){
var k = 0;
var blmatch = 1;
while(k < bl1.length && blmatch == 1) {
var auth = docLinks[i].childNodes[0].innerHTML.toLowerCase();
var str = bl1[k];
if (str && auth.includes(str)) {
parent = docLinks[i].parentNode;
parent.style.display = "none";
// docLinks[i].className = "spammeur";
blmatch = 0;
}
k++;
}
var m = 0;
while(m < bl2.length && blmatch == 1) {
var auth2 = docLinks[i].childNodes[1].title.toLowerCase();;
var str2 = bl2[m];
if (str2 && auth2.includes(str2)) {
parent = docLinks[i].parentNode;
parent.style.display = "none";
// docLinks[i].className = "spammeur";
blmatch = 0;
}
m++;
}
}
}, 500);
}
function editbl1() {
var newbl1 = prompt("------------------------------- Saisissez les patterns de PSEUDOS à blacklister, séparés d'une virgule. (Insensible à la casse) -------------------------------", bl1tags);
if (newbl1 != null) {
newbl1 = newbl1.toLowerCase();
bl1tags = newbl1;
bl1 = newbl1.split(',');
GM.setValue("abl1", JSON.stringify(bl1));
var docLinks = document.getElementsByClassName('jv-nav-dropdown-details');
var parent;
for(var i=0;i < docLinks.length; i++){
var k = 0;
var blmatch = 1;
while(k < bl1.length && blmatch == 1) {
var auth = docLinks[i].childNodes[0].innerHTML.toLowerCase();
var str = bl1[k];
if (str && auth.includes(str)) {
parent = docLinks[i].parentNode;
parent.style.display = "none";
// docLinks[i].className = "spammeur";
blmatch = 0;