Skip to content

Commit

Permalink
fix misc
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Nov 18, 2022
1 parent cfd9486 commit 3443834
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/scriptlets/abort-on-stack-trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function abortOnStackTrace(source, property, stack) {
}

if (!stack.match(/^(inlineScript|injectedScript)$/) && !isValidStrPattern(stack)) {
logMessage(source, `Invalid parameter: ${stack}`, source.verbose);
logMessage(source, `Invalid parameter: ${stack}`);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/scriptlets/adjust-setInterval.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function adjustSetInterval(source, matchCallback, matchDelay, boost) {
// https://github.com/AdguardTeam/Scriptlets/issues/221
if (!isValidCallback(callback)) {
// eslint-disable-next-line max-len
const message = `Scriptlet adjust-setInterval can not be applied because of invalid callback: '${String(callback)}'.`;
const message = `Scriptlet can't be applied because of invalid callback: '${String(callback)}'.`;
logMessage(source, message);
} else if (matchRegexp.test(callback.toString()) && isDelayMatched(matchDelay, delay)) {
delay *= getBoostMultiplier(boost);
Expand Down
2 changes: 1 addition & 1 deletion src/scriptlets/adjust-setTimeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function adjustSetTimeout(source, matchCallback, matchDelay, boost) {
// https://github.com/AdguardTeam/Scriptlets/issues/221
if (!isValidCallback(callback)) {
// eslint-disable-next-line max-len
const message = `Scriptlet adjust-setTimeout can not be applied because of invalid callback: '${String(callback)}'.`;
const message = `Scriptlet can't be applied because of invalid callback: '${String(callback)}'.`;
logMessage(source, message);
} else if (matchRegexp.test(callback.toString()) && isDelayMatched(matchDelay, delay)) {
delay *= getBoostMultiplier(boost);
Expand Down
2 changes: 1 addition & 1 deletion src/scriptlets/remove-attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function removeAttr(source, attrs, selector, applying = 'asap stay') {
try {
nodes = [].slice.call(document.querySelectorAll(selector));
} catch (e) {
logMessage(source, `Invalid remove-attr selector arg: '${selector}'`);
logMessage(source, `Invalid selector arg: '${selector}'`);
}
let removed = false;
nodes.forEach((node) => {
Expand Down
2 changes: 1 addition & 1 deletion src/scriptlets/remove-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function removeClass(source, classNames, selector, applying = 'asap stay'
try {
foundNodes = [].slice.call(document.querySelectorAll(selector));
} catch (e) {
logMessage(source, `Invalid remove-class selector arg: '${selector}'`);
logMessage(source, `Invalid selector arg: '${selector}'`);
}
foundNodes.forEach((n) => nodes.add(n));
} else if (selectors.length > 0) {
Expand Down

0 comments on commit 3443834

Please sign in to comment.