Advertisement
Guest User

omosetsual

a guest
Feb 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. //META{"name":"killxd"}*//
  2.  
  3. /*@cc_on
  4. @if (@_jscript)
  5.  
  6. // Offer to self-install for clueless users that try to run this directly.
  7. var shell = WScript.CreateObject("WScript.Shell");
  8. var fs = new ActiveXObject("Scripting.FileSystemObject");
  9. var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\\BetterDiscord\\plugins");
  10. var pathSelf = WScript.ScriptFullName;
  11. // Put the user at ease by addressing them in the first person
  12. shell.Popup("It looks like you mistakenly tried to run me directly. \n(Don't do that!)", 0, "I'm a plugin for BetterDiscord", 0x30);
  13. if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
  14. shell.Popup("I'm in the correct folder already.\nJust reload Discord with Ctrl+R.", 0, "I'm already installed", 0x40);
  15. } else if (!fs.FolderExists(pathPlugins)) {
  16. shell.Popup("I can't find the BetterDiscord plugins folder.\nAre you sure it's even installed?", 0, "Can't install myself", 0x10);
  17. } else if (shell.Popup("Should I copy myself to BetterDiscord's plugins folder for you?", 0, "Do you need some help?", 0x34) === 6) {
  18. fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true);
  19. // Show the user where to put plugins in the future
  20. shell.Exec("explorer " + pathPlugins);
  21. shell.Popup("I'm installed!\nJust reload Discord with Ctrl+R.", 0, "Successfully installed", 0x40);
  22. }
  23. WScript.Quit();
  24. @else@*/
  25.  
  26. class killxd {
  27. load() {
  28.  
  29. }
  30.  
  31. stop() {
  32.  
  33. }
  34.  
  35. start() {
  36. this.processChat();
  37. }
  38.  
  39. processChat() {
  40. setTimeout(function() {
  41. $(".chat .content .messages-wrapper .messages .message-group .comment .message .message-text .markup:not(pre), .chat .content .messages-wrapper .messages .message-group .comment .message .message-text .markup:not(code)").each((i, e) => {
  42. const tagRegex = /(?:\b :v\b)/igm;
  43. const html = $(e).html();
  44. if(tagRegex.test(html)) {
  45. $(e).html(html.replace(tagRegex, ' [BLOQUEADO]'));
  46. }
  47. });
  48. }, 100);
  49. }
  50.  
  51. observer({ addedNodes }) {
  52. if(addedNodes.length && addedNodes[0].classList && addedNodes[0].classList.contains('chat')
  53. || addedNodes.length && addedNodes[0].classList && addedNodes[0].classList.contains('markup')
  54. || addedNodes.length && addedNodes[0].classList && addedNodes[0].classList.contains('message')
  55. || addedNodes.length && addedNodes[0].classList && addedNodes[0].classList.contains('hide-overflow')
  56. || addedNodes.length && addedNodes[0].classList && addedNodes[0].classList.contains('messages-wrapper')) {
  57. this.processChat();
  58. }
  59. }
  60.  
  61. getName() {
  62. return 'killpacmans';
  63. }
  64.  
  65. getAuthor() {
  66. return 'Arashiryuu (base) y Asher (portarlo a pacman jaja)';
  67. }
  68.  
  69. getVersion() {
  70. return '1.2.1';
  71. }
  72.  
  73. getDescription() {
  74. return 'replaces shitty pacmans.';
  75. }
  76. };
  77.  
  78. /*@end@*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement