Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync: dev to extern-contrib #699

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Update.json
Original file line number Diff line number Diff line change
Expand Up @@ -2420,6 +2420,17 @@
}
],
"Notes": "No release notes were provided for this release."
},
"1.2.55": {
"UpdateDate": 1723461779306,
"Prerelease": true,
"UpdateContents": [
{
"PR": 698,
"Description": "Set turnstile theme and language"
}
],
"Notes": "No release notes were provided for this release."
}
}
}
11 changes: 6 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.2.54
// @version 1.2.55
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
Expand Down Expand Up @@ -2754,8 +2754,8 @@ async function main() {
ErrorElement.style.display = "none";
document.querySelector("#Submit").disabled = true;
document.querySelector("#Submit").value = "正在提交...";
let o2Switch="&enable_O2=on";
if(!document.querySelector("#enable_O2").checked)o2Switch="";
let o2Switch = "&enable_O2=on";
if (!document.querySelector("#enable_O2").checked) o2Switch = "";
await fetch("https://www.xmoj.tech/submit.php", {
"headers": {
"content-type": "application/x-www-form-urlencoded"
Expand Down Expand Up @@ -2803,8 +2803,8 @@ async function main() {
ErrorMessage.style.color = "red";
ErrorMessage.innerText = "比赛已结束, 正在尝试像题目 " + rPID + " 提交";
console.log("比赛已结束, 正在尝试像题目 " + rPID + " 提交");
let o2Switch="&enable_O2=on";
if(!document.querySelector("#enable_O2").checked)o2Switch="";
let o2Switch = "&enable_O2=on";
if (!document.querySelector("#enable_O2").checked) o2Switch = "";
await fetch("https://www.xmoj.tech/submit.php", {
"headers": {
"content-type": "application/x-www-form-urlencoded"
Expand Down Expand Up @@ -4682,6 +4682,7 @@ int main()
let CaptchaSecretKey = "";
unsafeWindow.CaptchaLoadedCallback = () => {
turnstile.render("#CaptchaContainer", {
theme: UtilityEnabled("DarkMode") ? "dark" : "light", language: "zh-cn",
sitekey: CaptchaSiteKey, callback: function (CaptchaSecretKeyValue) {
CaptchaSecretKey = CaptchaSecretKeyValue;
SubmitElement.disabled = false;
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.2.54",
"version": "1.2.55",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
Expand Down
Loading