您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Tracks YouTube session time, video watch time, daily/monthly stats, with export/import support and toggle UI.
Track exactly how you spend time on YouTube—with full privacy and local-only storage.
// Save data locally as JSON string under a unique key
localStorage.setItem(STORAGE_KEY, JSON.stringify(data));
// Load and parse data from localStorage safely
const stored = localStorage.getItem(STORAGE_KEY);
if (stored) {
try {
data = JSON.parse(stored);
} catch (e) {
data = {}; // fallback if parsing fails
}
}
Explanation:
localStorage.setItem
stores data only in your browser, never transmitting itSTORAGE_KEY
is a unique key for this script's dataJSON.stringify
converts the data object into a string for storagelocalStorage.getItem
retrieves the stored stringJSON.parse
converts the string back into a JavaScript objectThis script does not connect to any server or send your data anywhere. Your privacy is fully respected. Of course, the only other entities with your data are you... and your ISP. So choose your videos wisely.
CC-BY-ND-4.0
– Free to use as-is. Modification or redistribution of derivative works is prohibited. Attribution to @Vvoidddd required.
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址