Guest User

фо фо втфа

a guest
Dec 21st, 2025
1,029
2
Never
10
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 7.20 KB | Source Code | 2 0
  1. // ==UserScript==
  2. // @name         Ганвест Текст Микс - Шнейне Пэпэ Фаа
  3. // @namespace    http://tampermonkey.net/
  4. // @version      1.0
  5. // @description  Миксует весь текст на странице с мемными словечками Ганвеста (фаа, втфаа, шнейне, пэпэ, кхе кхе)
  6. // @author       You
  7. // @match        *://*/*
  8. // @grant        none
  9. // @run-at       document-end
  10. // ==/UserScript==
  11.  
  12. (function() {
  13.     'use strict';
  14.  
  15.     // Массив мемных слов Ганвеста
  16.     const ganvestWords = [
  17.         'фаа',
  18.         'фа',
  19.         'втфаа',
  20.         'вотофо',
  21.         'шнейне',
  22.         'пэпэ',
  23.         'кхе кхе',
  24.         'кхе',
  25.         'фаа втфаа',
  26.         'кто так может пэпэ',
  27.         'фа хэ шнейне',
  28.         'шнайня'
  29.     ];
  30.  
  31.     // Настройки
  32.     const settings = {
  33.         probability: 0.75, // Вероятность вставки слова (0.15 = 15% слов будут заменены/дополнены)
  34.         insertMode: 'between', // 'between' - между словами, 'replace' - заменять слова, 'both' - и то и то
  35.         excludeDomains: ['youtube.com'], // Домены, где скрипт не работает
  36.         excludeTags: ['SCRIPT', 'STYLE', 'NOSCRIPT', 'IFRAME', 'SVG', 'CODE', 'PRE'] // Теги, которые не трогаем
  37.     };
  38.  
  39.     // Проверка, нужно ли запускать скрипт на этом домене
  40.     if (settings.excludeDomains.some(domain => window.location.hostname.includes(domain))) {
  41.         return;
  42.     }
  43.  
  44.     // Получаем случайное слово Ганвеста
  45.     function getRandomGanvestWord() {
  46.         return ganvestWords[Math.floor(Math.random() * ganvestWords.length)];
  47.     }
  48.  
  49.     // Обрабатываем текст
  50.     function processText(text) {
  51.         const words = text.split(/(\s+)/);
  52.         let result = [];
  53.  
  54.         for (let i = 0; i < words.length; i++) {
  55.             const word = words[i];
  56.  
  57.             if (word.trim() === '') {
  58.                 result.push(word);
  59.                 continue;
  60.             }
  61.  
  62.             const action = Math.random();
  63.  
  64.             if (action < settings.probability) {
  65.                 if (settings.insertMode === 'replace') {
  66.                     result.push(getRandomGanvestWord());
  67.                 } else if (settings.insertMode === 'between') {
  68.                     result.push(word);
  69.                     if (i < words.length - 1) {
  70.                         result.push(' ' + getRandomGanvestWord() + ' ');
  71.                     }
  72.                 } else if (settings.insertMode === 'both') {
  73.                     if (Math.random() < 0.5) {
  74.                         result.push(getRandomGanvestWord());
  75.                     } else {
  76.                         result.push(word);
  77.                         if (i < words.length - 1) {
  78.                             result.push(' ' + getRandomGanvestWord() + ' ');
  79.                         }
  80.                     }
  81.                 }
  82.             } else {
  83.                 result.push(word);
  84.             }
  85.         }
  86.  
  87.         return result.join('');
  88.     }
  89.  
  90.     function processTextNodes(element) {
  91.         const walker = document.createTreeWalker(
  92.             element,
  93.             NodeFilter.SHOW_TEXT,
  94.             {
  95.                 acceptNode: function(node) {
  96.  
  97.                     if (settings.excludeTags.includes(node.parentElement.tagName)) {
  98.                         return NodeFilter.FILTER_REJECT;
  99.                     }
  100.  
  101.                     if (node.textContent.trim() === '') {
  102.                         return NodeFilter.FILTER_REJECT;
  103.                     }
  104.                     return NodeFilter.FILTER_ACCEPT;
  105.                 }
  106.             }
  107.         );
  108.  
  109.         const nodesToProcess = [];
  110.         let currentNode;
  111.  
  112.  
  113.         while (currentNode = walker.nextNode()) {
  114.             nodesToProcess.push(currentNode);
  115.         }
  116.  
  117.  
  118.         nodesToProcess.forEach(node => {
  119.             try {
  120.                 const originalText = node.textContent;
  121.                 const processedText = processText(originalText);
  122.                 if (processedText !== originalText) {
  123.                     node.textContent = processedText;
  124.                 }
  125.             } catch (e) {
  126.                 console.error('Ошибка обработки узла:', e);
  127.             }
  128.         });
  129.     }
  130.  
  131.  
  132.     console.log('🎤 Ганвест режим активирован! Фаа втфаа шнейне пэпэ кхе кхе');
  133.  
  134.  
  135.     processTextNodes(document.body);
  136.  
  137.     const observer = new MutationObserver((mutations) => {
  138.         mutations.forEach((mutation) => {
  139.             mutation.addedNodes.forEach((node) => {
  140.                 if (node.nodeType === Node.ELEMENT_NODE) {
  141.                     processTextNodes(node);
  142.                 } else if (node.nodeType === Node.TEXT_NODE &&
  143.                           node.textContent.trim() !== '' &&
  144.                           !settings.excludeTags.includes(node.parentElement.tagName)) {
  145.                     try {
  146.                         const processedText = processText(node.textContent);
  147.                         if (processedText !== node.textContent) {
  148.                             node.textContent = processedText;
  149.                         }
  150.                     } catch (e) {
  151.                         console.error('Ошибка обработки нового узла:', e);
  152.                     }
  153.                 }
  154.             });
  155.         });
  156.     });
  157.  
  158.     observer.observe(document.body, {
  159.         childList: true,
  160.         subtree: true
  161.     });
  162.  
  163.     const style = document.createElement('style');
  164.     style.textContent = `
  165.         .ganvest-indicator {
  166.             position: fixed;
  167.             bottom: 20px;
  168.             right: 20px;
  169.             background: linear-gradient(45deg, #000, #333);
  170.             color: #fff;
  171.             padding: 10px 15px;
  172.             border-radius: 8px;
  173.             font-family: monospace;
  174.             font-size: 12px;
  175.             z-index: 999999;
  176.             box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  177.             cursor: pointer;
  178.             transition: all 0.3s ease;
  179.         }
  180.         .ganvest-indicator:hover {
  181.             transform: scale(1.05);
  182.             box-shadow: 0 6px 8px rgba(0,0,0,0.4);
  183.         }
  184.     `;
  185.     document.head.appendChild(style);
  186.  
  187.     const indicator = document.createElement('div');
  188.     indicator.className = 'ganvest-indicator';
  189.     indicator.innerHTML = '🎤 Ганвест Mode: ON<br>Кхе кхе фаа';
  190.     indicator.title = 'Нажми, чтобы отключить';
  191.  
  192.     let enabled = true;
  193.     indicator.onclick = () => {
  194.         enabled = !enabled;
  195.         if (enabled) {
  196.             indicator.innerHTML = '🎤 Ганвест Mode: ON<br>Кхе кхе фаа';
  197.             observer.observe(document.body, { childList: true, subtree: true });
  198.             location.reload();
  199.         } else {
  200.             indicator.innerHTML = '🎤 Ганвест Mode: OFF';
  201.             observer.disconnect();
  202.             location.reload();
  203.         }
  204.     };
  205.  
  206.     document.body.appendChild(indicator);
  207. })();
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment