{"id":22446800,"url":"https://github.com/firsttimeez/blocktwitchcontent","last_synced_at":"2025-10-14T21:07:22.966Z","repository":{"id":260279206,"uuid":"880827980","full_name":"FirstTimeEZ/BlockTwitchContent","owner":"FirstTimeEZ","description":"Removes unwanted content from the Twitch chat using various identifiers, phrases or simply a display name.  Can also remove sub notifications, highlighted comments, service messages and block common types of spam quickly using default settings.","archived":false,"fork":false,"pushed_at":"2024-11-17T08:23:34.000Z","size":231,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T15:46:02.906Z","etag":null,"topics":["blocker","chat","content","dom-manipulation","es6","es6-modules","example","firefox-addon","ignore-list","javascript","messaging-example","module","module-exports","no-react","responsive-design","template","twitch","twitchtv","webextensions-api"],"latest_commit_sha":null,"homepage":"https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FirstTimeEZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-30T12:43:01.000Z","updated_at":"2024-11-30T07:27:57.000Z","dependencies_parsed_at":"2024-10-30T14:40:06.428Z","dependency_job_id":"073e85e6-ecf3-42fc-b2ad-767d8dd104f9","html_url":"https://github.com/FirstTimeEZ/BlockTwitchContent","commit_stats":null,"previous_names":["firsttimeez/blocktwitchcontent"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirstTimeEZ%2FBlockTwitchContent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirstTimeEZ%2FBlockTwitchContent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirstTimeEZ%2FBlockTwitchContent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirstTimeEZ%2FBlockTwitchContent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FirstTimeEZ","download_url":"https://codeload.github.com/FirstTimeEZ/BlockTwitchContent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245833003,"owners_count":20679765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blocker","chat","content","dom-manipulation","es6","es6-modules","example","firefox-addon","ignore-list","javascript","messaging-example","module","module-exports","no-react","responsive-design","template","twitch","twitchtv","webextensions-api"],"created_at":"2024-12-06T04:11:55.914Z","updated_at":"2025-10-14T21:07:17.935Z","avatar_url":"https://github.com/FirstTimeEZ.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Block Twitch Content\n\n[![](https://i.imgur.com/3BynCoO.png)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/)\n\nA [`Firefox Extension`](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/) that removes unwanted content from the [Twitch](https://www.twitch.tv) chat using various identifiers, phrases or simply a display name. Can also remove sub notifications, highlighted comments, service messages and block common types of spam quickly using default settings.\n\n[![](https://i.imgur.com/daNrPlm.png)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/)\n\nYou can easily create rules by opening the pop-up in the address bar while viewing [`Twitch`](https://www.twitch.tv). \n\n[![](https://i.imgur.com/sqP9TrH.png)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/)\n\nThe list is stored locally and remains private.\n\n# Settings Bar\n\nYou can mouse-over a setting to see what it does, detailed explanations below.\n\n[![](https://i.imgur.com/Ly4ONTR.gif)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/)\n\n### Hide Bot Spam\n\n[![](https://i.imgur.com/ohl4bFJ.png)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/) Content containing the words below will be removed from chat if the `Hide Bots` setting is active\n\n```\nStreamElements\nStreamlabs\nSoundAlerts\nMoobot\nNightbot\nFossabot\nDeepBot\nWizeBot\nPhantomBot\nBotisimo\nTwitchBot\n```\n\n### Hide Command Spam\n\n[![](https://i.imgur.com/UXkrU4E.png)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/) Content containing the words below will be removed from chat if the `Hide Commands` setting is active\n\n```\n!join\n!gamble\n!following\n!followage\n!links\n!points\n!hype\n!uptime\n!commands\n!watchtime\n!socials\n!donate\n!schedule\n!vote\n!specs\n!sens\n!party\n!song\n!playing\n!game\n!music\n!patch\n!event\n```\n\n### View Removed Message History\n\n[![](https://i.imgur.com/63glI6e.png)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/) Click the settings cog to open the removed message history in a new tab, If you have more than one stream open then each streamer gets its own tab.\n\n[![](https://i.imgur.com/Q8JltQM.gif)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/)\n\n### Download List\n\n[![](https://i.imgur.com/qae1VAi.png)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/) You can download the list of content rules any time by clicking the download button in the pop-up window\n\n---------\n\n# How does it work\n\nThe extension works by injecting a `Mixin` to check messages as they arrive.\n\nThis is achieved by using a very durable `Regex` to find the location of the `messageProcessor` in `vendor.js`.\n\n```js\nCONFIG.REGEX.FRAGMENT: /([A-Za-z])\\.messageProcessor\\.processMessage\\(([A-Za-z])\\.data\\)/\n```\n\nOnce the `messageProcessor` has been found, it gets replaced with a `Mixin` that can securely communicate with the extension.\n\n```js\nexport function createFragmentListener(matches) {\n  return `new Promise((resolve) =\u003e {\n    const val = Math.floor(Math.random() * 100000000);\n    const handler = (e2) =\u003e {\n      if (e2.data.response !== undefined \u0026\u0026 e2.data.completed \u0026\u0026 e2.data.random === val) {\n        resolve(e2.data.response);\n        window.removeEventListener('message', handler);\n      }\n    };\n    window.addEventListener('message', handler);\n    window.postMessage({ \n      random: val, \n      type: 'fp', \n      text: ${matches[2]}.data \n    });\n  }, 'https://www.twitch.tv').then(response =\u003e {\n    if(response === 'w'){ \n      ${matches[1]}.messageProcessor.processMessage(${matches[2]}.data)\n    }\n  });`;\n}\n```\n\nUsing a `Promise` this way creates a synchronous channel with the `Extension` through the `Content Script`.\n\nThis makes it possible to update the `Hidden Chat Content Rules` in real time instead of needing a page refresh.\n\n# Settings\n\nAdditional settings and examples can be found in the `options` menu.\n\n[![](https://i.imgur.com/v0KhWu3.png)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/)\n\n# Debug Mode\n\nIn debug mode, the extension will start displaying messages in the console.\n\n[![](https://i.imgur.com/Sv1urav.png)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/)\n\nThis information can be useful for creating rules or finding bugs.\n\n[![](https://i.imgur.com/ddLFyJm.png)](https://addons.mozilla.org/en-US/firefox/addon/block-twitch-content/)\n\n# Self Healing\n\nThe `Mixin` makes use of the `Matches` from the `Regex` to self-heal when [`Twitch`](https://www.twitch.tv) updates.\n\n```js\n$1.messageProcessor.processMessage($2.data);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirsttimeez%2Fblocktwitchcontent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirsttimeez%2Fblocktwitchcontent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirsttimeez%2Fblocktwitchcontent/lists"}