Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2024
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 1.38 KB | Cybersecurity | 0 0
  1. // ==UserScript==
  2. // @name         Генератор хуйни
  3. // @namespace    Генератор_хуйни
  4. // @version      1.0
  5. // @description  Создай хуйню!
  6. // @author       Анонимус
  7. // @include      *://2ch.*
  8. // @icon         https://i.imgur.com/XK5x1Zr.png
  9. // @grant        none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13.     'use strict';
  14.  
  15.     for (const area of document.querySelectorAll('.postarea')) {
  16.         const button = document.createElement('div');
  17.         button.innerHTML = `<a style='user-select: none;'><strong>Насрать хуйни</strong></a>`;
  18.         area.parentNode.insertBefore(button, area.nextSibling.nextSibling.nextSibling);
  19.         button.onclick = () => {
  20.             for (const field of document.querySelectorAll('#shampoo')) field.value += paragraph();
  21.         };
  22.     }
  23. })();
  24.  
  25. const alphabet = `абвгдеёжзийклмнопстфцчшщъыьэюя`;
  26.  
  27. function letter() { return alphabet[Math.round(Math.random() * alphabet.length)] }
  28. function word() { return Array.apply(null, Array(2 + Math.round(Math.random() * 8))).map(letter).join('') }
  29. function sentence() { return Array.apply(null, Array(5 + Math.round(Math.random() * 7))).map(word).join(' ') }
  30. function paragraph() { return Array.apply(null, Array(5 + Math.round(Math.random() * 10))).map(sentence).map(s => s.charAt(0).toUpperCase() + s.slice(1)).join('. ') + '. ' }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement