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

globalseo

Package Overview
Dependencies
Maintainers
0
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

globalseo - npm Package Compare versions

Comparing version 2.2.21 to 2.2.22

2

package.json
{
"name": "globalseo",
"version": "2.2.21",
"version": "2.2.22",
"description": "Translate your React.js or Next.js app with AI",

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

@@ -81,2 +81,14 @@ const { getGlobalseoOptions, MERGE_PREFIX, setIsTranslationInitialized } = require("../configs");

// translate input type="submit" & input type="button"
const inputTypeButtonTags = Array.from(window.document.querySelectorAll('input[type="button"]'));
const inputTypeSubmitTags = Array.from(window.document.querySelectorAll('input[type="submit"]'));
const cleanInputTypeButtonTags = inputTypeButtonTags.filter((node) => (node.value || "").trim() && !isExcludedClassName(window,node.className) && !isExcludedId(window, node.id));
const cleanInputTypeSubmitTags = inputTypeSubmitTags.filter((node) => (node.value || "").trim() && !isExcludedClassName(window,node.className) && !isExcludedId(window, node.id));
otherNodes.push(
...cleanInputTypeButtonTags,
...cleanInputTypeSubmitTags,
)
const textNodes = [];

@@ -83,0 +95,0 @@ extractTextNodes(window, rootElement, textNodes);

@@ -170,3 +170,3 @@ const { isCompressionSupported } = require("../compressions");

if (node.tagName == "TEXTAREA" || node.tagName == "INPUT") {
if (node.tagName == "TEXTAREA" || (node.tagName == "INPUT" && node.type != "button" && node.type != "submit")) {
const placeholderCache = window.translationCache?.[window.location.pathname]?.[language]?.[node.placeholder]

@@ -185,2 +185,16 @@ // make sure the placeholder is not empty

if(node.tagName == "INPUT" && (node.type == "button" || node.type == "submit")) {
const valueCache = window.translationCache?.[window.location.pathname]?.[language]?.[node.value]
// make sure the value is not empty
if (
(node.value || "").trim() && !valueCache && !allTranslationValuesInAllPages.includes(node.value)
) {
notInCache.push(node.value);
}
if (valueCache) {
updateNode(window, node, language, "form", 5.20);
}
}
if(node.tagName == "OPTION") {

@@ -187,0 +201,0 @@ const cache = window.translationCache?.[window.location.pathname]?.[language]?.[node.textContent]

@@ -57,3 +57,3 @@ const { DEFAULT_UNTRANSLATED_VALUE, MERGE_PREFIX } = require("../configs");

if (type == "form" && (node.tagName == "TEXTAREA" || node.tagName == "INPUT")) {
if (type == "form" && (node.tagName == "TEXTAREA" || (node.tagName == "INPUT" && node.type != "button" && node.type != "submit"))) {
const newPlaceholder = window.translationCache?.[window.location.pathname]?.[language]?.[node.placeholder] || "";

@@ -66,2 +66,10 @@ if (newPlaceholder && !newPlaceholder.includes(DEFAULT_UNTRANSLATED_VALUE)) {

if (type == "form" && (node.tagName == "INPUT" && (node.type == "button" || node.type == "submit"))) {
const newValue = window.translationCache?.[window.location.pathname]?.[language]?.[node.value] || "";
if (newValue && !newValue.includes(DEFAULT_UNTRANSLATED_VALUE)) {
node.value = decodeHTMLEntities(window, newValue);
}
return;
}
if (type == "form" && node.tagName == "OPTION") {

@@ -68,0 +76,0 @@ const newText = window.translationCache?.[window.location.pathname]?.[language]?.[node.textContent] || "";

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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