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

script: fix base_path and screenlog/babelpolyfill error

This commit is contained in:
Kushagra Gour
2018-01-24 10:25:33 +05:30
parent 70c95e123e
commit b48c855814

View File

@ -124,7 +124,7 @@ loginModal, profileModal, profileAvatarImg, profileUserName, openItemsBtn
};
const AUTO_SAVE_INTERVAL = 15000; // 15 seconds
const BASE_PATH = chrome.extension ? '/' : '/app';
const BASE_PATH = (chrome.extension || window.DEBUG) ? '/' : '/app';
const DEFAULT_PROFILE_IMG = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='#ccc' d='M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z' /%3E%3C/svg%3E";
var updateTimer,
@ -1038,7 +1038,9 @@ loginModal, profileModal, profileAvatarImg, profileUserName, openItemsBtn
if (jsMode === JsModes.ES6) {
contents +=
'<script src="' +
chrome.extension.getURL('lib/transpilers/babel-polyfill.min.js') +
(chrome.extension
? chrome.extension.getURL('lib/transpilers/babel-polyfill.min.js')
: `${location.origin}${BASE_PATH}/lib/transpilers/babel-polyfill.min.js`) +
'"></script>';
}