Skip to content

Commit

Permalink
remove unsupported import syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Dec 30, 2022
1 parent c49ebf4 commit 8a17e2d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 29 deletions.
4 changes: 0 additions & 4 deletions src/helpers/cookie-utils.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { nativeIsNaN } from './number-utils';

/**
* @typedef { import('../scriptlets/index').Source } Source
*/

/**
* Checks whether the input path is supported
*
Expand Down
6 changes: 1 addition & 5 deletions src/helpers/hit.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
/* eslint-disable no-console, no-underscore-dangle */

/**
* @typedef { import('../scriptlets/index').Source } Source
*/

/**
* Hit used only for debug purposes now
*
* @param {Source} source
* @param {object} source scriptlet properties
* use LOG_MARKER = 'log: ' at the start of a message
* for logging scriptlets
*/
Expand Down
6 changes: 1 addition & 5 deletions src/helpers/injector.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/**
* @typedef { import('../scriptlets/index').Source } Source
*/

/**
* Concat dependencies to scriptlet code
*
Expand Down Expand Up @@ -48,7 +44,7 @@ export function addCall(scriptlet, code) {
* function noeval(source) { alert(source); }
* noeval.apply(this, args);
* )({"args": ["aaa", "bbb"], "name":"noeval"}, ["aaa", "bbb"])`
* @param {Source} source - object with scriptlet properties
* @param {object} source - object with scriptlet properties
* @param {string} code - scriptlet source code with dependencies
* @param {boolean} redirect if function is redirect
* @returns {string} full scriptlet code
Expand Down
6 changes: 1 addition & 5 deletions src/helpers/log-message.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
/**
* @typedef { import('../scriptlets/index').Source } Source
*/

/**
* Conditionally logs message to console.
* Convention is to log messages by source.verbose if such log
* is not a part of scriptlet's functionality, eg on invalid input,
* and use 'forced' argument otherwise.
*
* @param {Source} source required
* @param {object} source required, scriptlet properties
* @param {string} message required, message to log
* @param {boolean} [forced=false] to log message unconditionally
*/
Expand Down
6 changes: 1 addition & 5 deletions src/helpers/match-request-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ import {
} from './request-utils';
import { logMessage } from './log-message';

/**
* @typedef { import('../scriptlets/index').Source } Source
*/

/**
* Checks if given propsToMatch string matches with given request data
* This is used by prevent-xhr, prevent-fetch, trusted-replace-xhr-response
* and trusted-replace-fetch-response scriptlets
*
* @param {Source} source scriptlet properties
* @param {object} source scriptlet properties
* @param {string} propsToMatch string of space-separated request properties to match
* @param {object} requestData object with standard properties of fetch/xhr like url, method etc
* @returns {boolean} if request properties match
Expand Down
6 changes: 1 addition & 5 deletions src/helpers/storage-utils.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { nativeIsNaN } from './number-utils';
import { logMessage } from './log-message';

/**
* @typedef { import('../scriptlets/index').Source } Source
*/

/**
* Sets item to a specified storage, if storage isn't full.
*
* @param {Source} source scriptlet's configuration
* @param {object} source scriptlet's configuration
* @param {Storage} storage storage instance to set item into
* @param {string} key storage key
* @param {string} value staroge value
Expand Down

0 comments on commit 8a17e2d

Please sign in to comment.