webext-content-scripts
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -165,2 +165,5 @@ import chromeP from 'webext-polyfill-kinda'; | ||
export function isScriptableUrl(url) { | ||
if (!url.startsWith('http')) { | ||
return false; | ||
} | ||
const cleanUrl = url.replace(/^https?:\/\//, ''); | ||
@@ -167,0 +170,0 @@ return blockedPrefixes.every(blocked => !cleanUrl.startsWith(blocked)); |
{ | ||
"name": "webext-content-scripts", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Utility functions to inject content scripts in WebExtensions, for Manifest v2 and v3", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -177,3 +177,3 @@ # webext-content-scripts [](https://www.npmjs.com/package/webext-content-scripts) | ||
Browsers block access to some URLs for security reasons. This function will check whether a passed URL is blocked. Permissions and the manifest are not checked, this function is completely static. | ||
Browsers block access to some URLs for security reasons. This function will check whether a passed URL is blocked. Permissions and the manifest are not checked, this function is completely static. It will also returns `false` for any URL that doesn't start with `http`. | ||
@@ -180,0 +180,0 @@ More info may be found on: |
15988
247