app/scripts/contentscript.js
/**
 * Returns whether or not the extension (suffix) of the current document is prohibited
 *
 * This checks {@code window.location.pathname} against a set of file extensions
 * that should not have web3 injected into them. This check is indifferent of query parameters
 * in the location.
 *
 * @returns {boolean} whether or not the extension of the current document is prohibited
 */
Returns whether or not the extension (suffix) of the current document is prohibited
This checks  window.location.pathname against a set of file extensions
that should not have web3 injected into them. This check is indifferent of query parameters
in the location.

@returns {boolean} whether or not the extension of the current document is prohibited
Returns whether or not the extension ( suffix ) of the current document is prohibited This checks window . location . pathname against a set of file extensions that should not have web3 injected into them . This check is indifferent of query parameters in the location . @returns { boolean } whether or not the extension of the current document is prohibited
function suffixCheck () {
  const prohibitedTypes = [
    /\.xml$/,
    /\.pdf$/,
  ]
  const currentUrl = window.location.pathname
  for (let i = 0; i < prohibitedTypes.length; i++) {
    if (prohibitedTypes[i].test(currentUrl)) {
      return false
    }
  }
  return true
}
function suffixCheck ( ) { const prohibitedTypes = [ / \.xml$ / , / \.pdf$ / , ] const currentUrl = window . location . pathname for ( let i = 0 ; i < prohibitedTypes . length ; i ++ ) { if ( prohibitedTypes [ i ] . test ( currentUrl ) ) { return false } } return true }
Returns whether or not the extension (suffix) of the current document is prohibited
 This checks {@code window.location.pathname} against a set of file extensions
 that should not have web3 injected into them.
Returns whether or not the extension ( suffix ) of the current document is prohibited This checks { @code window . location . pathname } against a set of file extensions that should not have web3 injected into them .