![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
appearance-changed-event
Advanced tools
Adds `appearance-changed` event to the DOM to detect OS theme changes, using 1k of pure JavaScript.
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.
We found that appearance-changed-event demonstrated a not healthy version release cadence and project activity because the last version was released 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.