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

@adguard/scriptlets

Package Overview
Dependencies
Maintainers
3
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adguard/scriptlets - npm Package Compare versions

Comparing version 1.10.25 to 1.11.1

2

dist/build.txt

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

version=1.10.25
version=1.11.1

@@ -23,15 +23,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -38,0 +30,0 @@ if (trace) {

@@ -83,15 +83,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -98,0 +90,0 @@ if (trace) {

@@ -122,15 +122,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -137,0 +129,0 @@ if (trace) {

@@ -31,15 +31,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -46,0 +38,0 @@ if (trace) {

@@ -32,15 +32,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -47,0 +39,0 @@ if (trace) {

@@ -21,15 +21,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -36,0 +28,0 @@ if (trace) {

@@ -83,15 +83,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -98,0 +90,0 @@ if (trace) {

@@ -94,15 +94,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -109,0 +101,0 @@ if (trace) {

@@ -607,15 +607,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -622,0 +614,0 @@ if (trace) {

@@ -63,15 +63,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -78,0 +70,0 @@ if (trace) {

@@ -381,15 +381,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -396,0 +388,0 @@ if (trace) {

@@ -24,15 +24,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -39,0 +31,0 @@ if (trace) {

@@ -78,15 +78,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -93,0 +85,0 @@ if (trace) {

@@ -62,15 +62,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -77,0 +69,0 @@ if (trace) {

@@ -17,15 +17,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -32,0 +24,0 @@ if (trace) {

@@ -15,15 +15,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -30,0 +22,0 @@ if (trace) {

@@ -34,15 +34,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -49,0 +41,0 @@ if (trace) {

@@ -14,15 +14,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -29,0 +21,0 @@ if (trace) {

@@ -48,15 +48,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -63,0 +55,0 @@ if (trace) {

@@ -60,15 +60,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -75,0 +67,0 @@ if (trace) {

@@ -27,15 +27,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -42,0 +34,0 @@ if (trace) {

@@ -75,15 +75,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -90,0 +82,0 @@ if (trace) {

@@ -45,15 +45,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -60,0 +52,0 @@ if (trace) {

@@ -18,15 +18,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -33,0 +25,0 @@ if (trace) {

@@ -27,15 +27,7 @@ (function(source, args) {

var trace = console.trace.bind(console);
var prefix = source.ruleText || "";
var prefix = "";
if (source.domainName) {
var AG_SCRIPTLET_MARKER = "#%#//";
var UBO_SCRIPTLET_MARKER = "##+js";
var ruleStartIndex;
if (source.ruleText.includes(AG_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(AG_SCRIPTLET_MARKER);
} else if (source.ruleText.includes(UBO_SCRIPTLET_MARKER)) {
ruleStartIndex = source.ruleText.indexOf(UBO_SCRIPTLET_MARKER);
}
var rulePart = source.ruleText.slice(ruleStartIndex);
prefix = "".concat(source.domainName).concat(rulePart);
prefix += "".concat(source.domainName);
}
prefix += "#%#//scriptlet('".concat(source.name, "', '").concat(source.args.join(", "), "')");
log("".concat(prefix, " trace start"));

@@ -42,0 +34,0 @@ if (trace) {

@@ -38,5 +38,7 @@ declare module '@adguard/scriptlets' {

/**
* Source rule text is used for debugging purposes
* Source rule text is used for debugging purposes.
*
* @deprecated since it is not used in the code anymore.
*/
ruleText: string;
ruleText?: string;

@@ -173,2 +175,10 @@ /**

/**
* Checks if the specified redirect resource is compatible with AdGuard
*
* @param redirectName - Redirect resource name to check
* @returns - true if the redirect resource is compatible with AdGuard
*/
isRedirectResourceCompatibleWithAdg(redirectName: string): boolean;
/**
* Checks if the `rule` is **valid** AdGuard redirect resource rule

@@ -175,0 +185,0 @@ *

{
"name": "@adguard/scriptlets",
"version": "1.10.25",
"version": "1.11.1",
"description": "AdGuard's JavaScript library of Scriptlets and Redirect resources",

@@ -5,0 +5,0 @@ "scripts": {

@@ -44,2 +44,3 @@ # AdGuard Scriptlets and Redirect Resources

- [`isValidAdgRedirectRule()`](#redirects-api--isValidAdgRedirectRule)
- [`isRedirectResourceCompatibleWithAdg()`](#redirects-api--isRedirectResourceCompatibleWithAdg)
- [`isAdgRedirectCompatibleWithUbo()`](#redirects-api--isAdgRedirectCompatibleWithUbo)

@@ -451,3 +452,3 @@ - [`isUboRedirectCompatibleWithAdg()`](#redirects-api--isUboRedirectCompatibleWithAdg)

* @property {boolean} [verbose] — Flag to enable debug information printing to console.
* @property {string} [ruleText] — Source rule text, needed for debug purposes.
* @property {string} [ruleText] — Deprecated: Source rule text, needed for debug purposes.
* @property {string} [domainName] — Domain name where scriptlet is applied, needed for debug purposes.

@@ -498,3 +499,3 @@ */

*/
scriptlets.isValidScriptletRule(input);
scriptlets.isValidScriptletRule(ruleText);
```

@@ -615,2 +616,14 @@

##### <a name="redirects-api--isRedirectResourceCompatibleWithAdg"></a> `isRedirectResourceCompatibleWithAdg()`
```javascript
/**
* Checks if the specified redirect resource is compatible with AdGuard
*
* @param redirectName - Redirect resource name to check
* @returns true if the redirect resource is compatible with AdGuard
*/
redirects.isRedirectResourceCompatibleWithAdg(redirectName);
```
##### <a name="redirects-api--isAdgRedirectCompatibleWithUbo"></a> `isAdgRedirectCompatibleWithUbo()`

@@ -617,0 +630,0 @@

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

Sorry, the diff of this file is not supported yet

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

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