textpattern-com
Advanced tools
Comparing version 1.8.3 to 1.8.4
{ | ||
"name": "textpattern-com", | ||
"description": "Official website of the Textpattern project.", | ||
"version": "1.8.3", | ||
"version": "1.8.4", | ||
"repository": { | ||
@@ -15,3 +15,3 @@ "type": "git", | ||
"@squoosh/cli": "0.7.1", | ||
"autoprefixer": "10.2.6", | ||
"autoprefixer": "10.3.1", | ||
"cssnano": "5.0.6", | ||
@@ -34,3 +34,3 @@ "grunt": "1.4.1", | ||
"stylelint-order": "4.1.0", | ||
"stylelint-scss": "3.19.0" | ||
"stylelint-scss": "3.20.1" | ||
}, | ||
@@ -37,0 +37,0 @@ "dependencies": { |
@@ -57,46 +57,2 @@ (function () | ||
} | ||
// Dark Mode. | ||
var imgPrefers = document.querySelectorAll('img.prefers-color-scheme'), | ||
isDark = window.matchMedia('screen and (prefers-color-scheme: dark)'); | ||
function makeImagesDark() | ||
{ | ||
for (var i = 0; i < imgPrefers.length; i++) { | ||
if (imgPrefers[i].getAttribute('data-src-dark')) { | ||
imgPrefers[i].setAttribute('src', imgPrefers[i].getAttribute('data-src-dark')); | ||
} | ||
if (imgPrefers[i].getAttribute('data-srcset-dark')) { | ||
imgPrefers[i].setAttribute('srcset', imgPrefers[i].getAttribute('data-srcset-dark')); | ||
} | ||
} | ||
} | ||
function makeImagesLight() | ||
{ | ||
for (var i = 0; i < imgPrefers.length; i++) { | ||
if (imgPrefers[i].getAttribute('data-src-light')) { | ||
imgPrefers[i].setAttribute('src', imgPrefers[i].getAttribute('data-src-light')); | ||
} | ||
if (imgPrefers[i].getAttribute('data-srcset-light')) { | ||
imgPrefers[i].setAttribute('srcset', imgPrefers[i].getAttribute('data-srcset-light')); | ||
} | ||
} | ||
} | ||
function toggleDarkMode(isDark) | ||
{ | ||
if (isDark.matches) { | ||
makeImagesDark(); | ||
} else { | ||
makeImagesLight(); | ||
} | ||
} | ||
toggleDarkMode(isDark); | ||
isDark.addListener(toggleDarkMode); | ||
})(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 18 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5076287
203
9694
28