Skip to content
Merged
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 @@ -2788,6 +2788,17 @@
}
],
"Notes": "No release notes were provided for this release."
},
"1.5.2": {
"UpdateDate": 1746264285564,
"Prerelease": true,
"UpdateContents": [
{
"PR": 796,
"Description": "Clear session cookie on logout for better security"
}
],
"Notes": "No release notes were provided for this release."
}
}
}
3 changes: 2 additions & 1 deletion XMOJ.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
// @version 1.5.1
// @version 1.5.2
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
Expand Down Expand Up @@ -946,6 +946,7 @@ async function main() {
PopupUL.children[5].addEventListener("click", () => {
localStorage.removeItem("UserScript-Username");
localStorage.removeItem("UserScript-Password");
document.cookie = "PHPSESSID=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; //This is how you remove a cookie?
location.href = "https://www.xmoj.tech/logout.php";
});
Array.from(PopupUL.children).forEach(item => {
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.5.1",
"version": "1.5.2",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
Expand Down
Loading