Remover IP Auto

Remover seu ip de todos os logs

  1. // ==UserScript==
  2. // @name Remover IP Auto
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Remover seu ip de todos os logs
  6. // @match http://*.hackerexperience.com/*
  7. // @match http://hackerexperience.com/*
  8. // @match https://*.hackerexperience.com/*
  9. // @match https://hackerexperience.com/*
  10. // @grant GM_setValue
  11. // @grant GM_getValue
  12. // @grant GM_addStyle
  13. // ==/UserScript==
  14. if (window.self !== window.top) return;
  15.  
  16. Array.prototype.contains = function(s) {
  17. return this.indexOf(s) !== -1;
  18. };
  19. String.prototype.contains = function(it) {
  20. return this.indexOf(it) != -1;
  21. };
  22. var g_IP = "";
  23. function PegarIP()
  24. {
  25. var IPTeste = document.getElementsByClassName("header-ip-show")[0].innerText.trim();
  26. if (IPTeste !== null && IPTeste !== undefined && IPTeste !== "" && IPTeste !== " " && IPTeste !== g_IP) {
  27. g_IP = IPTeste;
  28. }
  29. }
  30.  
  31. function Editar()
  32. {
  33. var Log = document.getElementsByClassName("logarea")[0];
  34. if( Log === null || Log === undefined || Log === "" || Log === " ")
  35. {
  36. return;
  37. }
  38. if($(".logarea").text() === ""){
  39. return;
  40. }
  41. var Linhas = $( ".logarea" ).text().split("\n");
  42. var StrDepois = "";
  43. var MeuIP = g_IP;
  44. if($( ".logarea" ).text().contains(MeuIP) === false)
  45. {
  46. return;
  47. }
  48. for(var i = 0; i < Linhas.length; i++ )
  49. {
  50. if(Linhas[i].contains(MeuIP))
  51. {
  52. continue;
  53. }else{
  54. if(i === Linhas.length - 1){
  55. StrDepois += Linhas[i];
  56. }else{
  57. StrDepois += Linhas[i] + "\n";
  58. }
  59. }
  60. }
  61. $( ".logarea" ).val( StrDepois );
  62. $( "form.log" ).submit();
  63. }
  64.  
  65. setTimeout(function() {
  66. PegarIP();
  67. Editar();
  68. }, 500);