Socket
Socket
Sign inDemoInstall

@anywhichway/autohelm

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anywhichway/autohelm - npm Package Compare versions

Comparing version 0.0.25 to 0.0.26

26

index.js

@@ -66,5 +66,7 @@ const toTOC = (dom,headings,toc,previousLevel,previousHeading) => {

toc.style.display = "none";
open.classList.add("autohelm-open-toc");
open.innerHTML = "▼";
open.style.display = "inline";
open.style.fontSize = "15px";
close.classList.add("autohelm-close-toc");
close.innerHTML = "▲";

@@ -75,12 +77,2 @@ close.style.display = "none";

tocEl.appendChild(close);
open.addEventListener("click",() => {
toc.style.display = "block";
open.style.display = "none";
close.style.display = "inline";
})
close.addEventListener("click",() => {
toc.style.display = "none";
open.style.display = "inline";
close.style.display = "none";
})
}

@@ -133,2 +125,16 @@ }

if(tocEl) {
if(event.target.classList.contains("autohelm-open-toc")) {
event.preventDefault();
tocEl.nextElementSibling.style.display = "block";
event.target.style.display = "none";
document.getElementsByClassName("autohelm-close-toc")[0].style.display = "inline";
return;
}
if(event.target.classList.contains("autohelm-close-toc")) {
event.preventDefault();
tocEl.nextElementSibling.style.display = "none";
event.target.style.display = "none";
document.getElementsByClassName("autohelm-open-toc")[0].style.display = "inline";
return;
}
const anchors = [...document.body.querySelectorAll(`.autohelm-toc a[href="#${tocEl.id}"]`)];

@@ -135,0 +141,0 @@ if(anchors.includes(event.target)) {

{
"name": "@anywhichway/autohelm",
"version": "0.0.25",
"version": "0.0.26",
"description": "A library to support standardized table of contents and footnote navigation in HTML files",

@@ -5,0 +5,0 @@ "type": "module",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc