break the shackles

  • /*
     * @title break the shackles
     * @description append title/attribution to window-title
     * @include http://plus.shonenjump.com/*
     * @license MIT License http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // UserScript
    // https://gist.github.com/noromanba/8e0748be60eefce86e32
    
    
    // TODO merge other sites
    (function () {
        if (!(/plus\.shonenjump\.com/.test(location.hostname) && location.pathname)) return;
    
        // TODO lazy check .titleText (or #pagetitle[title])
        var title = (document.querySelector(['.comics_detail_title', '.titleText']) || {}).textContent;
        if (!title) return;
    
        document.title = [title, '-', document.title].join(' ');
    })();
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2015/08/08 03:50:57 - 2015-08-08
  2. 2015/08/08 03:35:49 - 2015-08-08