mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-23 05:10:27 +01:00
eslint cleanup
This commit is contained in:
parent
627ee6d21e
commit
3dc39e11a5
@ -51,6 +51,7 @@
|
|||||||
"no-unused-vars": "off",
|
"no-unused-vars": "off",
|
||||||
"no-use-before-define": ["error", {"functions": false}],
|
"no-use-before-define": ["error", {"functions": false}],
|
||||||
"no-useless-rename": "warn",
|
"no-useless-rename": "warn",
|
||||||
|
"no-useless-return": "warn",
|
||||||
"no-var": "error",
|
"no-var": "error",
|
||||||
"quotes": ["error", "double"],
|
"quotes": ["error", "double"],
|
||||||
"require-atomic-updates": "off",
|
"require-atomic-updates": "off",
|
||||||
|
@ -29,7 +29,6 @@ async function getMessagesInFile(path){
|
|||||||
return getMessagesInContent(content);
|
return getMessagesInContent(content);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log("file does not exist:", path);
|
console.log("file does not exist:", path);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,6 @@
|
|||||||
function interceptWindow(window){
|
function interceptWindow(window){
|
||||||
let wrappedTry;
|
let wrappedTry;
|
||||||
try {
|
try {
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const href = window.location.href;
|
const href = window.location.href;
|
||||||
wrappedTry = extension.getWrapped(window);
|
wrappedTry = extension.getWrapped(window);
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,6 @@
|
|||||||
getChannelData: {
|
getChannelData: {
|
||||||
object: ["AudioBuffer"],
|
object: ["AudioBuffer"],
|
||||||
fakeGenerator: function(checker){
|
fakeGenerator: function(checker){
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
return function getChannelData(channel){
|
return function getChannelData(channel){
|
||||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
const {prefs, notify, window, original} = check;
|
const {prefs, notify, window, original} = check;
|
||||||
@ -236,7 +235,6 @@
|
|||||||
copyFromChannel: {
|
copyFromChannel: {
|
||||||
object: ["AudioBuffer"],
|
object: ["AudioBuffer"],
|
||||||
fakeGenerator: function(checker){
|
fakeGenerator: function(checker){
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
return function copyFromChannel(destination, channelNumber, startInChannel){
|
return function copyFromChannel(destination, channelNumber, startInChannel){
|
||||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
const {prefs, notify, window, original} = check;
|
const {prefs, notify, window, original} = check;
|
||||||
@ -255,7 +253,6 @@
|
|||||||
getFrequencyResponse: {
|
getFrequencyResponse: {
|
||||||
object: ["BiquadFilterNode", "IIRFilterNode"],
|
object: ["BiquadFilterNode", "IIRFilterNode"],
|
||||||
fakeGenerator: function(checker){
|
fakeGenerator: function(checker){
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
return function getFrequencyResponse(frequencyArray, magResponseOutput, phaseResponseOutput){
|
return function getFrequencyResponse(frequencyArray, magResponseOutput, phaseResponseOutput){
|
||||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
const {prefs, notify, window, original} = check;
|
const {prefs, notify, window, original} = check;
|
||||||
|
@ -302,7 +302,6 @@
|
|||||||
},
|
},
|
||||||
object: "HTMLCanvasElement",
|
object: "HTMLCanvasElement",
|
||||||
fakeGenerator: function(checker){
|
fakeGenerator: function(checker){
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
return function(context, contextAttributes){
|
return function(context, contextAttributes){
|
||||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
const {window, original} = check;
|
const {window, original} = check;
|
||||||
@ -357,7 +356,6 @@
|
|||||||
},
|
},
|
||||||
object: "HTMLCanvasElement",
|
object: "HTMLCanvasElement",
|
||||||
fakeGenerator: function(checker){
|
fakeGenerator: function(checker){
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
return function toBlob(callback){
|
return function toBlob(callback){
|
||||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
const {prefs, notify, window, original} = check;
|
const {prefs, notify, window, original} = check;
|
||||||
@ -390,7 +388,6 @@
|
|||||||
},
|
},
|
||||||
object: "HTMLCanvasElement",
|
object: "HTMLCanvasElement",
|
||||||
fakeGenerator: function(checker){
|
fakeGenerator: function(checker){
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
return function mozGetAsFile(callback){
|
return function mozGetAsFile(callback){
|
||||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
const {prefs, notify, window, original} = check;
|
const {prefs, notify, window, original} = check;
|
||||||
@ -418,7 +415,6 @@
|
|||||||
},
|
},
|
||||||
object: "CanvasRenderingContext2D",
|
object: "CanvasRenderingContext2D",
|
||||||
fakeGenerator: function(checker){
|
fakeGenerator: function(checker){
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
return function getImageData(sx, sy, sw, sh){
|
return function getImageData(sx, sy, sw, sh){
|
||||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
const {prefs, notify, window, original} = check;
|
const {prefs, notify, window, original} = check;
|
||||||
@ -517,7 +513,6 @@
|
|||||||
},
|
},
|
||||||
object: "CanvasRenderingContext2D",
|
object: "CanvasRenderingContext2D",
|
||||||
fakeGenerator: function(checker){
|
fakeGenerator: function(checker){
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
return function fillText(str, x, y){
|
return function fillText(str, x, y){
|
||||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
const {prefs, notify, window, original} = check;
|
const {prefs, notify, window, original} = check;
|
||||||
@ -554,7 +549,6 @@
|
|||||||
},
|
},
|
||||||
object: "CanvasRenderingContext2D",
|
object: "CanvasRenderingContext2D",
|
||||||
fakeGenerator: function(checker){
|
fakeGenerator: function(checker){
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
return function strokeText(str, x, y){
|
return function strokeText(str, x, y){
|
||||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
const {prefs, notify, window, original} = check;
|
const {prefs, notify, window, original} = check;
|
||||||
@ -591,7 +585,7 @@
|
|||||||
},
|
},
|
||||||
object: ["WebGLRenderingContext", "WebGL2RenderingContext"],
|
object: ["WebGLRenderingContext", "WebGL2RenderingContext"],
|
||||||
fakeGenerator: function(checker){
|
fakeGenerator: function(checker){
|
||||||
// eslint-disable-next-line max-params, no-unused-vars
|
// eslint-disable-next-line max-params
|
||||||
return function readPixels(x, y, width, height, format, type, pixels){
|
return function readPixels(x, y, width, height, format, type, pixels){
|
||||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
const {prefs, notify, window, original} = check;
|
const {prefs, notify, window, original} = check;
|
||||||
|
@ -200,7 +200,7 @@
|
|||||||
return function getConstantPixelRng(length, window, ignoredColors){
|
return function getConstantPixelRng(length, window, ignoredColors){
|
||||||
const rng = scope.nonPersistent.getValueRng(1024, window);
|
const rng = scope.nonPersistent.getValueRng(1024, window);
|
||||||
|
|
||||||
// eslint-disable-next-line max-params, no-unused-vars
|
// eslint-disable-next-line max-params
|
||||||
return function(r, g, b, a, i){
|
return function(r, g, b, a, i){
|
||||||
const index = String.fromCharCode(r, g, b, a);
|
const index = String.fromCharCode(r, g, b, a);
|
||||||
if (ignoredColors[index]){
|
if (ignoredColors[index]){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user