Skip to content

Commit 738f4a4

Browse files
committed
avoid jQuery
1 parent e4e98a1 commit 738f4a4

2 files changed

Lines changed: 22 additions & 114 deletions

File tree

public/includeIDE.js

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,28 @@ let scripts = [
88
includeJsAndCss(scripts, () => {
99
window.onload = function () {
1010
if(window.jo_doc.startsWith("http")){
11-
$.ajax({
12-
url: window.jo_doc,
13-
type:"get",
14-
dataType:'text',
15-
success: function(data){
16-
initScripts(data);
17-
},
18-
error:function() {
19-
alert("Fehler beim Laden von " + jo_doc);
20-
}
21-
});
11+
12+
fetch(window.jo_doc, {
13+
method: "GET"
14+
}).then((response) => {
15+
response.json().then((data) => {
16+
initScripts(data);
17+
} )
18+
}).catch(() => {
19+
alert("Fehler beim Laden von " + jo_doc)
20+
})
21+
22+
// $.ajax({
23+
// url: window.jo_doc,
24+
// type:"get",
25+
// dataType:'text',
26+
// success: function(data){
27+
// initScripts(data);
28+
// },
29+
// error:function() {
30+
// alert("Fehler beim Laden von " + jo_doc);
31+
// }
32+
// });
2233
} else {
2334
initScripts(window.jo_doc);
2435
}

src/client/includeide/includeIDE.js

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)