diff --git a/script/CP.js b/script/CP.js index 0d22a5d..09c4fb0 100644 --- a/script/CP.js +++ b/script/CP.js @@ -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( @@ -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; } @@ -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"), () => {}, diff --git a/script/module/CPM.js b/script/module/CPM.js index b757c04..8d1e9a5 100644 --- a/script/module/CPM.js +++ b/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(); @@ -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 = `
`; divEles.style.display = "none"; + divEles.classList.add(config.AliaName); document.body.appendChild(divEles); this.divEles = divEles; } @@ -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); diff --git a/script/module/XML/CPDialog.js b/script/module/XML/CPDialog.js index d983c53..5a3c269 100644 --- a/script/module/XML/CPDialog.js +++ b/script/module/XML/CPDialog.js @@ -1,4 +1,4 @@ export {CP}; var CP = ` -
Sofill- v0 CP
状态提示增强
包括各种块的聚焦阴影、标题动画、行内代码聚焦彩蛋、引用聚焦波浪线、只读模式聚焦阴影等,不涉及编辑器外的页签聚焦、文档树聚焦等
配置非聚焦时隐藏的顶栏元素
导入配置数据
将导出的 json 文件数据导入,覆盖 localStorage已有主题配置数据。跨版本导出导入可能会存在冲突,请不要过渡依赖。
导出配置附加项
目前还不支持导入
敬请期待
敬请期待
2022.10.14-现在 • Hi-Windom(海文东)
Sofill 系列主题的核心开发者是 Soltus
+
Sofill- v0 CP
状态提示增强
包括各种块的聚焦阴影、标题动画、行内代码聚焦彩蛋、引用聚焦波浪线、只读模式聚焦阴影等,不涉及编辑器外的页签聚焦、文档树聚焦等
配置非聚焦时隐藏的顶栏元素
导入配置数据
将导出的 json 文件数据导入,覆盖 localStorage已有主题配置数据。跨版本导出导入可能会存在冲突,请不要过渡依赖。
导出配置附加项
目前还不支持导入
敬请期待
敬请期待
2022.10.14-现在 • Hi-Windom(海文东)
Sofill 系列主题的核心开发者是 Soltus
` \ No newline at end of file