n年前のブクマを見る
by
Lhankor_Mhy
11/28 [2025/11/28 18:31:53]
はてなブックマークにログインしていれば、n年前のブクマページに移動します。IEでは動作せず。
@@ -6,13 +6,13 @@
* @javascript_url
*/
-const n=1
+const n=1 // n=1は1年前
-const oneYearBefore = new Date()
-oneYearBefore.setFullYear(new Date().getFullYear()-n)
+const nYearBefore = new Date()
+nYearBefore.setFullYear(new Date().getFullYear()-n)
location.href =
- `https://b.hatena.ne.jp/my/${oneYearBefore.toLocaleDateString('ja-JP', {
+ `https://b.hatena.ne.jp/my/${nYearBefore.toLocaleDateString('ja-JP', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
/*
* @title n年前のブクマを見る
* @description はてなブックマークにログインしていれば、n年前のブクマページに移動します。IEでは動作せず。
* @include http://*
* @license CC0
* @javascript_url
*/
const n=1 // n=1は1年前
const nYearBefore = new Date()
nYearBefore.setFullYear(new Date().getFullYear()-n)
location.href =
`https://b.hatena.ne.jp/my/${nYearBefore.toLocaleDateString('ja-JP', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
}).split('/').join('')}`
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。