diff --git a/background.js b/background.js
index 43832b2..87924e4 100644
--- a/background.js
+++ b/background.js
@@ -2,7 +2,7 @@
'use strict';
- const SETUP_STRING = 'live-reload-extension-new-setup';
+ const SETUP_STRING = 'live-reload-extension-new-setup-v2';
function sendMsgToAllContainPage(req, data) {
chrome.tabs.query({}, tabs => {
diff --git a/popup/popup.html b/popup/popup.html
index 32a0669..f9f324e 100644
--- a/popup/popup.html
+++ b/popup/popup.html
@@ -28,8 +28,8 @@
diff --git a/popup/popup.js b/popup/popup.js
index 491ed5a..580782a 100644
--- a/popup/popup.js
+++ b/popup/popup.js
@@ -3,7 +3,7 @@
'use strict';
const liveReloadCheck = document.getElementById('liveReloadCheck');
- const proxyCheckBox = document.getElementById('proxyCheckBox');
+ const noProxyCheckBox = document.getElementById('noProxyCheckBox');
const actualServerAddress = document.getElementById('actualServer');
const liveServerAddress = document.getElementById('liveServer');
const submitBtn = document.getElementById('submitBtn');
@@ -13,7 +13,7 @@
function submitForm() {
const formData = {
isEnable: liveReloadCheck.checked,
- proxySetup: proxyCheckBox.checked,
+ proxySetup: !noProxyCheckBox.checked,
actualUrl: actualServerAddress.value || '',
liveServerUrl: liveServerAddress.value || ''
}
@@ -27,23 +27,24 @@
liveReloadCheck.onclick = () => {
submitForm();
}
- proxyCheckBox.onchange = () => {
+ noProxyCheckBox.onchange = () => {
submitForm();
}
- proxyCheckBox.onclick = () => {
- serverSetupDiv.className = proxyCheckBox.checked ? 'show' : 'hide';
+ noProxyCheckBox.onclick = () => {
+ serverSetupDiv.className = noProxyCheckBox.checked ? 'show' : 'hide';
}
document.addEventListener('DOMContentLoaded', () => {
chrome.runtime.sendMessage({
req: 'get-live-server-config'
}, (data) => {
+ console.log('popupwidnow')
liveReloadCheck.checked = data.isEnable || false;
- proxyCheckBox.checked = data.proxySetup || false;
+ noProxyCheckBox.checked = data.proxySetup || false;
actualServerAddress.value = data.actualUrl || '';
liveServerAddress.value = data.liveServerUrl || '';
- serverSetupDiv.className = proxyCheckBox.checked ? 'show' : 'hide';
+ serverSetupDiv.className = noProxyCheckBox.checked ? 'show' : 'hide';
});
});