diff --git a/src/content/content.js b/src/content/content.js index 7972979..25c6ff4 100644 --- a/src/content/content.js +++ b/src/content/content.js @@ -178,6 +178,15 @@ ns.on("capabilities", () => { notifyPage(); }); +prefetchCSSResources(false, (rule, url) => { + debug("Prefetching %s from CSS", url, rule.cssText); + /* Uncomment to debug prefetching by prefixing the prefetched domains + url.hostname = `prefetch.${url.hostname}`; + new Image().src = url; + return true; + */ +}); + ns.fetchPolicy(); notifyPage(); diff --git a/src/manifest.json b/src/manifest.json index cdb1c48..9d3b725 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -103,6 +103,7 @@ "nscl/common/RequestKey.js", "content/DocumentCSP.js", "nscl/content/NoscriptElements.js", + "/nscl/content/prefetchCSSResources.js", "content/onScriptDisabled.js", "content/staticNS.js", "content/PlaceHolder.js", diff --git a/src/nscl b/src/nscl index b222a9f..7ec0758 160000 --- a/src/nscl +++ b/src/nscl @@ -1 +1 @@ -Subproject commit b222a9fdb06ff5ae5049aeeee32dcc83a4ef4c2a +Subproject commit 7ec0758e425af9676466fe5f537b65b7998d4823