在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:darkreader/darkreader开源软件地址:https://github.com/darkreader/darkreader开源编程语言:TypeScript 83.2%开源软件介绍:Dark Reader analyzes web pages and aims to reduce eyestrain while browsing the web. Dark ReaderDark Reader is an open-source MIT-licensed browser extension designed to analyze web pages. Dark Reader will generate a dark mode that aims to reduce the eyestrain of the user. Dark Reader is feature-rich and is customizable in many ways throughout the UI. QuestionsMost questions can be answered by reading the help page. If the help page doesn't answer your question, open up a new discussion. How to contributeRead more about contributing to Dark Reader in CONTRIBUTING.md. Building for useYou can install the extension from a file.
This will create a Using Dark Reader for a websiteYou can use Dark Reader to enable dark mode on your website!
Then you can use the following code to control Dark Reader's API DarkReader.enable({
brightness: 100,
contrast: 90,
sepia: 10
});
DarkReader.disable();
// Enable when the system color scheme is dark.
DarkReader.auto({
brightness: 100,
contrast: 90,
sepia: 10
});
// Stop watching for the system color scheme.
DarkReader.auto(false);
// Get the generated CSS of Dark Reader returned as a string.
const CSS = await DarkReader.exportGeneratedCSS();
// Check if Dark Reader is enabled.
const isEnabled = DarkReader.isEnabled(); ... or if you are using ES modules import {
enable as enableDarkMode,
disable as disableDarkMode,
auto as followSystemColorScheme,
exportGeneratedCSS as collectCSS,
isEnabled as isDarkReaderEnabled
} from 'darkreader';
enableDarkMode({
brightness: 100,
contrast: 90,
sepia: 10,
});
disableDarkMode();
followSystemColorScheme();
const CSS = await collectCSS();
const isEnabled = isDarkReaderEnabled(); Be aware that darkreader will add the Site fixesAutomatically syncing the site fixes to every Dark Reader user was disabled because the GitHub team does not allow using GitHub as a CDN. The storage of these files would be expensive, and making requests to other resources would look suspicious. Each new release of Dark Reader will include these changes. However, this can be enabled using the following steps:
ContributorsThank you to all our contributors! Dark Reader exists thanks to you.Backersbecoming a backer.Thank you to all our generous backers! Support Dark Reader bySponsorsDoes your company use Dark Reader? Ask your manager or the marketing team if your company would be interested in supporting our project. Your support will allow the maintainers to dedicate more time to maintenance and creating new features for everyone. Also, your company's logo will show on GitHub. Who doesn't want a little extra exposure? Here's the info. Thank you to all our wonderful sponsors! |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论