Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Soltus committed Jan 1, 2023
1 parent 52004e0 commit 8badcc5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
28 changes: 23 additions & 5 deletions script/CP.js
Expand Up @@ -1252,9 +1252,9 @@ async function CP_EditorMonitor() {
`/appearance/themes/Sofill-/style/sweet/sugar/editor/Android-mobile-BlockScrollBarAlwaysShow.css`
)
: document.documentElement.style.setProperty(
"--SCC-Variables-MI-BlockScrollBar-opacity",
"0.58"
);
"--SCC-Variables-MI-BlockScrollBar-opacity",
"0.58"
);
break;
case "-1":
document.documentElement.style.setProperty(
Expand All @@ -1267,7 +1267,9 @@ async function CP_EditorMonitor() {
"--SCC-Variables-MI-BlockScrollBar-opacity",
"0"
);
let css = document.querySelector("#Android-mobile-BlockScrollBarShow");
let css = document.querySelector(
"#Android-mobile-BlockScrollBarShow"
);
css ? css.remove() : null;
break;
}
Expand Down Expand Up @@ -2590,7 +2592,23 @@ API.checkedChange(
It_SelfProtector ? clearInterval(It_SelfProtector) : null;
}
);

API.checkedChange(
document.getElementById("SC_winsay_cp_system__Ball"),
() => {
if (config.clientMode == "body--mobile") {
let ball = document.querySelector("#Sofill-MobileBall");
ball ? (ball.style.display = "none") : null;
}
},
() => {
if (config.clientMode == "body--mobile") {
let ball = document.querySelector("#Sofill-MobileBall");
ball
? (ball.style.display = "block")
: API.通知("Sofill-MobileBall not found");
}
}
);
API.checkedChange(
document.getElementById("SC_winsay_cp__exportData__EXT_sy_editor"),
() => {},
Expand Down
21 changes: 2 additions & 19 deletions script/module/CPM.js
@@ -1,4 +1,5 @@
import { CP } from "./XML/CPDialog.js";
import * as config from "../config.js";
class Dialog extends EventTarget {
constructor(options) {
super();
Expand Down Expand Up @@ -32,11 +33,11 @@ class Dialog extends EventTarget {
}
// 创建节点
createElement() {
// console.log(this.opts.width)
let divEles = document.createElement("div");
divEles.id = "SC-CP";
divEles.innerHTML = `<div class="SCC-wrapper"></div><div class="b3-dialog--open"><div class="SCC-dialog b3-dialog"></div></div></div>`;
divEles.style.display = "none";
divEles.classList.add(config.AliaName);
document.body.appendChild(divEles);
this.divEles = divEles;
}
Expand Down Expand Up @@ -143,21 +144,3 @@ export class CPDialog extends Dialog {
});
}
}

// class ConfirmDialog extends HTMLElement {
// constructor() {
// super();
// let dialog = new Dialog({
// title: this.title,
// success: (e) => {
// // console.log("点击了确定")
// this.dispatchEvent(new CustomEvent("success"));
// },
// });
// dialog.open();
// }
// get title() {
// return this.getAttribute("title") ?? "默认标题";
// }
// }
// customElements.define("ConfirmDialog", ConfirmDialog);
2 changes: 1 addition & 1 deletion script/module/XML/CPDialog.js

Large diffs are not rendered by default.

0 comments on commit 8badcc5

Please sign in to comment.