SheridanCoriana6

Fix Font Obfuscation

Apr 13th, 2026
87
0
Never
10
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | Software | 0 0
  1. // ==UserScript==
  2. // @name Fix Font Obfuscation (Show Real Text)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Wymusza standardową czcionkę, aby odsłonić prawdziwy tekst ukryty pod obfuskacją
  6. // @author You
  7. // @match *://freedisc.pl/*
  8. // @grant GM_addStyle
  9. // @run-at document-start
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Ta funkcja dodaje style CSS, które nadpisują czcionki na stronie
  16. function injectStyles() {
  17. // Lista bezpiecznych, standardowych czcionek systemowych
  18. const safeFonts = "'Segoe UI', Arial, Helvetica, sans-serif";
  19.  
  20. // Tworzymy regułę CSS, która wymusza te czcionki na (prawie) wszystkim
  21. // Używamy !important, aby nadpisać style strony
  22. const css = `
  23. * {
  24. font-family: ${safeFonts} !important;
  25. }
  26. /* Czasami strony używają ikon jako czcionki - staramy się ich nie psuć,
  27. ale w tym przypadku priorytetem jest czytelny tekst */
  28. `;
  29.  
  30. // Metoda dodawania stylu zależna od środowiska
  31. if (typeof GM_addStyle !== "undefined") {
  32. GM_addStyle(css);
  33. } else {
  34. const style = document.createElement('style');
  35. style.textContent = css;
  36. (document.head || document.documentElement).appendChild(style);
  37. }
  38. }
  39.  
  40. // Uruchamiamy natychmiast
  41. injectStyles();
  42.  
  43. // Obserwator zmian (gdyby strona ładowała elementy dynamicznie/AJAX)
  44. const observer = new MutationObserver(() => {
  45. // Ponowne nałożenie stylów w przypadku dodania nowych elementów
  46. injectStyles();
  47. });
  48.  
  49. if (document.body) {
  50. observer.observe(document.body, {
  51. childList: true,
  52. subtree: true
  53. });
  54. }
  55. })();
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
Add Comment
Please, Sign In to add comment