6 lines
272 B
JavaScript
6 lines
272 B
JavaScript
|
// message for dark or incognito mode (chrome)
|
||
|
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches || chrome.extension.inIncognitoContext)
|
||
|
chrome.runtime.sendMessage({scheme: 'dark'});
|
||
|
else
|
||
|
chrome.runtime.sendMessage({scheme: 'light'});
|