
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Cooky is a simple and extensible GDPR Cookie consent management tool.
The consent manager displays an alert if user consent is needed for non-technical (third-party) cookies. If only technical cookies are present, the alert is not shown. However, the consent manager interface can always be accessed by the user for informational purposes, even if no consent is required.
The Cooky object is added to the global window
object when the script is loaded. You can also import the classes individually if you are using a module bundler.
See example files in example/
for practical usage.
It is easy to interact with the Cooky manager programmatically. Here are some useful methods:
Cooky.init(options)
: Initialize the Cooky manager with optional configurationCooky.config(config)
: Update the Cooky configurationCooky.show()
: Show the Cooky manager interfaceCooky.hide()
: Hide the Cooky manager interfaceWhen using the devmode Plugin you can also use:
Cooky.addCategory(category)
: Add a new CategoryCooky.addLanguage(language)
: Add a new LanguageCooky.addService(service)
: Add a new ServiceCooky.addPlugin(plugin)
: Add a new PluginCooky.addTranslations(code, translations)
: Add new translations for a language codeCooky.appendTranslations(translations)
: Append translations for multiple languagesCooky.appendServiceData(serviceId, data)
: Append data to an existing ServiceCooky.appendServiceCookies(serviceId, cookies)
: Append cookies to an existing ServiceThe following custom events are dispatched on the document
object:
cooky.show
: Show the consent manager interfacecooky.hide
: Hide the consent manager interfacecooky.translate
: Translate the consent manager interface. The event detail contains the code
of the new language.cooky.respond.all
: Triggered when the user responds to all services (accept or reject). The event detail contains accept
(boolean) and optional timeout
(ms before reload).cooky.respond.one
: Triggered when the user responds to a single service (accept or reject). The event detail contains accept
(boolean), serviceId
(string), and optional timeout
(ms before reload).An Observer
checks for DOM changes.
For example adding class="cooky-needs-consent"
to the body, triggers the consent manager.
FAQs
A lightweight and extensible GDPR management library
We found that jizy-cooky 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.
Research
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.