Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #325 from IDotD/idrinth
Browse files Browse the repository at this point in the history
fixes #323
  • Loading branch information
Idrinth authored Dec 4, 2017
2 parents bcdfd88 + e100862 commit 9e0f92a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mods/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ idrinth.core = {
* @returns {undefined}
*/
run: function(url, success, failure, timeout, additionalHeader) {
if(!idrinth.start && idrinth.settings.get("server")) {
return;
}
var requestHandler = new XMLHttpRequest();
requestHandler.onreadystatechange = function(event) {
var request = (event || window.event).target;
Expand Down Expand Up @@ -367,6 +370,7 @@ idrinth.core = {
}
var blobURL = window.URL.createObjectURL(
new Blob([
"/*js:big*/" +//replaced server-side from libs/[name].js
"self.onmessage = function(message) {var work=" +
inWorker.toString() +
";self.postMessage(work(message.data));self.close();}"
Expand Down
5 changes: 5 additions & 0 deletions src/mods/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ idrinth.settings = {
* @type {object}
*/
data: {
/**
*
* @type Boolean
*/
server: false,
/**
*
* @type Boolean
Expand Down
6 changes: 6 additions & 0 deletions src/mods/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,12 @@ idrinth.ui = {
rType: "#input",
type: "checkbox",
label: "setting.warBottomPage"
},
{
name: "server",
rType: "#input",
type: "checkbox",
label: "setting.server"
}
],
"general"
Expand Down

0 comments on commit 9e0f92a

Please sign in to comment.