mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-07 12:16:04 +00:00
Update editor.html
This commit is contained in:
parent
be9ed37eea
commit
46a3049d62
|
@ -85,6 +85,7 @@
|
|||
<script>
|
||||
var editor;
|
||||
var currentFileName = "sayhello.js";
|
||||
var serverBaseUrl = "http://localhost:3000";
|
||||
|
||||
function resizeEditor() {
|
||||
if (editor) {
|
||||
|
@ -97,7 +98,7 @@
|
|||
}
|
||||
|
||||
function getSuggestions(word, range) {
|
||||
return axios.get("http://localhost:3000/completion/" + encodeURIComponent(word))
|
||||
return axios.get(serverBaseUrl + "/completion/" + encodeURIComponent(word))
|
||||
.then(function (response) {
|
||||
var parser = new XMLParser();
|
||||
var result = parser.parse(response.data);
|
||||
|
@ -249,7 +250,7 @@
|
|||
};
|
||||
|
||||
async function getTargetByUrl(urlPart) {
|
||||
const response = await fetch('http://localhost:3000/devtools/json');
|
||||
const response = await fetch(serverBaseUrl + "/devtools/json");
|
||||
const targets = await response.json();
|
||||
|
||||
const target = targets.find(target => target.url.includes(urlPart));
|
||||
|
|
Loading…
Reference in New Issue
Block a user