mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
build: 1.3.5-beta15
This commit is contained in:
parent
c10c87d28e
commit
dc39da8ca5
@ -209,7 +209,7 @@ async function onSettingWindowCreated(view: Element) {
|
||||
dom.input.type = "url";
|
||||
dom.input.value = host;
|
||||
dom.input.addEventListener("input", () => {
|
||||
ob11Config[type.split(".")[0]][type.split(".")[-1]][index] =
|
||||
ob11Config[type.split(".")[0]][type.split(".")[1]][index] =
|
||||
dom.input.value;
|
||||
});
|
||||
|
||||
@ -219,7 +219,7 @@ async function onSettingWindowCreated(view: Element) {
|
||||
dom.deleteBtn.innerHTML = "删除";
|
||||
dom.deleteBtn.dataset.type = "secondary";
|
||||
dom.deleteBtn.addEventListener("click", () => {
|
||||
ob11Config[type.split(".")[0]][type.split(".")[-1]].splice(index, 1);
|
||||
ob11Config[type.split(".")[0]][type.split(".")[1]].splice(index, 1);
|
||||
initReverseHost(type);
|
||||
});
|
||||
|
||||
@ -253,11 +253,11 @@ async function onSettingWindowCreated(view: Element) {
|
||||
buildHostListItem(
|
||||
type,
|
||||
"",
|
||||
ob11Config[type.split(".")[0]][type.split(".")[-1]].length,
|
||||
ob11Config[type.split(".")[0]][type.split(".")[1]].length,
|
||||
inputAttr
|
||||
)
|
||||
);
|
||||
ob11Config[type.split(".")[0]][type.split(".")[-1]].push("");
|
||||
ob11Config[type.split(".")[0]][type.split(".")[1]].push("");
|
||||
};
|
||||
const initReverseHost = (type: string, doc: Document = document) => {
|
||||
const hostContainerDom = doc.body?.querySelector(
|
||||
@ -266,7 +266,7 @@ async function onSettingWindowCreated(view: Element) {
|
||||
if (hostContainerDom) {
|
||||
[...hostContainerDom.childNodes].forEach((dom) => dom.remove());
|
||||
buildHostList(
|
||||
ob11Config[type.split(".")[0]][type.split(".")[-1]],
|
||||
ob11Config[type.split(".")[0]][type.split(".")[1]],
|
||||
type
|
||||
).forEach((dom) => {
|
||||
hostContainerDom?.appendChild(dom);
|
||||
|
@ -335,14 +335,14 @@ async function onSettingWindowCreated(view) {
|
||||
dom.input.type = "url";
|
||||
dom.input.value = host;
|
||||
dom.input.addEventListener("input", () => {
|
||||
ob11Config[type.split(".")[0]][type.split(".")[-1]][index] = dom.input.value;
|
||||
ob11Config[type.split(".")[0]][type.split(".")[1]][index] = dom.input.value;
|
||||
});
|
||||
dom.inputContainer.classList.add("q-input");
|
||||
dom.inputContainer.appendChild(dom.input);
|
||||
dom.deleteBtn.innerHTML = "删除";
|
||||
dom.deleteBtn.dataset.type = "secondary";
|
||||
dom.deleteBtn.addEventListener("click", () => {
|
||||
ob11Config[type.split(".")[0]][type.split(".")[-1]].splice(index, 1);
|
||||
ob11Config[type.split(".")[0]][type.split(".")[1]].splice(index, 1);
|
||||
initReverseHost(type);
|
||||
});
|
||||
dom.container.appendChild(dom.inputContainer);
|
||||
@ -364,11 +364,11 @@ async function onSettingWindowCreated(view) {
|
||||
buildHostListItem(
|
||||
type,
|
||||
"",
|
||||
ob11Config[type.split(".")[0]][type.split(".")[-1]].length,
|
||||
ob11Config[type.split(".")[0]][type.split(".")[1]].length,
|
||||
inputAttr
|
||||
)
|
||||
);
|
||||
ob11Config[type.split(".")[0]][type.split(".")[-1]].push("");
|
||||
ob11Config[type.split(".")[0]][type.split(".")[1]].push("");
|
||||
};
|
||||
const initReverseHost = (type, doc2 = document) => {
|
||||
const hostContainerDom = doc2.body?.querySelector(
|
||||
@ -377,7 +377,7 @@ async function onSettingWindowCreated(view) {
|
||||
if (hostContainerDom) {
|
||||
[...hostContainerDom.childNodes].forEach((dom) => dom.remove());
|
||||
buildHostList(
|
||||
ob11Config[type.split(".")[0]][type.split(".")[-1]],
|
||||
ob11Config[type.split(".")[0]][type.split(".")[1]],
|
||||
type
|
||||
).forEach((dom) => {
|
||||
hostContainerDom?.appendChild(dom);
|
||||
|
Loading…
x
Reference in New Issue
Block a user