From 0b8851bac83937b50f4af87fc2d876575e59cfb6 Mon Sep 17 00:00:00 2001 From: kor Date: Wed, 31 Oct 2018 14:43:15 +1300 Subject: [PATCH] Revert to standard js database (local Chrome browser support avoiding CORS error). --- docs/content/data.ndtl | 4 +++- docs/index.html | 2 ++ docs/logic/main.js | 14 +------------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/docs/content/data.ndtl b/docs/content/data.ndtl index b19c68d..ae769ae 100644 --- a/docs/content/data.ndtl +++ b/docs/content/data.ndtl @@ -1,3 +1,4 @@ +var DATABASE = ` AGAINST BEAUTY IN PHYSICS PERS : faun SRCE : Merveilles @@ -4001,4 +4002,5 @@ HOW TO MAKE A ROGUELIKE DATE : 12018-10-31 LINK : https://www.gridsagegames.com/blog/2018/10/how-to-make-a-roguelike/ PERS : Phil James - TAGS : gamedev \ No newline at end of file + TAGS : gamedev +` \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index ac1c8f7..5e92e0d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -13,6 +13,7 @@ + @@ -30,6 +31,7 @@ \ No newline at end of file diff --git a/docs/logic/main.js b/docs/logic/main.js index 87b198e..6cd683d 100644 --- a/docs/logic/main.js +++ b/docs/logic/main.js @@ -12,7 +12,6 @@ function Main() this.queryPrevAdd = ''; var parent = this; - const FILELOCATION = 'content/data.ndtl'; this.install = function() { @@ -21,17 +20,8 @@ function Main() this.lightbox = new Lightbox; this.lightbox.install(); - var oReq = new XMLHttpRequest(); - oReq.open('GET', FILELOCATION); - oReq.overrideMimeType("text/plain"); - oReq.addEventListener("load", function() { parent.setup(this.responseText); } ); - oReq.send(); - } - - this.setup = function(data) - { this.db = new Wrap(); - this.db.install(data); + this.db.install(DATABASE); this.view = new View(); this.view.install(); @@ -45,8 +35,6 @@ function Main() // main.add.close(); // } } - - this.start(); } this.start = function()