您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Count how many times you visit Narou today.
- // ==UserScript==
- // @name Narou Counter
- // @namespace http://tampermonkey.net/
- // @version 0.3
- // @description Count how many times you visit Narou today.
- // @author beet
- // @match https://syosetu.com/user/top/
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- // alert(document.cookie);
- var d = new Date();
- var today = d.getMonth() * 100 + d.getDate();
- var lastday = Math.max(...(document.cookie.split(';').map(x => x.split("=")[0].trim() == "narou_lastday" ? x.split("=")[1] * 1.0 : 0)));
- var count = Math.max(...(document.cookie.split(';').map(x => x.split("=")[0].trim() == "narou_count" ? x.split("=")[1] * 1.0 : 0))) + 1;
- if (lastday != today) count = 1;
- alert("You visit Narou " + count + " times today!");
- document.cookie = "narou_lastday=" + today;
- document.cookie = "narou_count=" + count;
- var tomorrow = new Date();
- tomorrow.setDate(tomorrow.getDate() + 3);
- document.cookie = "expires=" + tomorrow.toUTCString();
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址