Skip to content

Commit 4f5d293

Browse files
committed
naming consistency
1 parent 50b8d6d commit 4f5d293

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
'use strict';
44

5-
const SETUP_STRING = 'live-reload-extension-new-setup';
5+
const SETUP_STRING = 'live-reload-extension-new-setup-v2';
66

77
function sendMsgToAllContainPage(req, data) {
88
chrome.tabs.query({}, tabs => {

popup/popup.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828

2929
<div class="row">
3030
<div>
31-
<input type="checkbox" id="proxyCheckBox">
32-
<label for="proxyCheckBox">I don't want proxy setup</label>
31+
<input type="checkbox" id="noProxyCheckBox">
32+
<label for="noProxyCheckBox">I don't want proxy setup</label>
3333
</div>
3434
</div>
3535

popup/popup.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'use strict';
44

55
const liveReloadCheck = document.getElementById('liveReloadCheck');
6-
const proxyCheckBox = document.getElementById('proxyCheckBox');
6+
const noProxyCheckBox = document.getElementById('noProxyCheckBox');
77
const actualServerAddress = document.getElementById('actualServer');
88
const liveServerAddress = document.getElementById('liveServer');
99
const submitBtn = document.getElementById('submitBtn');
@@ -13,7 +13,7 @@
1313
function submitForm() {
1414
const formData = {
1515
isEnable: liveReloadCheck.checked,
16-
proxySetup: proxyCheckBox.checked,
16+
proxySetup: !noProxyCheckBox.checked,
1717
actualUrl: actualServerAddress.value || '',
1818
liveServerUrl: liveServerAddress.value || ''
1919
}
@@ -27,23 +27,24 @@
2727
liveReloadCheck.onclick = () => {
2828
submitForm();
2929
}
30-
proxyCheckBox.onchange = () => {
30+
noProxyCheckBox.onchange = () => {
3131
submitForm();
3232
}
3333

34-
proxyCheckBox.onclick = () => {
35-
serverSetupDiv.className = proxyCheckBox.checked ? 'show' : 'hide';
34+
noProxyCheckBox.onclick = () => {
35+
serverSetupDiv.className = noProxyCheckBox.checked ? 'show' : 'hide';
3636
}
3737

3838
document.addEventListener('DOMContentLoaded', () => {
3939
chrome.runtime.sendMessage({
4040
req: 'get-live-server-config'
4141
}, (data) => {
42+
console.log('popupwidnow')
4243
liveReloadCheck.checked = data.isEnable || false;
43-
proxyCheckBox.checked = data.proxySetup || false;
44+
noProxyCheckBox.checked = data.proxySetup || false;
4445
actualServerAddress.value = data.actualUrl || '';
4546
liveServerAddress.value = data.liveServerUrl || '';
46-
serverSetupDiv.className = proxyCheckBox.checked ? 'show' : 'hide';
47+
serverSetupDiv.className = noProxyCheckBox.checked ? 'show' : 'hide';
4748
});
4849
});
4950

0 commit comments

Comments
 (0)