Add suboptimal default and user settings setup.

This commit is contained in:
kor 2018-07-20 17:38:35 +12:00
parent 47edbe45a1
commit 31e120e83a
3 changed files with 29 additions and 0 deletions

View File

@ -11,6 +11,9 @@
<script src="logic/runic.js"></script> <script src="logic/runic.js"></script>
<script src="logic/indental.js"></script> <script src="logic/indental.js"></script>
<script src="content/settingsUser.js"></script>
<script src="logic/settings.js"></script>
<script src="content/database.ndtl"></script> <script src="content/database.ndtl"></script>
<script src="logic/datawrap.js"></script> <script src="logic/datawrap.js"></script>
<script src="logic/viewmasonry.js"></script> <script src="logic/viewmasonry.js"></script>
@ -25,6 +28,17 @@
</div> </div>
<script> <script>
if (typeof SettingsUser !== 'undefined' )
{
var settings = new SettingsUser();
console.log('USER settings!');
}
else
{
var settings = new SettingsDefault();
console.log('DEFAULT settings!');
}
var main = new Main(); var main = new Main();
main.install(); main.install();
main.start(); main.start();

9
logic/settings.js Normal file
View File

@ -0,0 +1,9 @@
// DEFAULT SETTINGS FILE
// READ ME: Don't edit these, copy 'settingsUser.js' to '/content/settingsUser.js' and edit that.
// The copy file is done so that you can set your own settings/database/content etc but have
// and not have the repo override them or conflict with repo updates.
function SettingsDefault()
{
this.database = "content/database.ndtl";
}

6
settingsUser.js Normal file
View File

@ -0,0 +1,6 @@
// READ ME: In order to use these custom settings copy this file into the /content/ folder!
function SettingsUser()
{
this.database = "content/other.ndtl";
}