New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@xiee/utils

Package Overview
Dependencies
Maintainers
0
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xiee/utils - npm Package Compare versions

Comparing version 1.12.30 to 1.12.31

9

js/sidenotes.js

@@ -6,3 +6,3 @@ // move footnotes (ids start with fn) and citations (ids start with ref-) to sidenotes

const h = `a[href="#${el.id}"]`;
d.querySelectorAll(`${h} > sup, sup > ${h}, .citation > ${h}`).forEach(a => {
d.querySelectorAll(`${h} > sup, sup > ${h}, .citation > ${h}, ${h}.citation`).forEach(a => {
const a2 = a.parentNode;

@@ -26,5 +26,6 @@ (a.tagName === 'A' ? a : a2).removeAttribute('href');

s.querySelectorAll('.fullwidth').forEach(el => el.classList.remove('fullwidth'));
// insert note after the <sup> or <span> that contains a
a2.after(s);
a2.classList.add('note-ref');
// insert note after the parent of <a> unless it contains class 'citation'
const a3 = a.classList.contains('citation') ? a : a2;
a3.after(s);
a3.classList.add('note-ref');
el.remove();

@@ -31,0 +32,0 @@ });

@@ -1,1 +0,1 @@

(e=>{e.querySelectorAll('.footnotes > ol > li[id^="fn"], #refs > *[id^="ref-"]').forEach((t=>{const s=`a[href="#${t.id}"]`;e.querySelectorAll(`${s} > sup, sup > ${s}, .citation > ${s}`).forEach((s=>{const o=s.parentNode;("A"===s.tagName?s:o).removeAttribute("href");const l=e.createElement("div");for(l.className="side side-right",/^fn/.test(t.id)?(l.innerHTML=t.innerHTML,l.firstElementChild.insertAdjacentHTML("afterbegin",`<span class="bg-number">${s.innerText}</span> `),l.querySelector('a[href^="#fnref"]')?.remove(),l.className+=" footnotes"):l.innerHTML=t.outerHTML;"#text"===l.lastChild?.nodeName&&/^\s*$/.test(l.lastChild.textContent);)l.lastChild.remove();l.querySelectorAll(".fullwidth").forEach((e=>e.classList.remove("fullwidth"))),o.after(l),o.classList.add("note-ref"),t.remove()}))})),e.querySelectorAll(".footnotes, #refs").forEach((e=>{/^\s*$/.test(e.innerText)&&e.remove()})),e.getElementById("TOC")?.classList.add("side","side-left");const t=e.querySelectorAll(".side.side-right, .side.side-left"),s=[];e.querySelectorAll(".fullwidth").forEach((e=>{s.push([e,e.getBoundingClientRect()])})),t.length&&e.body.classList.add("has-sidenotes"),t.forEach((e=>{const t=e.getBoundingClientRect();for(let e of s){const s=e[1];t.right<s.left||t.left>s.right||t.bottom<s.top||t.top>s.bottom||e[0].classList.remove("fullwidth")}}))})(document);
(e=>{e.querySelectorAll('.footnotes > ol > li[id^="fn"], #refs > *[id^="ref-"]').forEach((t=>{const s=`a[href="#${t.id}"]`;e.querySelectorAll(`${s} > sup, sup > ${s}, .citation > ${s}, ${s}.citation`).forEach((s=>{const o=s.parentNode;("A"===s.tagName?s:o).removeAttribute("href");const l=e.createElement("div");for(l.className="side side-right",/^fn/.test(t.id)?(l.innerHTML=t.innerHTML,l.firstElementChild.insertAdjacentHTML("afterbegin",`<span class="bg-number">${s.innerText}</span> `),l.querySelector('a[href^="#fnref"]')?.remove(),l.className+=" footnotes"):l.innerHTML=t.outerHTML;"#text"===l.lastChild?.nodeName&&/^\s*$/.test(l.lastChild.textContent);)l.lastChild.remove();l.querySelectorAll(".fullwidth").forEach((e=>e.classList.remove("fullwidth")));const r=s.classList.contains("citation")?s:o;r.after(l),r.classList.add("note-ref"),t.remove()}))})),e.querySelectorAll(".footnotes, #refs").forEach((e=>{/^\s*$/.test(e.innerText)&&e.remove()})),e.getElementById("TOC")?.classList.add("side","side-left");const t=e.querySelectorAll(".side.side-right, .side.side-left"),s=[];e.querySelectorAll(".fullwidth").forEach((e=>{s.push([e,e.getBoundingClientRect()])})),t.length&&e.body.classList.add("has-sidenotes"),t.forEach((e=>{const t=e.getBoundingClientRect();for(let e of s){const s=e[1];t.right<s.left||t.left>s.right||t.bottom<s.top||t.top>s.bottom||e[0].classList.remove("fullwidth")}}))})(document);
{
"name": "@xiee/utils",
"version": "1.12.30",
"version": "1.12.31",
"description": "Miscellaneous tools and utilities to manipulate HTML pages",

@@ -5,0 +5,0 @@ "scripts": {

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