
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.
A dead simple script to mark your navigators.
$ npm install mavigator
import Mavigator from 'mavigator';
Mavigator.mark();
Yup, for most cases it's that simple.
Mavigator will look for any anchor tag (<a>) inside the specified selector. The default behavior is to look for any <a> inside the html element. Once it gathers all of the link nodes, it will scan each node and figure out whether it needs to be marked or not.
If needed, you can scope the <a> tag scanning to a specific element type such as <nav> or to a particular class name. Take a look at the section below and learn what type of selectors you can use.
The Mavigator.mark() method blueprint is:
Mavigator.mark(selector, options);
Where selector is a string compatible with document.querySelectorAll(), which means it's really flexible. The default value for this is html.
The options are as follow:
| Property | Default value | Description |
|---|---|---|
| className | "active" | the class which will be added to the element once found. |
| uri | window.location.pathname | The uri Mavigator will try to find on anchor tags. The default value is okay in most cases. When you want to mark a link that its uri is '/discuss' and the uri of the page is something like '/discuss/general/how-we-do-x' we can use this option to tell Mavigator to look for the '/discuss' uri. |
| classToParent | false | Whether to add the className to the anchor tag or its parent. |
| warn | false | Whether to warn in the console if no link to mark was found. |
If you feel that the script lacks some feature, let me know.
Mavigator is open-sourced software licensed under the MIT license.
FAQs
A dead simple script to mark your navigators.
We found that Mavigator 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.