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

@diplodoc/cut-extension

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@diplodoc/cut-extension - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

package.json
{
"name": "@diplodoc/cut-extension",
"version": "0.2.3",
"version": "0.2.4",
"description": "Cut extension for Diplodoc platform",

@@ -5,0 +5,0 @@ "main": "plugin/index.js",

@@ -5,3 +5,2 @@ export declare class YfmCutController {

destroy(): void;
_focusActiveCut(): void;
private _onDocClick;

@@ -8,0 +7,0 @@ private _findTitleInPath;

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

"use strict";(()=>{var c="yfm_cut",i={CUT:".yfm .yfm-cut",TITLE:".yfm .yfm-cut-title",CONTENT:".yfm .yfm-cut-content"},C={OPEN:"open"};var o=g=>{let t=g.composedPath();return Array.isArray(t)&&t.length>0?t[0]:g.target},n=g=>{let t=o(g);return!t||!t.matches};var I=class{__doc;constructor(t){this.__doc=t,this.__doc.addEventListener("click",this._onDocClick),this.__doc.addEventListener("DOMContentLoaded",this._focusActiveCut)}destroy(){this.__doc.removeEventListener("click",this._onDocClick)}_focusActiveCut(){let t=window.location.hash.slice(1),e=document.getElementById(t);e instanceof HTMLElement&&e.matches(i.CUT)&&(e.classList.toggle(C.OPEN),e.setAttribute("open","true"),setTimeout(()=>{e.classList.add("cut-highlight"),e.scrollIntoView()},70),setTimeout(()=>{e.classList.remove("cut-highlight")},1e3))}_onDocClick=t=>{if(n(t))return;let e=this._findTitleInPath(t);e&&this._toggleCut(e)};_findTitleInPath(t){let e=o(t);return this._matchTitle(e)?e:t.composedPath?.()?.find(this._matchTitle)}_matchTitle=t=>t instanceof HTMLElement?t?.matches?.(i.TITLE):!1;_toggleCut(t){t.parentElement?.classList.toggle(C.OPEN)}};typeof window<"u"&&typeof document<"u"&&!window[c]&&(window[c]=new I(document));})();
"use strict";(()=>{var C="yfm_cut",i={CUT:".yfm .yfm-cut",TITLE:".yfm .yfm-cut-title",CONTENT:".yfm .yfm-cut-content"},A={OPEN:"open"};var c=I=>{let t=I.composedPath();return Array.isArray(t)&&t.length>0?t[0]:I.target},o=I=>{let t=c(I);return!t||!t.matches};var e=class{__doc;constructor(t){this.__doc=t,this.__doc.addEventListener("click",this._onDocClick)}destroy(){this.__doc.removeEventListener("click",this._onDocClick)}_onDocClick=t=>{if(o(t))return;let g=this._findTitleInPath(t);g&&this._toggleCut(g)};_findTitleInPath(t){let g=c(t);return this._matchTitle(g)?g:t.composedPath?.()?.find(this._matchTitle)}_matchTitle=t=>t instanceof HTMLElement?t?.matches?.(i.TITLE):!1;_toggleCut(t){t.parentElement?.classList.toggle(A.OPEN)}};typeof window<"u"&&typeof document<"u"&&!window[C]&&(window[C]=new e(document));})();
//# sourceMappingURL=index.js.map

Sorry, the diff of this file is not supported yet

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