Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.52 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Anti-410
  3. // @version 1.2
  4. // @description Stop la censure !
  5. // @author IngenieurJVC
  6. // @match http://www.jeuxvideo.com/forums*
  7. // @require http://330k.github.io/misc_tools/unicode_steganography.js
  8. // ==/UserScript==
  9.  
  10. (function() {
  11.  
  12.  
  13. //ajout du bouton
  14. var bloc = document.getElementsByClassName("col-md-12 bloc-editor-forum")[0];
  15. var btn_crypt = document.createElement("input");
  16. btn_crypt.type = "BUTTON";
  17. btn_crypt.value = "Chiffrer le message (et le titre pour un topic)";
  18. btn_crypt.className = "btn btn-poster-msg datalayer-push js-post-message";
  19. btn_crypt.onclick = crypt
  20. bloc.appendChild(btn_crypt);
  21.  
  22. //decryptage des posts
  23. var posts = document.getElementsByClassName("txt-msg text-enrichi-forum ");
  24. var pquotes = document.getElementsByClassName("blockquote-jv");
  25. var topics = document.getElementsByClassName("lien-jv topic-title");
  26. var nomtopic = document.getElementById("bloc-title-forum");
  27.  
  28. for(var i = 0; i < posts.length; ++i){
  29. decrypt_element(posts[i]);
  30. }
  31.  
  32. for(var i2 = 0; i2 < pquotes.length; ++i2){
  33. decrypt_element(pquotes[i2]);
  34. }
  35.  
  36. for(var i3 = 0; i3 < topics.length; ++i3){
  37. decrypt_element(topics[i3]);
  38. }
  39.  
  40. decrypt_element(nomtopic);
  41.  
  42.  
  43.  
  44. })();
  45.  
  46. function decrypt_element(_element){
  47.  
  48. var msg = _element.innerHTML.replace(/<(?:.|\n)*?>/gm, '');
  49. msg = unicodeSteganographer.decodeText(msg);
  50. msg = msg.hiddenText;
  51.  
  52. if(msg != ""){
  53. _element.innerHTML = msg;
  54. _element.style.color = "blue";
  55. }
  56.  
  57. return msg;
  58.  
  59. }
  60.  
  61. function crypt(){
  62.  
  63. var txtarea = document.getElementById("message_topic");
  64. var previsu = document.getElementsByClassName("previsu-editor text-enrichi-forum")[0];
  65.  
  66. var txttitre = document.getElementById("titre_topic");
  67. txttitre.value = unicodeSteganographer.encodeText("yo", txttitre.value);
  68.  
  69.  
  70. var quote = previsu.getElementsByClassName("blockquote-jv")[0];
  71. var text = previsu.innerHTML;
  72. var text3 = text;
  73.  
  74. if(quote){
  75. quote = quote.innerHTML;
  76. var text2 = text.replace(unicodeSteganographer.decodeText(quote).originalText.split('\n')[1], unicodeSteganographer.decodeText(text).hiddenText);
  77. text3 = text;
  78. }
  79.  
  80. if(true){
  81.  
  82. var Rep1 = ['ah', 'ok', 'ah ouais quand même', 'ok mon khey', 'cest a dire ?', 'ouais', 'non', 'mais', 'je sais pas perso', 'ah ouais chaud', 'je vois', 'okkkk', 'ah et ?', 'ouais t as vu'];
  83. var Rep2 = ['https://image.noelshack.com/fichiers/2018/26/7/1530476579-reupjesus.png', 'https://image.noelshack.com/fichiers/2018/29/6/1532128784-risitas33.png', 'https://image.noelshack.com/fichiers/2018/13/4/1522325846-jesusopti.png', 'https://image.noelshack.com/fichiers/2018/25/2/1529422413-risitaszoom.png', 'https://image.noelshack.com/fichiers/2018/10/1/1520256134-risitasue2.png', 'https://image.noelshack.com/fichiers/2016/30/1469541952-risitas182.png', ':hap:', ':noel:', ':(' ]
  84. var Rep3 = ['.', '..', '...', '?', '!', ' '];
  85. var RepF = " :hap: ";
  86.  
  87. Rep1 = Rep1[Math.floor(Math.random() * Rep1.length)];
  88. Rep2 = Rep2[Math.floor(Math.random() * Rep2.length)];
  89. Rep3 = Rep3[Math.floor(Math.random() * Rep3.length)];
  90.  
  91. RepF = Rep1 + " " + Rep2 + " " + Rep3;
  92.  
  93. var RepF2 = unicodeSteganographer.encodeText(RepF, text3);
  94.  
  95. txtarea.value = RepF2;
  96.  
  97. }
  98. else
  99. {
  100. alert("Désolé, le message est déjà chiffré ! ");
  101.  
  102. }
  103.  
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement