All Anonymizer

Hide your name and icon from all pages.

  1. // ==UserScript==
  2. // @name All Anonymizer
  3. // @namespace https://greasyfork.org/users/815990
  4. // @version 0.1
  5. // @description Hide your name and icon from all pages.
  6. // @author Anonymous
  7. // @match *://*/*
  8. // @license MIT
  9. // ==/UserScript==
  10. (function() {
  11. 'use strict';
  12. const txt_patterns = [
  13. // Enter your name...
  14. ];
  15. const img_patterns = [
  16. // Enter a substring of the URL of your icon that identifies it from others...
  17. ];
  18. const txt_replacement = "Anonymous";
  19. const img_replacement = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAACKFBMVEXM1t3K1Nu7xs6tusOisLqYprGMm6eGlaJ/j5x4iZZzhJJuf45sfYzJ09vBzNSsucKXprGEk6B0hJJmeIdld4bAy9OlsryLmqZxgpC3w8uXpbC+ydGZp7J0hZPL1dyrt8GAkJ3H0tmeq7ZwgZDG0NiaqLNtfoygrbhtfo2jsLtqfIrDzdWDk6CyvsdvgI6cqrTJ09qJmKTDztV8jJm/ytK8x8+6xs66xc5vgI+9ydHBzNN3iJWNnKe3wstneYjG0dhyg5GJmaWotL5sfoyHl6PI0tqap7Jpe4mNnKhneIeIl6OKmaWRoKtrfIuhrrigrrh2h5S1wMm0wMmOnaiFlaFoeomntL5rfYuToq3Ez9aqt8CQn6t6ipezv8icqrWIl6R2hpR1hpTI09qms72WpK+HlqN3h5VpeonCzdSRn6uFlKF6i5h6iphwgY+9yNC7x8+qt8GfrbefrLeElKB+jpt9jZqdq7Wksbu4xMy4w8yCkp+SoKyir7qir7nF0NfFz9eerLa1wcrK1dyHlqKruMGcqbR1hpOxvcawvMWPnanH0dl7i5nI0tl5ipeuusNtf42otb9ugI6QnqqWpLBoeohqe4qUo66bqbOGlqKToa14iJZpe4qvu8R5iZe8x9C5xc25xM3Ez9fCzdW3w8yVpK+qtsCdqrWVo66RoKyUoq62wsqOnamjsLqtucO7xs/Ezta2wsuuusSPnqmvvMWCkZ6SoayptsC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CKBwbX731LZt27Zt27Zt2/b2uoEyHL1bOMHNzDz54fgGXz3ejUO41pU99dieEC8993PDMBIVRjq5gmi0GyV2uzjfanMONc61cTC8ylAkMz/aet8TVXq+t91jZ0uUabnT9PSqAurM6Ge4xwxQWKRW9CgIUaTbBZS6YHKwVa0JajUx+Pr9kKFY9sHc+qMPqvUxtiAp2hDlGhY1FWQM6o2x1KM2Blyx02M6Jky30uPjVUy4+trIg7cJRjQx8fitXwYzyli4xX6BIdf199iIKRu196gzDlPG9VJ+8XMGY84Ujb8IZamtuce8hDlpnuIR70AMGqh38FsDSWLM+AmjPunscboJRjU5rTLIZ8z6rPKFhWEKX1oV62FYvYrqghzDtGPaelS6hmnXKikLMgjjBsVvdGHmqdoS9sG85Zq2h9VxoLqiJ+9AHBio5+m7GRcOaukxoCUutBygJEhJnCipo8eB1jjR+kDs0f9b7NebzsCNGRq2uTdwpJn8Hosv4cilxeKDtMKVfeKDTMSVTPpE6wTOfBEeZDXOfJXdo2vCm/Wig7zCnW+i5+4VcKdCR8FBvuPQRcFBduPQbrk9KiUcSpXiOO7fxNHccVw6LrVHLZyqJTTID5z6ITRIPZyqJ7PHQ9x6GLt0WaqIDLIItxZJ7LEeUWLk2wLHWggM0hbH2gqcvN/BsTsVY5kuy4nYFcoyU1yQe7hWVlqP/QnX0n5hQd7h3Lv4Z7CyvBAWZCvObZXV4/AInBtxWFSQJ4gSa8NWEaSVqCBvIsgUUUHWRpC1knrUXxFBVtQXFOQ+gfvxmRTxSRa/0wFR4qJ0JIGRMTiJ4cnvrCOwTk6PYQRgmJggDwjAgyJ54CdHF8F5TMtp0wAAAABJRU5ErkJggg==";
  20. function traverse(startNode) {
  21. const stack = [startNode];
  22. while (stack.length > 0) {
  23. const node = stack.pop();
  24. if (node.nodeType === node.TEXT_NODE) {
  25. for (const txt_pattern of txt_patterns) {
  26. if (node.textContent.includes(txt_pattern)) {
  27. node.textContent = node.textContent.replaceAll(txt_pattern, txt_replacement);
  28. }
  29. }
  30. } else {
  31. if (node.tagName === "IMG") {
  32. for (const img_pattern of img_patterns) {
  33. if (node.src.includes(img_pattern)) {
  34. node.src = img_replacement;
  35. }
  36. }
  37. }
  38. if (node instanceof Element && getComputedStyle(node).backgroundImage !== "none") {
  39. for (const img_pattern of img_patterns) {
  40. if (getComputedStyle(node).backgroundImage.includes(img_pattern)) {
  41. node.style.backgroundImage = `url(${img_replacement})`;
  42. }
  43. }
  44. }
  45. for (const childNode of node.childNodes) {
  46. stack.push(childNode);
  47. }
  48. }
  49. }
  50. }
  51. const observer = new MutationObserver(() => {
  52. traverse(document);
  53. });
  54. traverse(document);
  55. observer.observe(document, {
  56. childList: true,
  57. subtree: true,
  58. });
  59. })();