Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Use gulp
and just type gulp
to build the source. The output will be placed in the dist directory. The dist directory
is tracked, you may also skip the building steps and just use the js in the dist directory.
<ul class="list-group" id="navs">
<li data-choosery-url="my/home$" class="list-group-item">Home Sweet Home</li>
<li data-choosery-url="my/open$" class="list-group-item">Open the Door</li>
<li data-choosery-url="my/save$" class="list-group-item">Save the World</li>
<li data-choosery-url="my/ok$" class="list-group-item">OK vs KO</li>
<li data-choosery-url="my/cancel$" class="list-group-item">Cancel the Dinner</li>
<li data-choosery-url="my/abort$" class="list-group-item">Abort World.exe</li>
</ul>
$('#navs').choosery({
target: 'li'
});
});
It means all li
inside #navs
will be activated if the current URL match with its data-choosery-url
attributes.
data-choosery-url
Accepts a regex that later will be compared with window.location.pathname
.data-chooser-trigger
Accepts everything, as long as it is defined, when the element with this attribute is clicked, it will starts the
choosery engine to find which element need to be activated based on the current URL. Useful for ajax
or
history.pushState
situation.target
The targets for the choosery engine to activate.activeClass
(default: active
)
The class that will be set to the element that have its data-choosery-url
matched with the current URL.Open example/index.html to see it in action and see the source code to see how it is implemented.
Just fork and add any extra features you wanted, if you want to share that feature, feel free to submit a pull request.
Aditya Purwa @ Myriatek
FAQs
A jQuery plugin to activate certains element based on the current URL.
The npm package choosery receives a total of 6 weekly downloads. As such, choosery popularity was classified as not popular.
We found that choosery 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.