A new start

This commit is contained in:
2018-11-24 14:43:59 +01:00
commit 3c32c8a37a
24054 changed files with 1376258 additions and 0 deletions

88
src/autoloader.js Executable file
View File

@@ -0,0 +1,88 @@
var AutomaticDispose_Branch = "master";
var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/";
var da_lss_adis_time = new Date().getTime();
var ADis_AllMissions = /***ADis_AllMissions***/0;
if (typeof window.name != 'undefined') {
console.log(window.name);
}
var ADis_MyHead = document.getElementsByTagName('head')[0];
var ADis_MyBody = document.getElementsByTagName('body')[0];
function includesString(string1, string2) {
return string1.toLowerCase().includes(string2.toLowerCase());
}
async function ADisSettings() {
var res = {};
await ADisDB.ADisSettings.each((setting) => {
res[setting.name] = setting.value;
});
return res;
}
//=require ../node_modules/dexie/dist/dexie.js
// Create own MDisDB to use it later
//=require ../script/dexie_db.js
ADisDB.on("ready", () => {
//console.log(ADisDB);
//console.log(ADisSettings('Krankentransport-Automatic'));
// -
// - Google Font
// -
var styleElement = document.createElement("link");
styleElement.rel = "stylesheet";
styleElement.href = "https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700";
ADis_MyHead.appendChild(styleElement);
// -
// - FontAwesome 5
// -
var scriptElement = document.createElement("script");
scriptElement.type = "text/javascript";
scriptElement.src = "https://use.fontawesome.com/releases/v5.5.0/js/all.js";
ADis_MyHead.appendChild(scriptElement);
// -
// - Navbar Dashboard
// -
if (window.location.pathname === "/" || window.location.pathname === "/#") {
//=require ../script/interface.js
var styleElement = document.createElement("link");
styleElement.rel = "stylesheet";
styleElement.type = "text/css";
styleElement.media = "screen";
styleElement.href = AutomaticDispose_URL + AutomaticDispose_Branch + "/style/interface.css";
ADis_MyHead.appendChild(styleElement);
}
// -
// - Load Automatic Modes
// - Load Opener
// -
function ADis_UpdateOwnMissionsToDone(MissionID, updateData) {
if (typeof updateData != 'undefined') {
return ADisDB.ADisMissionsOwn.put({
missionID: MissionID
}, updateData).catch((err) => {})
}
return ADisDB.ADisMissionsOwn.put({
missionID: MissionID,
done: 'true'
}).catch((err) => {})
}
//=require ../script/mission.js
//=require ../script/sprechwunsch.js
});