| Index: experimental/webtry/res/js/webtry.js
|
| diff --git a/experimental/webtry/res/js/webtry.js b/experimental/webtry/res/js/webtry.js
|
| index b4643ac221af9f52998e7aa53f84fa24c4bfd03f..b04ef7fb13b1bd978813cc6e99600bb3cb1c8107 100644
|
| --- a/experimental/webtry/res/js/webtry.js
|
| +++ b/experimental/webtry/res/js/webtry.js
|
| @@ -25,6 +25,7 @@
|
| var code = document.getElementById('code');
|
| var output = document.getElementById('output');
|
| var stdout = document.getElementById('stdout');
|
| + var gpu = document.getElementById('use-gpu');
|
| var img = document.getElementById('img');
|
| var imageWidth = document.getElementById('image-width');
|
| var imageHeight = document.getElementById('image-height');
|
| @@ -215,6 +216,7 @@
|
| img.src = '/i/'+body.hash+'.png';
|
| imageWidth.value = body.width;
|
| imageHeight.value = body.height;
|
| + gpu.checked = body.gpu;
|
| sourceSelectByID(body.source);
|
| if (permalink) {
|
| permalink.href = '/c/' + body.hash;
|
| @@ -293,7 +295,14 @@
|
| req.overrideMimeType('application/json');
|
| req.open('POST', '/', true);
|
| req.setRequestHeader('content-type', 'application/json');
|
| - req.send(JSON.stringify({'code': editor.getValue(), 'width': parseInt(imageWidth.value), 'height': parseInt(imageHeight.value), 'name': workspaceName, 'source': sourceId}));
|
| + req.send(JSON.stringify({
|
| + 'code': editor.getValue(),
|
| + 'width': parseInt(imageWidth.value),
|
| + 'height': parseInt(imageHeight.value),
|
| + 'name': workspaceName,
|
| + 'source': sourceId,
|
| + 'gpu': gpu.checked
|
| + }));
|
| }
|
| run.addEventListener('click', onSubmitCode);
|
|
|
|
|