mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-13 12:45:36 +07:00
Upgrade deps
* polyfill to 0.12.0 * Pickr to 1.9.1 * jQuery to 3.7.1
This commit is contained in:
@@ -10,8 +10,8 @@
|
|||||||
factory(mod);
|
factory(mod);
|
||||||
global.browser = mod.exports;
|
global.browser = mod.exports;
|
||||||
}
|
}
|
||||||
})(this, function (module) {
|
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (module) {
|
||||||
/* webextension-polyfill - v0.4.0 - Wed Feb 06 2019 11:58:31 */
|
/* webextension-polyfill - v0.12.0 - Tue May 14 2024 18:01:29 */
|
||||||
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||||
/* vim: set sts=2 sw=2 et tw=80: */
|
/* vim: set sts=2 sw=2 et tw=80: */
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
@@ -19,9 +19,11 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
if (typeof browser === "undefined" || Object.getPrototypeOf(browser) !== Object.prototype) {
|
if (!(globalThis.chrome && globalThis.chrome.runtime && globalThis.chrome.runtime.id)) {
|
||||||
|
throw new Error("This script should only be loaded in a browser extension.");
|
||||||
|
}
|
||||||
|
if (!(globalThis.browser && globalThis.browser.runtime && globalThis.browser.runtime.id)) {
|
||||||
const CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE = "The message port closed before a response was received.";
|
const CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE = "The message port closed before a response was received.";
|
||||||
const SEND_RESPONSE_DEPRECATION_WARNING = "Returning a Promise is the preferred way to send a reply from an onMessage/onMessageExternal listener, as the sendResponse will be removed from the specs (See https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage)";
|
|
||||||
|
|
||||||
// Wrapping the bulk of this polyfill in a one-time-use function is a minor
|
// Wrapping the bulk of this polyfill in a one-time-use function is a minor
|
||||||
// optimization for Firefox. Since Spidermonkey does not fully parse the
|
// optimization for Firefox. Since Spidermonkey does not fully parse the
|
||||||
@@ -250,6 +252,12 @@
|
|||||||
"minArgs": 3,
|
"minArgs": 3,
|
||||||
"maxArgs": 3,
|
"maxArgs": 3,
|
||||||
"singleCallbackArg": true
|
"singleCallbackArg": true
|
||||||
|
},
|
||||||
|
"elements": {
|
||||||
|
"createSidebarPane": {
|
||||||
|
"minArgs": 1,
|
||||||
|
"maxArgs": 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -456,10 +464,6 @@
|
|||||||
"minArgs": 0,
|
"minArgs": 0,
|
||||||
"maxArgs": 0
|
"maxArgs": 0
|
||||||
},
|
},
|
||||||
"getBrowserInfo": {
|
|
||||||
"minArgs": 0,
|
|
||||||
"maxArgs": 0
|
|
||||||
},
|
|
||||||
"getPlatformInfo": {
|
"getPlatformInfo": {
|
||||||
"minArgs": 0,
|
"minArgs": 0,
|
||||||
"maxArgs": 0
|
"maxArgs": 0
|
||||||
@@ -596,6 +600,14 @@
|
|||||||
"minArgs": 0,
|
"minArgs": 0,
|
||||||
"maxArgs": 1
|
"maxArgs": 1
|
||||||
},
|
},
|
||||||
|
"goBack": {
|
||||||
|
"minArgs": 0,
|
||||||
|
"maxArgs": 1
|
||||||
|
},
|
||||||
|
"goForward": {
|
||||||
|
"minArgs": 0,
|
||||||
|
"maxArgs": 1
|
||||||
|
},
|
||||||
"highlight": {
|
"highlight": {
|
||||||
"minArgs": 1,
|
"minArgs": 1,
|
||||||
"maxArgs": 1
|
"maxArgs": 1
|
||||||
@@ -694,7 +706,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Object.keys(apiMetadata).length === 0) {
|
if (Object.keys(apiMetadata).length === 0) {
|
||||||
throw new Error("api-metadata.json has not been included in browser-polyfill");
|
throw new Error("api-metadata.json has not been included in browser-polyfill");
|
||||||
}
|
}
|
||||||
@@ -714,12 +725,10 @@
|
|||||||
super(items);
|
super(items);
|
||||||
this.createItem = createItem;
|
this.createItem = createItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
get(key) {
|
get(key) {
|
||||||
if (!this.has(key)) {
|
if (!this.has(key)) {
|
||||||
this.set(key, this.createItem(key));
|
this.set(key, this.createItem(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.get(key);
|
return super.get(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -751,13 +760,17 @@
|
|||||||
* promise.
|
* promise.
|
||||||
* @param {function} promise.resolve
|
* @param {function} promise.resolve
|
||||||
* The promise's resolution function.
|
* The promise's resolution function.
|
||||||
* @param {function} promise.rejection
|
* @param {function} promise.reject
|
||||||
* The promise's rejection function.
|
* The promise's rejection function.
|
||||||
* @param {object} metadata
|
* @param {object} metadata
|
||||||
* Metadata about the wrapped method which has created the callback.
|
* Metadata about the wrapped method which has created the callback.
|
||||||
* @param {integer} metadata.maxResolvedArgs
|
* @param {boolean} metadata.singleCallbackArg
|
||||||
* The maximum number of arguments which may be passed to the
|
* Whether or not the promise is resolved with only the first
|
||||||
* callback created by the wrapped async function.
|
* argument of the callback, alternatively an array of all the
|
||||||
|
* callback arguments is resolved. By default, if the callback
|
||||||
|
* function is invoked with only a single argument, that will be
|
||||||
|
* resolved to the promise, while all arguments will be resolved as
|
||||||
|
* an array if multiple are given.
|
||||||
*
|
*
|
||||||
* @returns {function}
|
* @returns {function}
|
||||||
* The generated callback function.
|
* The generated callback function.
|
||||||
@@ -765,7 +778,7 @@
|
|||||||
const makeCallback = (promise, metadata) => {
|
const makeCallback = (promise, metadata) => {
|
||||||
return (...callbackArgs) => {
|
return (...callbackArgs) => {
|
||||||
if (extensionAPIs.runtime.lastError) {
|
if (extensionAPIs.runtime.lastError) {
|
||||||
promise.reject(extensionAPIs.runtime.lastError);
|
promise.reject(new Error(extensionAPIs.runtime.lastError.message));
|
||||||
} else if (metadata.singleCallbackArg || callbackArgs.length <= 1 && metadata.singleCallbackArg !== false) {
|
} else if (metadata.singleCallbackArg || callbackArgs.length <= 1 && metadata.singleCallbackArg !== false) {
|
||||||
promise.resolve(callbackArgs[0]);
|
promise.resolve(callbackArgs[0]);
|
||||||
} else {
|
} else {
|
||||||
@@ -773,7 +786,6 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const pluralizeArguments = numArgs => numArgs == 1 ? "argument" : "arguments";
|
const pluralizeArguments = numArgs => numArgs == 1 ? "argument" : "arguments";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -791,9 +803,13 @@
|
|||||||
* The maximum number of arguments which may be passed to the
|
* The maximum number of arguments which may be passed to the
|
||||||
* function. If called with more than this number of arguments, the
|
* function. If called with more than this number of arguments, the
|
||||||
* wrapper will raise an exception.
|
* wrapper will raise an exception.
|
||||||
* @param {integer} metadata.maxResolvedArgs
|
* @param {boolean} metadata.singleCallbackArg
|
||||||
* The maximum number of arguments which may be passed to the
|
* Whether or not the promise is resolved with only the first
|
||||||
* callback created by the wrapped async function.
|
* argument of the callback, alternatively an array of all the
|
||||||
|
* callback arguments is resolved. By default, if the callback
|
||||||
|
* function is invoked with only a single argument, that will be
|
||||||
|
* resolved to the promise, while all arguments will be resolved as
|
||||||
|
* an array if multiple are given.
|
||||||
*
|
*
|
||||||
* @returns {function(object, ...*)}
|
* @returns {function(object, ...*)}
|
||||||
* The generated wrapper function.
|
* The generated wrapper function.
|
||||||
@@ -803,35 +819,37 @@
|
|||||||
if (args.length < metadata.minArgs) {
|
if (args.length < metadata.minArgs) {
|
||||||
throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`);
|
throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length > metadata.maxArgs) {
|
if (args.length > metadata.maxArgs) {
|
||||||
throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`);
|
throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (metadata.fallbackToNoCallback) {
|
if (metadata.fallbackToNoCallback) {
|
||||||
// This API method has currently no callback on Chrome, but it return a promise on Firefox,
|
// This API method has currently no callback on Chrome, but it return a promise on Firefox,
|
||||||
// and so the polyfill will try to call it with a callback first, and it will fallback
|
// and so the polyfill will try to call it with a callback first, and it will fallback
|
||||||
// to not passing the callback if the first call fails.
|
// to not passing the callback if the first call fails.
|
||||||
try {
|
try {
|
||||||
target[name](...args, makeCallback({ resolve, reject }, metadata));
|
target[name](...args, makeCallback({
|
||||||
|
resolve,
|
||||||
|
reject
|
||||||
|
}, metadata));
|
||||||
} catch (cbError) {
|
} catch (cbError) {
|
||||||
console.warn(`${name} API method doesn't seem to support the callback parameter, ` + "falling back to call it without a callback: ", cbError);
|
console.warn(`${name} API method doesn't seem to support the callback parameter, ` + "falling back to call it without a callback: ", cbError);
|
||||||
|
|
||||||
target[name](...args);
|
target[name](...args);
|
||||||
|
|
||||||
// Update the API method metadata, so that the next API calls will not try to
|
// Update the API method metadata, so that the next API calls will not try to
|
||||||
// use the unsupported callback anymore.
|
// use the unsupported callback anymore.
|
||||||
metadata.fallbackToNoCallback = false;
|
metadata.fallbackToNoCallback = false;
|
||||||
metadata.noCallback = true;
|
metadata.noCallback = true;
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
} else if (metadata.noCallback) {
|
} else if (metadata.noCallback) {
|
||||||
target[name](...args);
|
target[name](...args);
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
target[name](...args, makeCallback({ resolve, reject }, metadata));
|
target[name](...args, makeCallback({
|
||||||
|
resolve,
|
||||||
|
reject
|
||||||
|
}, metadata));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -863,7 +881,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
let hasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);
|
let hasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -895,18 +912,14 @@
|
|||||||
has(proxyTarget, prop) {
|
has(proxyTarget, prop) {
|
||||||
return prop in target || prop in cache;
|
return prop in target || prop in cache;
|
||||||
},
|
},
|
||||||
|
|
||||||
get(proxyTarget, prop, receiver) {
|
get(proxyTarget, prop, receiver) {
|
||||||
if (prop in cache) {
|
if (prop in cache) {
|
||||||
return cache[prop];
|
return cache[prop];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(prop in target)) {
|
if (!(prop in target)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
let value = target[prop];
|
let value = target[prop];
|
||||||
|
|
||||||
if (typeof value === "function") {
|
if (typeof value === "function") {
|
||||||
// This is a method on the underlying object. Check if we need to do
|
// This is a method on the underlying object. Check if we need to do
|
||||||
// any wrapping.
|
// any wrapping.
|
||||||
@@ -929,6 +942,9 @@
|
|||||||
// of. Create a sub-object wrapper for it with the appropriate child
|
// of. Create a sub-object wrapper for it with the appropriate child
|
||||||
// metadata.
|
// metadata.
|
||||||
value = wrapObject(value, wrappers[prop], metadata[prop]);
|
value = wrapObject(value, wrappers[prop], metadata[prop]);
|
||||||
|
} else if (hasOwnProperty(metadata, "*")) {
|
||||||
|
// Wrap all properties in * namespace.
|
||||||
|
value = wrapObject(value, wrappers[prop], metadata["*"]);
|
||||||
} else {
|
} else {
|
||||||
// We don't need to do any wrapping for this property,
|
// We don't need to do any wrapping for this property,
|
||||||
// so just forward all access to the underlying object.
|
// so just forward all access to the underlying object.
|
||||||
@@ -942,14 +958,11 @@
|
|||||||
target[prop] = value;
|
target[prop] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache[prop] = value;
|
cache[prop] = value;
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
|
|
||||||
set(proxyTarget, prop, value, receiver) {
|
set(proxyTarget, prop, value, receiver) {
|
||||||
if (prop in cache) {
|
if (prop in cache) {
|
||||||
cache[prop] = value;
|
cache[prop] = value;
|
||||||
@@ -958,11 +971,9 @@
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
defineProperty(proxyTarget, prop, desc) {
|
defineProperty(proxyTarget, prop, desc) {
|
||||||
return Reflect.defineProperty(cache, prop, desc);
|
return Reflect.defineProperty(cache, prop, desc);
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteProperty(proxyTarget, prop) {
|
deleteProperty(proxyTarget, prop) {
|
||||||
return Reflect.deleteProperty(cache, prop);
|
return Reflect.deleteProperty(cache, prop);
|
||||||
}
|
}
|
||||||
@@ -1002,19 +1013,36 @@
|
|||||||
addListener(target, listener, ...args) {
|
addListener(target, listener, ...args) {
|
||||||
target.addListener(wrapperMap.get(listener), ...args);
|
target.addListener(wrapperMap.get(listener), ...args);
|
||||||
},
|
},
|
||||||
|
|
||||||
hasListener(target, listener) {
|
hasListener(target, listener) {
|
||||||
return target.hasListener(wrapperMap.get(listener));
|
return target.hasListener(wrapperMap.get(listener));
|
||||||
},
|
},
|
||||||
|
|
||||||
removeListener(target, listener) {
|
removeListener(target, listener) {
|
||||||
target.removeListener(wrapperMap.get(listener));
|
target.removeListener(wrapperMap.get(listener));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const onRequestFinishedWrappers = new DefaultWeakMap(listener => {
|
||||||
|
if (typeof listener !== "function") {
|
||||||
|
return listener;
|
||||||
|
}
|
||||||
|
|
||||||
// Keep track if the deprecation warning has been logged at least once.
|
/**
|
||||||
let loggedSendResponseDeprecationWarning = false;
|
* Wraps an onRequestFinished listener function so that it will return a
|
||||||
|
* `getContent()` property which returns a `Promise` rather than using a
|
||||||
|
* callback API.
|
||||||
|
*
|
||||||
|
* @param {object} req
|
||||||
|
* The HAR entry object representing the network request.
|
||||||
|
*/
|
||||||
|
return function onRequestFinished(req) {
|
||||||
|
const wrappedReq = wrapObject(req, {} /* wrappers */, {
|
||||||
|
getContent: {
|
||||||
|
minArgs: 0,
|
||||||
|
maxArgs: 0
|
||||||
|
}
|
||||||
|
});
|
||||||
|
listener(wrappedReq);
|
||||||
|
};
|
||||||
|
});
|
||||||
const onMessageWrappers = new DefaultWeakMap(listener => {
|
const onMessageWrappers = new DefaultWeakMap(listener => {
|
||||||
if (typeof listener !== "function") {
|
if (typeof listener !== "function") {
|
||||||
return listener;
|
return listener;
|
||||||
@@ -1039,26 +1067,19 @@
|
|||||||
*/
|
*/
|
||||||
return function onMessage(message, sender, sendResponse) {
|
return function onMessage(message, sender, sendResponse) {
|
||||||
let didCallSendResponse = false;
|
let didCallSendResponse = false;
|
||||||
|
|
||||||
let wrappedSendResponse;
|
let wrappedSendResponse;
|
||||||
let sendResponsePromise = new Promise(resolve => {
|
let sendResponsePromise = new Promise(resolve => {
|
||||||
wrappedSendResponse = function (response) {
|
wrappedSendResponse = function (response) {
|
||||||
if (!loggedSendResponseDeprecationWarning) {
|
|
||||||
console.warn(SEND_RESPONSE_DEPRECATION_WARNING, new Error().stack);
|
|
||||||
loggedSendResponseDeprecationWarning = true;
|
|
||||||
}
|
|
||||||
didCallSendResponse = true;
|
didCallSendResponse = true;
|
||||||
resolve(response);
|
resolve(response);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
let result;
|
let result;
|
||||||
try {
|
try {
|
||||||
result = listener(message, sender, wrappedSendResponse);
|
result = listener(message, sender, wrappedSendResponse);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
result = Promise.reject(err);
|
result = Promise.reject(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
const isResultThenable = result !== true && isThenable(result);
|
const isResultThenable = result !== true && isThenable(result);
|
||||||
|
|
||||||
// If the listener didn't returned true or a Promise, or called
|
// If the listener didn't returned true or a Promise, or called
|
||||||
@@ -1085,7 +1106,6 @@
|
|||||||
} else {
|
} else {
|
||||||
message = "An unexpected error occurred";
|
message = "An unexpected error occurred";
|
||||||
}
|
}
|
||||||
|
|
||||||
sendResponse({
|
sendResponse({
|
||||||
__mozWebExtensionPolyfillReject__: true,
|
__mozWebExtensionPolyfillReject__: true,
|
||||||
message
|
message
|
||||||
@@ -1109,8 +1129,10 @@
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
const wrappedSendMessageCallback = ({
|
||||||
const wrappedSendMessageCallback = ({ reject, resolve }, reply) => {
|
reject,
|
||||||
|
resolve
|
||||||
|
}, reply) => {
|
||||||
if (extensionAPIs.runtime.lastError) {
|
if (extensionAPIs.runtime.lastError) {
|
||||||
// Detect when none of the listeners replied to the sendMessage call and resolve
|
// Detect when none of the listeners replied to the sendMessage call and resolve
|
||||||
// the promise to undefined as in Firefox.
|
// the promise to undefined as in Firefox.
|
||||||
@@ -1118,7 +1140,7 @@
|
|||||||
if (extensionAPIs.runtime.lastError.message === CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE) {
|
if (extensionAPIs.runtime.lastError.message === CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE) {
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
reject(extensionAPIs.runtime.lastError);
|
reject(new Error(extensionAPIs.runtime.lastError.message));
|
||||||
}
|
}
|
||||||
} else if (reply && reply.__mozWebExtensionPolyfillReject__) {
|
} else if (reply && reply.__mozWebExtensionPolyfillReject__) {
|
||||||
// Convert back the JSON representation of the error into
|
// Convert back the JSON representation of the error into
|
||||||
@@ -1128,52 +1150,68 @@
|
|||||||
resolve(reply);
|
resolve(reply);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const wrappedSendMessage = (name, metadata, apiNamespaceObj, ...args) => {
|
const wrappedSendMessage = (name, metadata, apiNamespaceObj, ...args) => {
|
||||||
if (args.length < metadata.minArgs) {
|
if (args.length < metadata.minArgs) {
|
||||||
throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`);
|
throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length > metadata.maxArgs) {
|
if (args.length > metadata.maxArgs) {
|
||||||
throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`);
|
throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const wrappedCb = wrappedSendMessageCallback.bind(null, { resolve, reject });
|
const wrappedCb = wrappedSendMessageCallback.bind(null, {
|
||||||
|
resolve,
|
||||||
|
reject
|
||||||
|
});
|
||||||
args.push(wrappedCb);
|
args.push(wrappedCb);
|
||||||
apiNamespaceObj.sendMessage(...args);
|
apiNamespaceObj.sendMessage(...args);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const staticWrappers = {
|
const staticWrappers = {
|
||||||
|
devtools: {
|
||||||
|
network: {
|
||||||
|
onRequestFinished: wrapEvent(onRequestFinishedWrappers)
|
||||||
|
}
|
||||||
|
},
|
||||||
runtime: {
|
runtime: {
|
||||||
onMessage: wrapEvent(onMessageWrappers),
|
onMessage: wrapEvent(onMessageWrappers),
|
||||||
onMessageExternal: wrapEvent(onMessageWrappers),
|
onMessageExternal: wrapEvent(onMessageWrappers),
|
||||||
sendMessage: wrappedSendMessage.bind(null, "sendMessage", { minArgs: 1, maxArgs: 3 })
|
sendMessage: wrappedSendMessage.bind(null, "sendMessage", {
|
||||||
|
minArgs: 1,
|
||||||
|
maxArgs: 3
|
||||||
|
})
|
||||||
},
|
},
|
||||||
tabs: {
|
tabs: {
|
||||||
sendMessage: wrappedSendMessage.bind(null, "sendMessage", { minArgs: 2, maxArgs: 3 })
|
sendMessage: wrappedSendMessage.bind(null, "sendMessage", {
|
||||||
|
minArgs: 2,
|
||||||
|
maxArgs: 3
|
||||||
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const settingMetadata = {
|
const settingMetadata = {
|
||||||
clear: { minArgs: 1, maxArgs: 1 },
|
clear: {
|
||||||
get: { minArgs: 1, maxArgs: 1 },
|
minArgs: 1,
|
||||||
set: { minArgs: 1, maxArgs: 1 }
|
maxArgs: 1
|
||||||
|
},
|
||||||
|
get: {
|
||||||
|
minArgs: 1,
|
||||||
|
maxArgs: 1
|
||||||
|
},
|
||||||
|
set: {
|
||||||
|
minArgs: 1,
|
||||||
|
maxArgs: 1
|
||||||
|
}
|
||||||
};
|
};
|
||||||
apiMetadata.privacy = {
|
apiMetadata.privacy = {
|
||||||
network: {
|
network: {
|
||||||
networkPredictionEnabled: settingMetadata,
|
"*": settingMetadata
|
||||||
webRTCIPHandlingPolicy: settingMetadata
|
|
||||||
},
|
},
|
||||||
services: {
|
services: {
|
||||||
passwordSavingEnabled: settingMetadata
|
"*": settingMetadata
|
||||||
},
|
},
|
||||||
websites: {
|
websites: {
|
||||||
hyperlinkAuditingEnabled: settingMetadata,
|
"*": settingMetadata
|
||||||
referrersEnabled: settingMetadata
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return wrapObject(extensionAPIs, staticWrappers, apiMetadata);
|
return wrapObject(extensionAPIs, staticWrappers, apiMetadata);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1181,6 +1219,7 @@
|
|||||||
// `module` variable available.
|
// `module` variable available.
|
||||||
module.exports = wrapAPIs(chrome);
|
module.exports = wrapAPIs(chrome);
|
||||||
} else {
|
} else {
|
||||||
module.exports = browser;
|
module.exports = globalThis.browser;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//# sourceMappingURL=browser-polyfill.js.map
|
||||||
|
|||||||
3
css/pickr.nano.min.css
vendored
3
css/pickr.nano.min.css
vendored
File diff suppressed because one or more lines are too long
2
external_js/jquery-3.7.1.min.js
vendored
Normal file
2
external_js/jquery-3.7.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
external_js/pickr.min.js
vendored
6
external_js/pickr.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -112,7 +112,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<!-- Optional JavaScript -->
|
<!-- Optional JavaScript -->
|
||||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||||
<script src="../browser-polyfill.js"></script>
|
<script src="../browser-polyfill.js"></script>
|
||||||
<script src="../external_js/jquery-3.6.0.min.js"></script>
|
<script src="../external_js/jquery-3.7.1.min.js"></script>
|
||||||
<script src="../external_js/datatables.min.js"></script>
|
<script src="../external_js/datatables.min.js"></script>
|
||||||
<script src="../core_js/log.js"></script>
|
<script src="../core_js/log.js"></script>
|
||||||
<script src="../core_js/write_version.js"></script>
|
<script src="../core_js/write_version.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user