New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@adguard/scriptlets

Package Overview
Dependencies
Maintainers
3
Versions
88
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
2.2.16
to
2.3.0
+94
dist/redirect-files/freewheel-admanager.js
(function(source, args) {
const flag = "done";
const uniqueIdentifier = source.uniqueId + source.name + "_" + (Array.isArray(args) ? args.join("_") : "");
if (source.uniqueId) {
if (Window.prototype.toString[uniqueIdentifier] === flag) {
return;
}
}
function FreewheelAdManager(source) {
var eventsMap = new Map;
var adManagerFunc = noopFunc;
adManagerFunc.prototype.addEventListener = function(type, callback) {
if (type) {
eventsMap.set(type, callback);
}
};
adManagerFunc.prototype.addKeyValue = noopFunc;
adManagerFunc.prototype.addTemporalSlot = noopFunc;
adManagerFunc.prototype.dispose = noopFunc;
adManagerFunc.prototype.newContext = noopThis;
adManagerFunc.prototype.registerCustomPlayer = noopFunc;
adManagerFunc.prototype.registerVideoDisplayBase = noopFunc;
adManagerFunc.prototype.removeEventListener = noopFunc;
adManagerFunc.prototype.resize = noopFunc;
adManagerFunc.prototype.setCapability = noopFunc;
adManagerFunc.prototype.setContentVideoElement = noopFunc;
adManagerFunc.prototype.setLogLevel = noopFunc;
adManagerFunc.prototype.setNetwork = noopFunc;
adManagerFunc.prototype.setParameter = noopFunc;
adManagerFunc.prototype.setProfile = noopFunc;
adManagerFunc.prototype.setServer = noopFunc;
adManagerFunc.prototype.setSiteSection = noopFunc;
adManagerFunc.prototype.setVideoAsset = noopFunc;
adManagerFunc.prototype.setVideoDisplaySize = noopFunc;
adManagerFunc.prototype.submitRequest = function() {
var event = {
type: window.tv.freewheel.SDK.EVENT_SLOT_ENDED
};
var callbackFunc = eventsMap.get("EVENT_SLOT_ENDED");
if (callbackFunc && typeof callbackFunc === "function") {
setTimeout((function() {
try {
callbackFunc(event);
} catch (ex) {}
}), 1);
}
};
window.tv = {
freewheel: {
SDK: {
_instanceQueue: {},
Ad: noopFunc,
AdListener: noopFunc,
AdManager: adManagerFunc,
EVENT_SLOT_ENDED: "EVENT_SLOT_ENDED",
setLogLevel: noopFunc
}
}
};
hit(source);
}
function hit(e) {
if (e.verbose) {
try {
var n = console.trace.bind(console), i = "[AdGuard] ";
"corelibs" === e.engine ? i += e.ruleText : (e.domainName && (i += `${e.domainName}`),
e.args ? i += `#%#//scriptlet('${e.name}', '${e.args.join("', '")}')` : i += `#%#//scriptlet('${e.name}')`),
n && n(i);
} catch (e) {}
"function" == typeof window.__debug && window.__debug(e);
}
}
function noopFunc() {}
function noopThis() {
return this;
}
const updatedArgs = args ? [].concat(source).concat(args) : [ source ];
try {
FreewheelAdManager.apply(this, updatedArgs);
if (source.uniqueId) {
Object.defineProperty(Window.prototype.toString, uniqueIdentifier, {
value: flag,
enumerable: false,
writable: false,
configurable: false
});
}
} catch (e) {
console.log(e);
}
})({
name: "freewheel-admanager",
args: []
}, []);
+1
-1

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

version=2.2.16
version=2.3.0
export { scriptlets } from "./scriptlets/index.js";
var version = "2.2.16";
var version = "2.3.0";

@@ -5,0 +5,0 @@ var SCRIPTLETS_VERSION = version;

@@ -11,3 +11,3 @@ (function(source, args) {

var _window$google$ima;
var VERSION = "3.453.0";
var VERSION = "3.746.0";
var ima = {};

@@ -319,2 +319,5 @@ var AdDisplayContainer = function AdDisplayContainer(containerElement) {

},
getCreativeId: function getCreativeId() {
return "";
},
getCreativeAdId: function getCreativeAdId() {

@@ -321,0 +324,0 @@ return "";

@@ -168,2 +168,3 @@ import jsYaml from "js-yaml";

"fingerprint3.js": "fingerprintjs3.js",
"freewheel-admanager": "freewheel-admanager.js",
gemius: "gemius.js",

@@ -170,0 +171,0 @@ "google-analytics-ga": "google-analytics-ga.js",

@@ -169,2 +169,8 @@ import { redirectsCompatibilityTable, GenericPlatform, modifiersCompatibilityTable, RuleCategory, CosmeticRuleType, NetworkRuleType } from "@adguard/agtree";

var trustedJsonSetNames = [ "trusted-json-set" ];
var trustedJsonSetFetchResponseNames = [ "trusted-json-set-fetch-response" ];
var trustedJsonSetXhrResponseNames = [ "trusted-json-set-xhr-response" ];
var AmazonApstagNames = [ "amazon-apstag", "ubo-amazon_apstag.js", "amazon_apstag.js" ];

@@ -178,2 +184,4 @@

var FreewheelAdManagerNames = [ "freewheel-admanager" ];
var GemiusNames = [ "gemius" ];

@@ -211,2 +219,3 @@

Fingerprintjs3Names: Fingerprintjs3Names,
FreewheelAdManagerNames: FreewheelAdManagerNames,
GemiusNames: GemiusNames,

@@ -289,2 +298,5 @@ GoogleAnalyticsGaNames: GoogleAnalyticsGaNames,

trustedDispatchEventNames: trustedDispatchEventNames,
trustedJsonSetFetchResponseNames: trustedJsonSetFetchResponseNames,
trustedJsonSetNames: trustedJsonSetNames,
trustedJsonSetXhrResponseNames: trustedJsonSetXhrResponseNames,
trustedPruneInboundObjectNames: trustedPruneInboundObjectNames,

@@ -291,0 +303,0 @@ trustedReplaceArgumentNames: trustedReplaceArgumentNames,

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

@@ -45,3 +45,3 @@ "type": "module",

"dependencies": {
"@adguard/agtree": "^4.0.1",
"@adguard/agtree": "^4.0.2",
"@types/trusted-types": "^2.0.7",

@@ -48,0 +48,0 @@ "js-yaml": "^3.14.1"

+17
-11

@@ -329,3 +329,3 @@ # AdGuard Scriptlets and Redirect Resources

For CoreLibs usage you should use `dist/scriptlets.corelibs.json` and `dist/redirects.json`.
For [CoreLibs] usage you should use `dist/scriptlets.corelibs.json` and `dist/redirects.json`.

@@ -508,3 +508,3 @@ File example:

API provided by CoreLibs content script.
API provided by [CoreLibs] content script.

@@ -896,12 +896,18 @@ This API is used to provide a set of utilities and shared state for scriptlets

- [CoreLibs](https://github.com/AdguardTeam/CoreLibs) (updates automatically)
- [TSUrlFilter](https://github.com/AdguardTeam/tsurlfilter)
- [FiltersCompiler](https://github.com/AdguardTeam/FiltersCompiler)
(`tsurlfilter`'s update might be required as well)
- [AdguardBrowserExtension](https://github.com/AdguardTeam/AdguardBrowserExtension)
(`tsurlfilter` also should be updated)
- [AdguardForSafari](https://github.com/AdguardTeam/AdGuardForSafari) (`adguard-resources` should be updated)
- [AdguardForiOS](https://github.com/AdguardTeam/AdguardForiOS)
(`tsurlfilter` should be updated in `advanced-adblocker-web-extension`)
- [CoreLibs] — updates automatically
- [TSUrlFilter monorepo] — [tsurlfilter] and [tswebextension] packages
- [FiltersCompiler] — [tsurlfilter] should be updated
- [AdguardBrowserExtension] — both [tsurlfilter] and [tswebextension] should be updated
- [SafariConverterLib] — needed for [AdGuardMiniForMac] and [AdguardForiOS]
[CoreLibs]: https://github.com/AdguardTeam/CoreLibs
[TSUrlFilter monorepo]: https://github.com/AdguardTeam/tsurlfilter
[tsurlfilter]: https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/tsurlfilter
[tswebextension]: https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/tswebextension
[FiltersCompiler]: https://github.com/AdguardTeam/FiltersCompiler
[AdguardBrowserExtension]: https://github.com/AdguardTeam/AdguardBrowserExtension
[SafariConverterLib]: https://github.com/AdguardTeam/SafariConverterLib
[AdGuardMiniForMac]: https://github.com/AdguardTeam/AdGuardMiniForMac
[AdguardForiOS]: https://github.com/AdguardTeam/AdguardForiOS
[ubo-redirect]: https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#redirect

@@ -908,0 +914,0 @@ [kb-basic-rules]: https://adguard.com/kb/general/ad-filtering/create-own-filters/#basic-rules

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

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