日本経済新聞の閲覧を制限するTamperMonkeyUserScript
1日10回まで開ける
思ったより簡単に作れた

応用すれば、特定のscrapboxの閲覧制限とかもできるな
js// ==UserScript==
// @name 日本経済新聞の閲覧を制限する
// @namespace http://tampermonkey.net/
// @version 0.1.1
// @description try to take over the world!
// @author You
// @match https://www.nikkei.com/article/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=nikkei.com
// @grant none
// ==/UserScript==
const zero = (n) => `${n}`.padStart(2, "0");
const toYYYYMMDD = (d) =>
`${d.getFullYear()}-${zero(d.getMonth() + 1)}-${zero(d.getDate())}`;
const jsonText = localStorage.getItem("nikkei-counter");
const state = jsonText ? JSON.parse(jsonText) : {
count: 0,
date: toYYYYMMDD(new Date()),
};
if (state.date !== toYYYYMMDD(new Date())) {
state.count = 0;
state.date = toYYYYMMDD(new Date());
}
if (state.count === 10) {
document.body.textContent =`今日はもう${state.count}回も新聞を開きました。これ以上は読めません。震えて明日まで待て`;
} else {
state.count++;
}
localStorage.setItem("nikkei-counter", JSON.stringify(state));