Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ndla/article-scripts

Package Overview
Dependencies
Maintainers
5
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndla/article-scripts - npm Package Compare versions

Comparing version 0.5.10 to 0.5.11

6

es/figureScripts.js

@@ -92,4 +92,5 @@ /**

var parentFigure = target.closest('figure');
var sourceTag = parentFigure && parentFigure.getElementsByTagName('source')[0];
if (target.dataset.expanded) {
if (parentFigure && target.dataset.expanded) {
target.setAttribute('aria-label', target.dataset.aria);

@@ -99,3 +100,4 @@ target.classList.remove('c-figure__fullscreen-btn--expanded');

delete target.dataset.expanded;
} else {
} else if (sourceTag) {
sourceTag.setAttribute('sizes', '(min-width: 1024px) 1024px, 100vw');
target.setAttribute('aria-label', target.dataset.ariaexpanded);

@@ -102,0 +104,0 @@ parentFigure.classList.remove(target.dataset.classtype);

@@ -110,4 +110,5 @@ "use strict";

var parentFigure = target.closest('figure');
var sourceTag = parentFigure && parentFigure.getElementsByTagName('source')[0];
if (target.dataset.expanded) {
if (parentFigure && target.dataset.expanded) {
target.setAttribute('aria-label', target.dataset.aria);

@@ -117,3 +118,4 @@ target.classList.remove('c-figure__fullscreen-btn--expanded');

delete target.dataset.expanded;
} else {
} else if (sourceTag) {
sourceTag.setAttribute('sizes', '(min-width: 1024px) 1024px, 100vw');
target.setAttribute('aria-label', target.dataset.ariaexpanded);

@@ -120,0 +122,0 @@ parentFigure.classList.remove(target.dataset.classtype);

{
"name": "@ndla/article-scripts",
"version": "0.5.10",
"version": "0.5.11",
"description": "A collection of functions for making article content responsive (and interactive)",

@@ -30,3 +30,3 @@ "license": "GPL-3.0",

},
"gitHead": "ffba847067bb684b37789a5fb071b5720d2e49cf"
"gitHead": "cb68eba4d3b6df9ba20ec650a367a6ec15693bf8"
}
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