
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
usercentrics-widgets
Advanced tools
Lightweight customizable placeholders for third party content of your website (e.g. Youtube Videos) compatible with the Usercentrics CMP.
Unlike the Usercentrics Smart Data Protector, this library does not block third party content automatically. You have to change your website according the documentation in this README!
This is a community project and no official product from Usercentrics.
I have just started with this project, please create a Github issue if you encounter any bugs, thanks!
iframe elements you want to replace
src to data-srcclass="uc-widget"data-uc-id with the ID of the matching service
(for example data-uc-id="BJz7qNsdj-7" for Youtube)/dist/ folder to your website
ucw.min.css into the <head> section:
<head>
<link type="text/css" rel="stylesheet" href="ucw.min.css"/>
</head>
ucw.js (or if you need IE11 support ucw.legacy.js) at the end of your <body>
<script src="ucw.js"></script>
</body>
</html>
Instead of downloading the files you can also use the jsdelivr CDN, however it's recommended to host the files on your server to avoid third party requests.
https://cdn.jsdelivr.net/gh/philsch/usercentrics-widgets@main/dist/ucw.js
https://cdn.jsdelivr.net/gh/philsch/usercentrics-widgets@main/dist/ucw.min.css
Refer to the /example/ directory for complete examples.
All widgets can be changed via data attributes:
| Attribute | Description | Example |
|---|---|---|
data-src | src of the original element | data-src="https://www.youtube.com/embed/xxx" |
data-text | Text for the placeholder | data-text="We need your consent" |
data-accept | Label for the accept button | data-accept="ok" |
Instead of using the predefined CSS file, you can use your own. See /style/ucw.css as a reference which CSS classes need to be defined and /example/customized.html as an example.
FAQs
Lightweight placeholders compatible with Usercentrics CMP
We found that usercentrics-widgets 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.