This commit is contained in:
Satanas1275 2026-07-18 07:54:33 +08:00 committed by GitHub
commit 4910582f90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 18 deletions

View file

@ -26,14 +26,14 @@ window.addEventListener("message", async (event) => {
messageId,
success: false,
error: response.error
}, "*");
}, window.location.origin);
} else {
window.postMessage({
source: "MOVIX_EXTENSION",
messageId,
success: true,
data: response
}, "*");
}, window.location.origin);
}
} catch (error) {
window.postMessage({
@ -41,7 +41,7 @@ window.addEventListener("message", async (event) => {
messageId,
success: false,
error: error.message
}, "*");
}, window.location.origin);
}
}
});
@ -55,6 +55,6 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
source: 'MOVIX_EXTENSION',
type: 'EXTRACTION_RESULT',
data: message.data
}, '*');
}, window.location.origin);
}
});

View file

@ -38,7 +38,7 @@ window.movixExtractM3u8 = function(type, url) {
action: 'EXTRACT_M3U8',
messageId,
payload: { type, url }
}, '*');
}, window.location.origin);
});
};
@ -77,7 +77,7 @@ window.movixExtractAllM3u8 = function(sources) {
action: 'EXTRACT_ALL_M3U8',
messageId,
payload: { sources }
}, '*');
}, window.location.origin);
});
};
@ -106,7 +106,7 @@ window.movixDetectEmbeds = function(sources) {
action: 'DETECT_EMBEDS',
messageId,
payload: { sources }
}, '*');
}, window.location.origin);
});
};
@ -134,6 +134,6 @@ window.movixSetupHeaders = function(type, url) {
action: 'SETUP_HEADERS',
messageId,
payload: { type, url }
}, '*');
}, window.location.origin);
});
};

View file

@ -29,14 +29,14 @@ window.addEventListener("message", async (event) => {
messageId,
success: false,
error: response.error
}, "*");
}, window.location.origin);
} else {
window.postMessage({
source: "MOVIX_EXTENSION",
messageId,
success: true,
data: response
}, "*");
}, window.location.origin);
}
} catch (error) {
window.postMessage({
@ -44,7 +44,7 @@ window.addEventListener("message", async (event) => {
messageId,
success: false,
error: error.message
}, "*");
}, window.location.origin);
}
}
});
@ -57,6 +57,6 @@ browserAPI.runtime.onMessage.addListener((message, sender, sendResponse) => {
source: 'MOVIX_EXTENSION',
type: 'EXTRACTION_RESULT',
data: message.data
}, '*');
}, window.location.origin);
}
});

View file

@ -38,7 +38,7 @@ window.movixExtractM3u8 = function(type, url) {
action: 'EXTRACT_M3U8',
messageId,
payload: { type, url }
}, '*');
}, window.location.origin);
});
};
@ -77,7 +77,7 @@ window.movixExtractAllM3u8 = function(sources) {
action: 'EXTRACT_ALL_M3U8',
messageId,
payload: { sources }
}, '*');
}, window.location.origin);
});
};
@ -106,7 +106,7 @@ window.movixDetectEmbeds = function(sources) {
action: 'DETECT_EMBEDS',
messageId,
payload: { sources }
}, '*');
}, window.location.origin);
});
};
@ -134,6 +134,6 @@ window.movixSetupHeaders = function(type, url) {
action: 'SETUP_HEADERS',
messageId,
payload: { type, url }
}, '*');
}, window.location.origin);
});
};

View file

@ -60,7 +60,7 @@ export const fetchFromExtension = <T = unknown>(
action,
payload: enrichedPayload,
messageId
}, "*");
}, window.location.origin);
// Timeout after 10 seconds
setTimeout(() => {

View file

@ -5173,7 +5173,7 @@
? payload.message
: payload?.error || String(payload || "Erreur inconnue"),
},
"*",
pageWindow.location.origin,
);
}