spycam

  • /*
     * @title spycam
     * @description snapshot page in background, full-auto when use as UserScript
     * @include http://example.com/DIY/*
     * @include https://example.com/DIY/*
     * @license MIT License http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // Wayback Machine (aka Web Archive, Internet Archive) ver by taizooo
    // http://let.hatelabo.jp/taizooo/let/hLHVhMjlxZ5H
    
    // came and go archive.is
    // http://let.hatelabo.jp/noromanba/let/hJmdy-H20OA0
    
    // ATTENTION
    // if you use as UserScript, add user-based @include DO IT YOUR SELF
    // why did not use globally matches (@include http://*  @include https://* @include *)
    // because highly insecure, probable violate your rights. AT YOUR OWN RISK
    
    (function () {
        // c.f. official "BOOKMARKLET:" on https://archive.is/
        var STORAGE = 'https://archive.is/?run=1&url=';
        // canonical
        // http://let.hatelabo.jp/noromanba/let/hLHVzOTQjfYH
        // https://gist.github.com/noromanba/d730ccf3ae5e6916cd60
        var url = (document.head.querySelector('meta[property="og:url"][content]') || {}).content ||
            (document.head.querySelector('link[rel="canonical"][href]') || {}).href ||
            location.href;
    
        /* IDKWTD didn't work img-method, POST: form src="https://archive.is/submit/"
        document.createElement('img').src = STORAGE + encodeURIComponent(url);
        /*/
        var spy = document.createElement('iframe');
        spy.src = STORAGE + encodeURIComponent(url);
        spy.height = spy.width = 0; // TBD omit
        spy.hidden = true;
        spy.sandbox = [ // TBD omit
            'allow-scripts',
            'allow-forms',
            'allow-same-origin'
        ].join(' ');
    
        document.body.appendChild(spy);
        //*/
    })();
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2015/06/14 05:54:17 - 2015-06-14
  2. 2015/06/14 05:46:08 - 2015-06-14
  3. 2015/06/14 05:34:35 - 2015-06-14
  4. 2015/06/14 05:29:47 - 2015-06-14