Revert to standard js database (local Chrome browser support avoiding CORS error).

This commit is contained in:
kor 2018-10-31 14:43:15 +13:00
parent eff3e720c9
commit 0b8851bac8
3 changed files with 6 additions and 14 deletions

View File

@ -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
TAGS : gamedev
`

View File

@ -13,6 +13,7 @@
<script src="logic/lib/indental.js"></script>
<script src="logic/lib/theme.js"></script>
<script src="content/data.ndtl"></script>
<script src="content/settings.js"></script>
<script src="logic/wrap.js"></script>
<script src="logic/view.js"></script>
@ -30,6 +31,7 @@
<script>
var main = new Main();
main.install();
main.start();
</script>
</body>
</html>

View File

@ -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()