[enhancement]: Consider allowing external extensions to toggle theme.
See original GitHub issueI’d like to do some automation with dark reader, but I’ve found that external connections (using chrome.runtime.sendMessage
) aren’t handled.
Something like this in the constructor of Messenger:
chrome.runtime.onConnectExternal.addListener(function(port) {
if (port.name === 'ui' && port.type === 'toggle-current-site') {
port.onMessage.addListener(function() {
this.adapter.toggleCurrentSite();
});
}
});
and this line to the getMessengerAdapter
method in extension.ts:
toggleCurrentSite: () => this.toggleCurrentSite(),
Should be enough to allow this in other extensions:
chrome.runtime.sendMessage('eimadpbcbfnmbkopoojfekhnkhdbieeh', {name: 'ui', type:' toggle-current-site'});
Happy to add a pull request if this is considered worth adding.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Use Chrome with accessibility extensions - Google Support
Find & add accessibility extensions · Use Google's accessibility extensions · Caret Browsing (navigate using your keyboard) · Color Enhancer (adjust webpage colors)....
Read more >May 2022 (version 1.68) - Visual Studio Code
This milestone we added a new capability for users to toggle the view mode of the ... In this case, VS Code does...
Read more >How to Make Sure Your Browser Extensions Are Safe - WIRED
The toggle switches let you enable and disable extensions without actually removing them—you can get rid of them by clicking Remove and then ......
Read more >A Complete Guide to Dark Mode on the Web - CSS-Tricks
Or, even if you're starting from scratch, you'll have both themes: light and dark. One theme should be defined as the default that...
Read more >Install Power Automate browser extensions - Microsoft Learn
Search for the prompts.tab_modal.enabled preference in the list and change it to false. Configure Internet Explorer. By default, Internet ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The current version is simple-as-is without possessing any security treat from external possible bad actors. See #3519
That’s a great suggestion, but still doesn’t provide a solution. I can control the screen brightness in a variety of ways. I can’t, however, use my browser to use a dark theme.