n年前のブクマを見る

    @@ -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 です。

History

  1. 2025/11/28 18:31:53 - 11/28
  2. 2023/03/06 16:02:16 - 2023-03-06
  3. 2022/12/15 16:16:59 - 2022-12-15
  4. 2022/11/02 16:49:13 - 2022-11-02