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

@xiee/utils

Package Overview
Dependencies
Maintainers
1
Versions
173
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.6.6 to 1.6.7

5

js/alt-title.js
[...document.getElementsByTagName('img')].forEach(el => {
if (!el.title) el.title = el.alt;
if (el.alt) {
el.alt = el.alt.replace(/\n/g, ' ');
if (!el.title) el.title = el.alt;
}
});

2

js/alt-title.min.js

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

[...document.getElementsByTagName("img")].forEach((t=>{t.title||(t.title=t.alt)}));
[...document.getElementsByTagName("img")].forEach((t=>{t.alt&&(t.alt=t.alt.replace(/\n/g," "),t.title||(t.title=t.alt))}));
(d => {
const r = /^(https?:)?\/\//;
d.querySelectorAll('a').forEach(a => {
if (!a.title) a.title = a.href;
if (!r.test(a.getAttribute('href'))) return;

@@ -5,0 +6,0 @@ // add _blank target to external links

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

(e=>{const t=/^(https?:)?\/\//;e.querySelectorAll("a").forEach((e=>{t.test(e.getAttribute("href"))&&(e.target="_blank",0===e.childElementCount&&t.test(e.innerText)&&(e.innerText=e.innerText.replace(t,"").replace(/(.+)#.*$/,"$1")))}))})(document);
(e=>{const t=/^(https?:)?\/\//;e.querySelectorAll("a").forEach((e=>{e.title||(e.title=e.href),t.test(e.getAttribute("href"))&&(e.target="_blank",0===e.childElementCount&&t.test(e.innerText)&&(e.innerText=e.innerText.replace(t,"").replace(/(.+)#.*$/,"$1")))}))})(document);
{
"name": "@xiee/utils",
"version": "1.6.6",
"version": "1.6.7",
"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