Guest User

Untitled

a guest
Sep 12th, 2023
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. // ==UserScript==
  2. // @name WhaleStickers
  3. // @namespace WhaleStickers
  4. // @version 0.2
  5. // @description Express yourself with these funny animals
  6. // @author Anonymous
  7. // @match *://boards.4chan.org/bant/*
  8. // @match *://archive.nyafuu.org/bant/*
  9. // @match *://archive.palanq.win/bant/*
  10. // @match *://archived.moe/bant/*
  11. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAB3SURBVChTY/z5Tuo/AwWACUqDAbvQMygLN0BXAzcAJAF0DZSHG4DUIBsCNgCmGUSj24AMYPLIhoANIMZmdADTw/gfCMAsMgHj/wv3EQboK0AZBMDFB1AGWizAACMjI5xGZmMDOL0A0gCTQmajA4rDAKsXiAcMDAB3dTC7NNMndgAAAABJRU5ErkJggg==
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. var police = "<img src='https://archive-media.palanq.win/bant/image/1679/73/1679731070605.png' width='180' height='185'>";
  16. var whale1 = "<img src='https://archive-media.palanq.win/bant/image/1647/61/1647616305776.png' width='170' height='115'>";
  17. var whalefact = "<img src='https://gyate.net/index.php?q=image/2190.png' width='220' height='140'>";
  18. var whalekwab = "<img src='https://gyate.net/index.php?q=image/7522.png' width='200' height='120'>";
  19. var sprokewhaleotter = "<img src='https://gyate.net/index.php?q=image/7862.png' width='240' height='140'>";
  20. var whalebruh = "<img src='https://gyate.net/index.php?q=image/6736.png' width='220' height='140'>";
  21. var whalesleep = "<img src='https://archive-media.palanq.win/bant/image/1642/23/1642235943175.png' width='100' height='51'>";
  22. var whalecronk = "<img src='https://archive-media.palanq.win/bant/image/1642/23/1642235961779.png' width='110' height='73'>";
  23. var gasa = "<img src='https://archive-media.palanq.win/bant/image/1648/14/1648141065647.png' width='150' height='100'>";
  24. var yuyudrink = "<img src='https://archive-media.palanq.win/bant/image/1642/23/1642235978964.png' width='170' height='100'>";
  25. var sprokewhale = "<img src='https://archive-media.palanq.win/bant/image/1684/68/1684687239379.png' width ='170' height='90'>";
  26. var keikipog = "<img src='https://gyate.net/index.php?q=image/2876.png' width = '210' height = '110'>";
  27. var lambda = "<img src='https://gyate.net/index.php?q=image/4000.png' width = '100' height = '173'>";
  28.  
  29. function yukariWhale(text, image) {
  30. for (const parent of document.querySelectorAll("div.thread *, article.clearfix.thread *")) {
  31. for (const child of parent.childNodes) {
  32. if (child.nodeType === Node.TEXT_NODE) {
  33. const subNode = document.createElement("span");
  34. subNode.innerHTML = child.textContent.replace(text, image);
  35. parent.insertBefore(subNode, child);
  36. parent.removeChild(child);
  37. }
  38. }
  39. }
  40. }
  41.  
  42. yukariWhale(/:yukariwhale:/g, whale1);
  43. yukariWhale(/:whalefact:/g, whalefact);
  44. yukariWhale(/:whalekwab:/g, whalekwab);
  45. yukariWhale(/:sprokewhaleotter:/g, sprokewhaleotter);
  46. yukariWhale(/:keikipog:/g, keikipog);
  47. yukariWhale(/:whalesleep:/g, whalesleep);
  48. yukariWhale(/:whalecronk:/g, whalecronk);
  49. yukariWhale(/:gasa:/g, gasa);
  50. yukariWhale(/:yuyudrink:/g, yuyudrink);
  51. yukariWhale(/:sprokewhale:/g, sprokewhale);
  52. yukariWhale(/:police:/g, police);
  53. yukariWhale(/:whalebruh:/g, whalebruh);
  54. yukariWhale(/:lambda:/g, lambda);
Add Comment
Please, Sign In to add comment