Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
The accordion plugin that smells good the french baguette
Guinguette.js is a lightweight accordion plugin written in ES6
Method | Procedure |
---|---|
NPM | npm i guinguette |
Download | Download zip |
Then guinguette have some css you will have to add (feel free to custom it for a better integration in your UI):
<link rel="stylesheet" href="dist/guinguette.css">
Finally just link the guinguette's code at the end of your document:
<script src="dist/guinguette.js"></script>
var guinguette = new Guinguette(document.querySelector('[data-guinguette="container"]'))
First parameter is for your content's container.
Then you'll have to add data-guinguette-title
and data-guinguette-content
attributes to each section you want to become an accordion.
Like that for example:
<div data-guinguette="container">
<h2 data-guinguette-title>Wow Guinguette.JS is so usefull</h2>
<div data-guinguette-content>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</div>
<h2 data-guinguette-title>Why Guinguette.JS is so easy to setup</h2>
<div data-guinguette-content>
Sed ut elit facilisis, egestas quam a, ultrices lectus. Ut dictum sit amet lectus vel eleifend.
</div>
</div>
Option | Default value | Description |
---|---|---|
autoCollapse | false | Open only one accordion at a time |
anchorOpen | true | If a title's id match with a the URL's anchor, it'll be open by default |
You can use it like that:
var guinguette = new Guinguette(document.querySelector('[data-guinguette="container"]'), {
autoCollapse: true
})
Name | Description |
---|---|
expand(int) | Open an accordion |
collapse(int) | Close an accordion |
expandAll() | Open all accordions |
collapseAll() | Close all accordions |
npm install
gulp
gulp watch
FAQs
The accordion plugin that smells good the french baguette
We found that guinguette 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.