XXX-domain GET

    
      
  • /*
     * @title XXX-domain
     * @description XXX cross-domain GET over CORS abstract
     * @include http://*
     * @include https://*
     * @contributor 
     * @license MIT License https://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // c.f.
    // https://crossorigin.me
    //  https://github.com/technoboy10/crossorigin.me
    (() => {
        'use strict';
    
        const url = 'https://example.com';
    
        // TODO timeout
        // http://let.hatelabo.jp/noromanba/let/hJmc6caCwdFz
    
        // XXX this server glitch so often
        fetch('https://crossorigin.me/' + url, {
            mode: 'cors',
        })
        .then(res => {
            if (!res.ok) {
                return Promise.reject(res.status, res.statusText);
            }
    
            return res.text();
        })
        .then(data => {
            // do something
            console.log(data);
        })
        .catch(err => {
            console.warn(err.message, err);
        });
    })();
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2018/05/30 07:34:14 - 2018-05-30
  2. 2018/05/19 15:25:35 - 2018-05-19
  3. 2018/05/19 14:57:15 - 2018-05-19
  4. 2018/05/19 14:29:10 - 2018-05-19
  5. 2018/05/19 14:28:10 - 2018-05-19
  6. 2018/05/18 22:14:19 - 2018-05-18
  7. 2018/05/18 22:13:39 - 2018-05-18
  8. 2018/05/18 22:04:11 - 2018-05-18
  9. 2018/05/18 21:54:42 - 2018-05-18