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

tml-js-browser

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tml-js-browser - npm Package Compare versions

Comparing version 0.4.15 to 0.4.17

9

lib/helpers.js

@@ -94,3 +94,10 @@ /**

includeAgent: function(app, options, callback) {
var agent_host = options.host || "https://cdn.translationexchange.com/tools/agent/" + options.version + "/agent.min.js";
var agent_host = options.host || "https://cdn.translationexchange.com/tools/agent/stable/agent.min.js";
if (options.cache) {
var t = new Date().getTime();
t = t - (t % options.cache);
agent_host += "?ts=" + t;
}
utils.addJS(window.document, 'tml-agent', agent_host, function() {

@@ -97,0 +104,0 @@ Trex.init(app.key, options);

35

lib/index.js

@@ -143,26 +143,21 @@ /**

options.agent = {
enabled: true,
version: "latest",
type: "tools"
type: 'agent',
cache: 864000000
};
}
if (options.agent.enabled) {
if (options.agent.type == "agent") {
helpers.includeAgent(tml.app, {
host: options.agent.host,
version: options.agent.version || "stable",
domains: options.agent.domains || {},
locale: options.current_locale,
source: options.current_source
}, function () {
if (callback) callback();
});
} else {
helpers.includeTools(tml.app, options.current_locale, function () {
if (callback) callback();
});
}
if (options.agent.type == "agent") {
helpers.includeAgent(tml.app, {
host: options.agent.host,
cache: options.agent.cache,
domains: options.agent.domains || {},
locale: options.current_locale,
source: options.current_source
}, function () {
if (callback) callback();
});
} else {
if (callback) callback();
helpers.includeTools(tml.app, options.current_locale, function () {
if (callback) callback();
});
}

@@ -169,0 +164,0 @@

{
"name": "tml-js-browser",
"description": "Translation plugin for browsers.",
"version": "0.4.15",
"version": "0.4.17",
"author": {

@@ -6,0 +6,0 @@ "name": "Michael Berkovich",

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