1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-26 08:11:17 +02:00

mv3 code changes

This commit is contained in:
Kushagra Gour
2024-02-20 10:59:51 +05:30
parent 831cfd74e5
commit 24cdf7ef7c
4 changed files with 31 additions and 29 deletions

View File

@@ -377,7 +377,7 @@ export function getCompleteHtml(html, css, js, item, isForExport) {
contents +=
'<script src="' +
(chrome.extension
? chrome.extension.getURL('lib/screenlog.js')
? chrome.runtime.getURL('lib/screenlog.js')
: `${location.origin}${
window.DEBUG ? '' : BASE_PATH
}/lib/screenlog.js`) +
@@ -388,7 +388,7 @@ export function getCompleteHtml(html, css, js, item, isForExport) {
contents +=
'<script src="' +
(chrome.extension
? chrome.extension.getURL('lib/transpilers/babel-polyfill.min.js')
? chrome.runtime.getURL('lib/transpilers/babel-polyfill.min.js')
: `${location.origin}${BASE_PATH}/lib/transpilers/babel-polyfill.min.js`) +
'"></script>';
}
@@ -495,7 +495,7 @@ export function prettify({ file, content, type }) {
}
const worker = new Worker(
chrome.extension
? chrome.extension.getURL('lib/prettier-worker.js')
? chrome.runtime.getURL('lib/prettier-worker.js')
: `${BASE_PATH !== '/' ? BASE_PATH : ''}/lib/prettier-worker.js`
);
worker.postMessage({ content, type });