Skip to content

Commit

Permalink
superdebug mode (#407)
Browse files Browse the repository at this point in the history
* 你说的对, 但是你没有implement

* fix #364; fix #342; fmt; make the script faster

* fix the mess swx created

* 1.1.30

* fix the mess swx created

* Because choice

* Super debug

* 1.1.33

* Update version info to 1.1.33

---------

Signed-off-by: Zhu Chenrui <Thomas_rainbowfish@icloud.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
boomzero and github-actions[bot] authored Jan 29, 2024
1 parent fe0ad8d commit 13c7dfc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 12 deletions.
21 changes: 15 additions & 6 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Update.json
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,17 @@
"Description": "more choices"
}
],
"Notes": "Because choices..."
},
"1.1.33": {
"UpdateDate": 1706509685600,
"Prerelease": true,
"UpdateContents": [
{
"PR": 407,
"Description": "superdebug mode"
}
],
"Notes": "No release notes were provided for this release."
}
}
Expand Down
14 changes: 9 additions & 5 deletions XMOJ.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
// @version 1.1.32
// @version 1.1.33
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
Expand Down Expand Up @@ -328,7 +328,7 @@ let TidyTable = (Table) => {
let UtilityEnabled = (Name) => {
if (localStorage.getItem("UserScript-Setting-" + Name) == null) {
//DebugMode is off by default
localStorage.setItem("UserScript-Setting-" + Name, (Name == "DebugMode" || Name == "UnpkgCdn" ? "false" : "true"));
localStorage.setItem("UserScript-Setting-" + Name, (Name == "DebugMode" || Name == "UnpkgCdn" || Name == "SuperDebug" ? "false" : "true"));
}
return localStorage.getItem("UserScript-Setting-" + Name) == "true";
};
Expand All @@ -352,8 +352,7 @@ let RequestAPI = (Action, Data, CallBack) => {
let DataString = JSON.stringify(PostData);
GM_xmlhttpRequest({
method: "POST",
url: "https://api.xmoj-bbs.tech/" + Action,
// url: "http://127.0.0.1:8787/" + Action,
url: (UtilityEnabled("SuperDebug") ? "http://127.0.0.1:8787/" : "https://api.xmoj-bbs.tech/") + Action,
headers: {
"Content-Type": "application/json"
},
Expand Down Expand Up @@ -1136,7 +1135,12 @@ if (location.host != "www.xmoj.tech") {
{"ID": "BBSPopup", "Type": "A", "Name": "讨论提醒"},
{"ID": "MessagePopup", "Type": "A", "Name": "短消息提醒"},
{"ID": "DebugMode", "Type": "A", "Name": "调试模式(仅供开发者使用)"},
{"ID": "UnpkgCdn", "Type": "A", "Name": "使用unpkg CDN(不建议使用)"}
{
"ID": "SuperDebug",
"Type": "A",
"Name": "本地调试模式(仅供开发者使用) (If you don't know what this does, don't enable it!)"
},
{"ID": "UnpkgCdn", "Type": "A", "Name": "使用 unpkg CDN (不建议使用)"},
]));
let UtilitiesCardFooter = document.createElement("div");
UtilitiesCardFooter.className = "card-footer text-muted";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xmoj-script",
"version": "1.1.32",
"version": "1.1.33",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
Expand Down

0 comments on commit 13c7dfc

Please sign in to comment.