Settings: build list of actions

This commit is contained in:
Tamius Han 2018-12-01 00:50:22 +01:00
parent fa0181815b
commit 8cc1d4c19f
3 changed files with 35 additions and 3 deletions

View File

@ -0,0 +1,28 @@
if(Debug.debug)
console.log("[settings.js] loading settings script!");
// document.getElementById("uw-version").textContent = browser.runtime.getManifest().version;
var settings = new Settings(undefined, () => updateConfig());
function updateConfig() {
loadConfig();
}
function loadConfig() {
loadActions();
}
// setup:
async function initSettings() {
await settings.init();
loadConfig();
}
initSettings();

View File

@ -40,7 +40,7 @@ var ui = {
// Customization settings
customization: {
actionList: BaseElement.fromExisting(document.getElementById('_customization_actions')),
actionList: BaseElement.fromExisting(document.getElementById('_customization_action_list')),
actionItems: [],
}
}

View File

@ -230,9 +230,13 @@
<script src="../../js/conf/ExtensionConf.js"></script>
<script src="../../js/lib/Settings.js"></script>
<script src="../../js/lib/KeyboardShortcutParser.js"></script>
<!-- ui libs -->
<script src="../../js/lib/libghettoui/BaseElement.js"></script>
<script src="./js/settingsvars.js"></script>
<script src="./js/settings.js"></script>
<script src="../../js/lib/libghettoui/settings/ActionItem.js"></script>
<script src="js/settingsvars.js"></script>
<script src="js/customization.js"></script>
<script src="js/settings.js"></script>
</body>
</html>