Skip to content

Commit

Permalink
release 21
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hassanin committed Nov 4, 2023
1 parent a3499a6 commit c38ad47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion ferris.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var ferrisTypes = [
a.setAttribute('target', '_blank')

var img = document.createElement('img')
img.setAttribute('src', 'img/' + type.attr + '.svg')
img.setAttribute('src', '../img/' + type.attr + '.svg')
img.setAttribute('title', type.title)
img.classList.add('ferris')
img.classList.add('ferris-' + size)
Expand Down
24 changes: 5 additions & 19 deletions theme/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,16 @@ function playground_text(playground, hidden = true) {
}

let text = playground_text(code_block);
let classes = code_block.querySelector("code").classList;

let Valhalla = 'valhalla';
let Java21 = '21';

var params = {
release: '20',
runtime: 'valhalla',
release: '21',
runtime: 'latest',
action: 'run',
preview: false,
preview: true,
code: text,
};

console.log(text);
result_block.innerText = "Running...";
let output;

const response = fetch_with_timeout("https://java-playground.com/execute", {
headers: {
Expand All @@ -141,19 +135,11 @@ function playground_text(playground, hidden = true) {
})
.then((response) => response.json())
.then((response) => {
console.log(response);
console.log(Object.keys(response));

for (var key in response) {
console.log(key);
console.log(response[key]);
}
//console.log(out);
if(response["success"] != true)
{
result_block.innerText = "stderr: " + response["stderr"];
result_block.innerText = response["stderr"];
}
result_block.innerText = "stdout: " + response["stdout"];
result_block.innerText = response["stdout"];
result_block.classList.remove("result-no-output");
})
.catch(
Expand Down

0 comments on commit c38ad47

Please sign in to comment.