Remover IP Auto

Remover seu ip de todos os logs

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Remover IP Auto
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Remover seu ip de todos os logs
// @match        http://*.hackerexperience.com/*
// @match        http://hackerexperience.com/*
// @match        https://*.hackerexperience.com/*
// @match        https://hackerexperience.com/*
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_addStyle
// ==/UserScript==
if (window.self !== window.top) return;

Array.prototype.contains = function(s) {
    return this.indexOf(s) !== -1;
};
String.prototype.contains = function(it) {
    return this.indexOf(it) != -1;
};
var g_IP = "";
function PegarIP()
{
    var IPTeste = document.getElementsByClassName("header-ip-show")[0].innerText.trim();
    if (IPTeste !== null && IPTeste !== undefined && IPTeste !== "" && IPTeste !== " " && IPTeste !== g_IP) {
        g_IP = IPTeste;
    }
}

function Editar()
{
    var Log = document.getElementsByClassName("logarea")[0];
    if( Log === null  || Log === undefined || Log === "" || Log === " ")
    {
        return;
    }
    if($(".logarea").text() === ""){
        return;
    }
    var Linhas = $( ".logarea" ).text().split("\n");
    var StrDepois = "";
    var MeuIP = g_IP;
    if($( ".logarea" ).text().contains(MeuIP) === false)
    {
        return;
    }
    for(var i = 0; i < Linhas.length; i++ )
    {
        if(Linhas[i].contains(MeuIP))
        {
            continue;            
        }else{
            if(i === Linhas.length - 1){
                StrDepois += Linhas[i];
            }else{
                StrDepois += Linhas[i] + "\n";
            }
            
        }
    }
    
    $( ".logarea" ).val( StrDepois );
    $( "form.log" ).submit();
}

setTimeout(function() {
    PegarIP();
    Editar();
}, 500);