├── .github └── workflows │ └── main.yml ├── README.md ├── anti_ping.js ├── anti_ping.md ├── emoji_packs.js ├── emoji_packs.md ├── experiments.js └── experiments.md /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Discord Source detection 2 | on: [issues] 3 | jobs: 4 | autoclose: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - name: Autoclose Discord Source issues 8 | uses: IndyV/IssueChecker@v1.0 9 | with: 10 | repo-token: ${{ secrets.GITHUB_TOKEN }} 11 | issue-close-message: "@${issue.user.login} This issue was automatically closed because we don't accept issue reports from Discord Source.\nThe reason for this is because usually these issues aren't well thought out and are often duplicates.\n\nPlease take a few more minutes to create a well-made, proper issue report." 12 | issue-pattern: "Discord Source - .Issue Report]" 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EnhancedDiscord-Plugins 2 | Extra plugins for ED icon [EnhancedDiscord](https://github.com/joe27g/EnhancedDiscord/). 3 | 4 | ### Plugins in this repo: 5 | - [Anti Ping](/anti_ping.md) - Hides ping icon for servers which you have muted & suppressed @​everyone. [[source]](/anti_ping.js) 6 | 7 | - [Emoji Packs](/emoji_packs.md) - Allows you to replace Discord's emojis with a new set. [[source]](/emoji_packs.js) 8 | 9 | - [Experiments](/experiments.md) - Enables experimental features not yet released to standard Discord clients. [[source]](/experiments.js) 10 | -------------------------------------------------------------------------------- /anti_ping.js: -------------------------------------------------------------------------------- 1 | const Plugin = require('../plugin'); 2 | 3 | module.exports = new Plugin({ 4 | name: 'Anti-Ping', 5 | author: 'Joe 🎸#7070', 6 | description: 'Removes ping box for any server that is muted and has @everyone surpressed.', 7 | color: 'aqua', 8 | 9 | load: async function() { 10 | 11 | while (!findModule('getMentionCount', true) || !findModule('isMuted', true) || !findModule('getChannels', true)) 12 | await this.sleep(1000); 13 | 14 | let m = findModule('isMuted'); 15 | let c = findModule('getChannels'); 16 | 17 | monkeyPatch(findModule('getMentionCount'), 'getMentionCount', function () { 18 | let ch = c.getChannels()[arguments[0].methodArguments[0]]; 19 | if (ch && ch.guild_id && m.isMuted(ch.guild_id) && m.isSuppressEveryoneEnabled(ch.guild_id)) { 20 | return 0; 21 | } 22 | return arguments[0].callOriginalMethod(arguments[0].methodArguments); 23 | }); 24 | }, 25 | unload: function() { 26 | this.log(findModule('getMentionCount').getMentionCount.unpatch); 27 | } 28 | }); 29 | -------------------------------------------------------------------------------- /anti_ping.md: -------------------------------------------------------------------------------- 1 | # Anti Ping 2 | Hides ping icon for servers which you have muted & suppressed @​everyone. 3 | 4 | #### To hide all pings for a server: 5 | 1. Right-click the server and make sure the "Server Mute" checkbox is checked. 6 | 2. Right-click the server and go to "Notification Settings" and make sure the "Suppress @​everyone and @​here" toggle is turned on. 7 | 3. Done! You may need to reload your client (Ctrl+R) to see changes for all servers. 8 | 9 | #### Download 10 | To quickly download, right-click [this link](https://github.com/joe27g/EnhancedDiscord-Plugins/raw/master/anti_ping.js) and `Save link as...` 11 | -------------------------------------------------------------------------------- /emoji_packs.js: -------------------------------------------------------------------------------- 1 | const Plugin = require('../plugin'); 2 | 3 | module.exports = new Plugin({ 4 | name: 'Emoji Packs', 5 | author: 'Joe 🎸#7070', 6 | description: "Replaces Discord's default emojis with different ones of your choice.", 7 | color: 'maroon', 8 | 9 | config: { 10 | pack: { 11 | default: 'none', 12 | allowed: { 13 | none: 'Default | Default emojis used by Discord (and Twitter.)', 14 | blobs: 'Blobs | Google Blob Emoji (Android Lollipop and earlier.) Preview', 15 | emojione: 'EmojiOne | A simple emoji pack built for use by apps and web services. Preview', 16 | windows: 'Windows | Emoji pack used by Windows and other Microsoft products. Preview', 17 | samsung: 'Samsung | Emojis used in Samsung phones and devices. Preview', 18 | apple: 'Apple | Emojis used on iPhones, macOS, etc. [NOTE: incomplete ~ many emojis won\'t work] Preview', 19 | google: 'Google | Google Emoji (Android Oreo and later.) Preview', 20 | facebook: 'Facebook | Emoji used on Facebook. Preview', 21 | fbmessenger: 'Facebook Messenger | Emoji used in the older versions of Facebook Messenger. Preview' 22 | } 23 | } 24 | }, 25 | 26 | load: async function() { 27 | 28 | while (!findModule('getURL', true) || !findModule('convert', true)) 29 | await this.sleep(1000); 30 | 31 | let formats = { 32 | 'blobs': 'https://raw.githubusercontent.com/googlei18n/noto-emoji/563fa14298e103d54b81b370668f1c92370273da/png/128/emoji_u{code_}.png', 33 | 'emojione': 'https://www.emojiok.com/resolution/static/img/emoji/std/one/{code}.png', 34 | 'windows': 'https://www.emojiok.com/resolution/static/img/emoji/wind/20170529/{code}.png', 35 | 'samsung': 'https://www.emojiok.com/resolution/static/img/emoji/sams/20170529/{code}.png', 36 | 'apple': 'https://www.emojiok.com/resolution/static/img/emoji/appl/20170514/u{codE}.png', // UNRELIABLE 37 | 'google': 'https://github.com/googlei18n/noto-emoji/blob/master/png/128/emoji_u{code_}.png?raw=true', // after redesign 38 | 'facebook': 'https://www.emojiok.com/resolution/static/img/emoji/std/fb/{code}.png', 39 | 'fbmessenger': 'https://www.emojiok.com/resolution/static/img/emoji/std/fbm/{code}.png', 40 | }; 41 | 42 | window.emojiMode = 'blobs'; 43 | 44 | const c = findModule('convert').convert; 45 | 46 | let thiss = this; 47 | 48 | monkeyPatch( findModule('getURL'), 'getURL', function() { 49 | if (!thiss.settings.pack || !formats[thiss.settings.pack]) 50 | return arguments[0].callOriginalMethod(arguments[0].methodArguments); 51 | 52 | return formats[thiss.settings.pack] 53 | .replace('{code}', c.toCodePoint(arguments[0].methodArguments[0])) 54 | .replace('{codE}', c.toCodePoint(arguments[0].methodArguments[0]).toUpperCase()) 55 | .replace('{code_}', c.toCodePoint(arguments[0].methodArguments[0]).replace(/-/g, '_')) 56 | }) 57 | }, 58 | unload: function() { 59 | findModule('getURL').getURL.unpatch(); 60 | }, 61 | generateSettings: function() { 62 | const a = window.ED.classMaps.alignment; 63 | const d = window.ED.classMaps.description; 64 | const h = window.ED.classMaps.headers; 65 | const l = window.ED.classMaps.labels = findModule('labelText'); 66 | const cbw = window.ED.classMaps.cbWrapper = findModule('checkboxWrapper'); 67 | const fc = findModule('flexChild'); 68 | 69 | let current = this.settings.pack, stuff = this.config.pack.allowed; 70 | let result = `
Replace Discord's emojis with a set stolen from somewhere else :^)
NOTE: the emoji packs are incomplete. If you know a better place to obtain the images, say so in the support server.
[Requires restart to take full effect]
`; 71 | for (let key in stuff) { 72 | result += `

${stuff[key].split(' | ')[0]}

${stuff[key].split(' | ')[1]}
`+/**/`
`; 73 | } 74 | result += '
'; 75 | return result; 76 | }, 77 | settingListeners: [ 78 | { 79 | el: '#ed-emoji-pack', 80 | type: "click", 81 | eHandler: function(e) { 82 | const l = window.ED.classMaps.labels; 83 | const cbw = window.ED.classMaps.cbWrapper; 84 | 85 | //console.log(e.target, this); 86 | if (!e.target.className || e.target.className.indexOf('horizontal-') == -1) return; 87 | 88 | let gay = document.querySelector('.' + l.selected); 89 | if (gay) 90 | gay.className = gay.className.replace(' ' + l.selected, ''); 91 | e.target.className += ' ' + l.selected; 92 | 93 | let cs = document.querySelector('.ed-emoji-pack.' + cbw.checked); 94 | if (cs) { 95 | cs.className = cs.className.replace(' ' + cbw.checked, ''); 96 | /*let cb = document.querySelector('[style="flex: 1 1 auto; background-color: rgb(67, 181, 129); border-color: rgb(67, 181, 129);"]');*/ 97 | //if (cb) 98 | cs.style = 'flex: 1 1 auto;'; 99 | } 100 | 101 | //cs = e.target.previousElementSibling; 102 | let cb = e.target.querySelector('.ed-emoji-pack'); 103 | if (cb) { 104 | cb.className += ' ' + cbw.checked; 105 | //cb = cs.querySelector(`#${cb.id}[style="flex: 1 1 auto;"]`); 106 | //if (cb) 107 | cb.style = "flex: 1 1 auto; background-color: rgb(67, 181, 129); border-color: rgb(67, 181, 129);"; 108 | } 109 | let ssssss = module.exports.settings || {}; 110 | ssssss.pack = cb.id || 'none'; 111 | module.exports.settings = ssssss; 112 | } 113 | } 114 | ] 115 | }); -------------------------------------------------------------------------------- /emoji_packs.md: -------------------------------------------------------------------------------- 1 | # Emoji Packs 2 | Allows you to replace Discord's emojis with a new set. 3 | 4 | __**NOTE: All of these packs are incomplete.**__ This is because they all rely on 3rd-party hosting of the assets. If you know a source where all the assets for a particular emoji pack are located, let us know in the support server. 5 | 6 | #### To change the set of emojis you're using: 7 | 1. Click the "User Settings" gear in the bottom left. 8 | 2. Under the EnhancedDiscord group, go to the "Settings" tab. 9 | 3. You should see a section labeled "Emoji Packs". Simply click on the pack you would like to use. 10 | 4. To see the emojis change on all cached messages, you will need to reload your client (Ctrl+R). 11 | 5. Enjoy your new emojis! 12 | 13 | #### Download 14 | To quickly download, right-click [this link](https://github.com/joe27g/EnhancedDiscord-Plugins/raw/master/emoji_packs.js) and `Save link as...` 15 | -------------------------------------------------------------------------------- /experiments.js: -------------------------------------------------------------------------------- 1 | const Plugin = require('../plugin'); 2 | 3 | module.exports = new Plugin({ 4 | name: 'Experiments', 5 | author: 'Joe 🎸#7070', 6 | description: 'Enables Discord Staff "experiments." (super-secret dev features)', 7 | color: 'limegreen', 8 | 9 | load: function() { 10 | const mod = findModule(mod => mod.getExperimentDescriptor && !mod.getExperimentId); 11 | if (!mod || !mod.__proto__) { 12 | return this.warn("Couldn't find isDeveloper module.") 13 | } 14 | mod.__proto__ = { 15 | constructor: mod.__proto__, 16 | getExperimentDescriptor: mod.__proto__.getExperimentDescriptor, 17 | isDeveloper: true, 18 | __proto__: mod.__proto__.__proto__ 19 | }; 20 | }, 21 | unload: function() { 22 | const mod = findModule(mod => mod.getExperimentDescriptor && !mod.getExperimentId); 23 | if (!mod || !mod.__proto__) { 24 | return this.warn("Couldn't find isDeveloper module.") 25 | } 26 | mod.__proto__.isDeveloper = false; 27 | } 28 | }); 29 | -------------------------------------------------------------------------------- /experiments.md: -------------------------------------------------------------------------------- 1 | # Experiments 2 | Enables Discord staff "experiments", which are generally prototypes of features before they're released on Discord Canary, PTB, or stable. 3 | 4 | To use the experiments, simply go to the new Experiments tab in user settings and find the options you want to use. 5 | 6 | **Note: Because using experiments involves making API requests, using this plugin could flag your account. Use at your own risk!** 7 | 8 | #### Download 9 | To quickly download, right-click [this link](https://github.com/joe27g/EnhancedDiscord-Plugins/raw/master/experiments.js) and `Save link as...` 10 | --------------------------------------------------------------------------------