Skip to content

Commit

Permalink
添加chrme-extension类型
Browse files Browse the repository at this point in the history
  • Loading branch information
1234567Yang authored Jun 22, 2024
1 parent 71a078f commit b697fdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function covToAbs(element) {
// Check and update the attribute if necessary
if (setAttr !== "" && relativePath.indexOf(nowlink) != 0) {
if (!relativePath.includes("*")) {
if (!relativePath.startsWith("data:") && !relativePath.startsWith("javascript:")) {
if (!relativePath.startsWith("data:") && !relativePath.startsWith("javascript:") && !relativePath.startsWith("chrome-extension:")) {
try {
var absolutePath = new URL(relativePath, path).href;
absolutePath = nowlink + absolutePath;
Expand Down Expand Up @@ -554,7 +554,7 @@ function covToAbs(body, requestPathNow) {
if (!strReplace.includes(thisProxyServerUrl_hostOnly)) {
if (!isPosEmbed(body, replace.index)) {
var relativePath = strReplace.substring(match[1].toString().length, strReplace.length - 1);
if (!relativePath.startsWith("data:") && !relativePath.startsWith("javascript:")) {
if (!relativePath.startsWith("data:") && !relativePath.startsWith("javascript:") && !relativePath.startsWith("chrome-extension:")) {
try {
var absolutePath = thisProxyServerUrlHttps + new URL(relativePath, requestPathNow).href;
//body = body.replace(strReplace, match[1].toString() + absolutePath + `"`);
Expand Down

0 comments on commit b697fdc

Please sign in to comment.