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.39 to 2.2.40

2

browser.js

@@ -25,3 +25,3 @@ const extractOptionsFromScript = require("./extractOptionsFromScript.js");

if (translationMode != 'subdomain' && translationMode != 'subdirectory' && shouldReplaceLinks && paramsLang && (paramsLang != originalLanguage)) {
replaceLinks(window, {langParam, lang: paramsLang, translationMode: options.translationMode});
replaceLinks(window, {langParam, lang: paramsLang, translationMode: options.translationMode, sourceOrigin: options.sourceOrigin});
}

@@ -28,0 +28,0 @@ getTranslations(window, apiKey, options)

{
"name": "globalseo",
"version": "2.2.39",
"version": "2.2.40",
"description": "Translate your React.js or Next.js app with AI",

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

const getUnprefixedPathname = require("./utils/translation-mode/getUnprefixedPathname");
function replaceLinks(window, {langParam, lang, translationMode, prefix, sourceOriginHostname}) {
function replaceLinks(window, {langParam, lang, translationMode, prefix, sourceOriginHostname, sourceOrigin}) {
// Select all anchor tags

@@ -29,3 +29,3 @@ const anchors = window.document.querySelectorAll('a:not(.globalseo-ignore-link)');

if (!anchor.href.startsWith("http") && !anchor.href.startsWith("tel:") && !anchor.href.startsWith("mailto:")) {
const currentUrl = new URL(window.location.href);
const currentUrl = new URL(sourceOrigin || window.location.href);
const fullHref = `${currentUrl.protocol}//${currentUrl.hostname}${anchor.href}`;

@@ -32,0 +32,0 @@ anchor.href = fullHref;

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