diff --git a/Update.json b/Update.json index 7174ea30..eb6899bd 100644 --- a/Update.json +++ b/Update.json @@ -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." } } } \ No newline at end of file diff --git a/XMOJ.user.js b/XMOJ.user.js index e7e25384..c7343158 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -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 @@ -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 => { diff --git a/package.json b/package.json index 359328a9..4b9a0a54 100644 --- a/package.json +++ b/package.json @@ -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": {