-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
abstract path to localstorage and improve styles
- Loading branch information
Showing
6 changed files
with
105 additions
and
35 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="style.css"> | ||
<script src="main.js"></script> | ||
</head> | ||
<body> | ||
<h1>Node Debug Manager</h1> | ||
<div class="config-area"> | ||
<h1>Config:</h1> | ||
<label for="path-input-field">Location of file:</label> | ||
<input id="path-input-field" type="text" placeholder="/Users/dewwwald/your.json"> | ||
<button id="start-debugger">start</button> | ||
</div> | ||
<div class="about-me"> | ||
<p> | ||
For more about me visit my website at <a target="_blank" href="http://dewwwald.com">dewwwald.com</a>. | ||
</p> | ||
</div> | ||
<p style="margin-bottom: 0px;"><small>licened under MIT</small></p> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
document.onreadystatechange = function () { | ||
if (document.readyState === 'complete') { | ||
let startButton = document.getElementById('start-debugger'); | ||
let pathInputField = document.getElementById('path-input-field'); | ||
|
||
pathInputField.addEventListener('change', function () { | ||
localStorage.setItem('prefs', JSON.stringify({ path: this.value })); | ||
}, false); | ||
|
||
startButton.addEventListener('click', function () { | ||
chrome.extension.sendMessage('kjppjhifcapacgldhmagolflapbdgnko', { | ||
action: 'start' | ||
}); | ||
}, false); | ||
|
||
chrome.extension.sendMessage('kjppjhifcapacgldhmagolflapbdgnko', { | ||
action: 'prefs' | ||
}, function (response) { | ||
pathInputField.value = response.path | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
html { | ||
font-size: calc(12 / 16 * 100%); | ||
} | ||
body { | ||
min-width: 300px; | ||
min-height: 100px; | ||
overflow-x: hidden; | ||
font-family: helvetica, sans-serif; | ||
font-size: 12px; | ||
} | ||
|
||
input, | ||
button { | ||
margin-bottom: 5px; | ||
display: block; | ||
width: 100%; | ||
outline: none !important; | ||
font-size: 1rem; | ||
padding: 5px 10px; | ||
} | ||
|
||
h1 { | ||
font-size: 14px; | ||
} | ||
|
||
.config-area { | ||
margin-bottom: 10px; | ||
padding: 5px; | ||
border: 1px #999 solid; | ||
border-radius: 5px; | ||
} | ||
|
||
.about-me { | ||
padding: 5px; | ||
border: 1px #999 solid; | ||
border-radius: 5px; | ||
} |