Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
appearance-changed-event
Advanced tools
Readme
Adds appearance-changed
event to the DOM to detect OS theme changes, using 1k of pure JavaScript.
Add appearance-changed-event.min.js to your page and start listening for appearance-changed
event.
// fires every time the OS theme changes
window.addEventListener('appearance-changed', function(e) {
console.log(e.detail); // `light`, `dark`
});
It also exposes window.appearance
which you can use to detect the current OS theme:
switch (window.appearance) {
case 'light': {
// do some light theme stuff
} break;
case 'dark': {
// do some dark theme stuff
} break;
}
The project includes a node server, run the following then visit http://localhost:8080
git clone https://github.com/orca-scan/appearance-changed-event
cd appearance-changed-event
npm install
npm start
To create a new version of the minified appearance-changed-event.min.js file from source, tweak the version number in package.json
and run npm run build
For change-log, check releases.
Licensed under MIT License © Orca Scan (build a barcode scanner app without code)
FAQs
Adds `appearance-changed` event to the DOM to detect OS theme changes, using 1k of pure JavaScript.
The npm package appearance-changed-event receives a total of 1 weekly downloads. As such, appearance-changed-event popularity was classified as not popular.
We found that appearance-changed-event demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.