// ==UserScript== // @license MIT // @name POE自动续期cookie // @namespace http://tampermonkey.net/ // @version 2024-04-16 // @description 自动续期cookie,使网页端,易刷,apt等工具保持登陆状态,by:放课后 // @author You // @match https://poe.game.qq.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=qq.com // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; const today = new Date(); const nextYear = new Date(); nextYear.setFullYear(nextYear.getFullYear() + 1); const expires = nextYear.toUTCString(); const cookieValues = document.cookie.match(`(^|;)\\s*p_uin\\s*=\\s*([^;]+)`); const cookieValue = cookieValues ? cookieValues.pop() : ''; if(cookieValue){ document.cookie = `p_uin=${cookieValue}; expires=${expires}; path=/`; } })();