Organized the project files.

And also fixed some bugs.
This commit is contained in:
Bruce
2025-12-08 16:06:13 +08:00
parent ed7fe3af4b
commit d1813637c5
95 changed files with 46744 additions and 36366 deletions
+16
View File
@@ -1,5 +1,6 @@
(function(global) {
"use strict";
var cmdargs = JSON.parse(Bridge.External.cmdArgs);
function ready(e) {
var page = document.querySelector("#settingpage");
@@ -15,6 +16,8 @@
var item = items[keys[i]];
var inode = document.createElement("li");
inode.setAttribute("data-page", item.page);
inode.setAttribute("data-name", item.displayName);
inode.setAttribute("data-tag", keys[i]);
inode.textContent = item.displayName;
Windows.UI.Event.Util.addEvent(inode, "click", function(e) {
window.location = "settings/" + this.getAttribute("data-page");
@@ -22,6 +25,19 @@
list.appendChild(inode);
// WinJS.UI.Animation.createAddToListAnimation(list, inode).execute();
}
var current = "";
try { if (cmdargs.length > 0) current = cmdargs[0] } catch (e) {}
if (current && current.length > 0 && !Bridge.External.jump1) {
for (var i = 0; i < list.children.length; i++) {
if (Bridge.NString.equals(list.children[i].getAttribute("data-tag"), current)) {
Bridge.External.jump1 = true;
setTimeout(function(thisnode) {
thisnode.click();
}, 0, list.children[i]);
break;
}
}
}
}
OnLoad.add(ready);
})(this);