Skip to content

Commit b697fdc

Browse files
authored
添加chrme-extension类型
1 parent 71a078f commit b697fdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function covToAbs(element) {
161161
// Check and update the attribute if necessary
162162
if (setAttr !== "" && relativePath.indexOf(nowlink) != 0) {
163163
if (!relativePath.includes("*")) {
164-
if (!relativePath.startsWith("data:") && !relativePath.startsWith("javascript:")) {
164+
if (!relativePath.startsWith("data:") && !relativePath.startsWith("javascript:") && !relativePath.startsWith("chrome-extension:")) {
165165
try {
166166
var absolutePath = new URL(relativePath, path).href;
167167
absolutePath = nowlink + absolutePath;
@@ -554,7 +554,7 @@ function covToAbs(body, requestPathNow) {
554554
if (!strReplace.includes(thisProxyServerUrl_hostOnly)) {
555555
if (!isPosEmbed(body, replace.index)) {
556556
var relativePath = strReplace.substring(match[1].toString().length, strReplace.length - 1);
557-
if (!relativePath.startsWith("data:") && !relativePath.startsWith("javascript:")) {
557+
if (!relativePath.startsWith("data:") && !relativePath.startsWith("javascript:") && !relativePath.startsWith("chrome-extension:")) {
558558
try {
559559
var absolutePath = thisProxyServerUrlHttps + new URL(relativePath, requestPathNow).href;
560560
//body = body.replace(strReplace, match[1].toString() + absolutePath + `"`);

0 commit comments

Comments
 (0)