copyright-protect

    
      
  • /*
     * @title copyright-protect
     * @description copyright-protect all imgs
     * @include http://*
     * @license MIT License
     * @javascript_url
     */
    
    (function() {
      var protector = 'http://copyright-protector.herokuapp.com/';
      var host = location.href.match(/^[httpsfile]+:\/{2,3}[0-9a-z\.\-:]+?:?[0-9]*?\//i)[0];
      var currentDir = location.href.match(/^(.*\/)([^\/]*)$/)[1];
      Array.prototype.forEach.call(document.querySelectorAll('img'), function(img) {
        var src;
        if (/^[httpsfile]+:\/{2,3}/.test(img.src)) {
          src = img.src;
        } else if (/^\//.test(img.src)) {
          src = host + src.replace(/^\//, '');
        } else {
          src = currentDir + img.src;
        }
        img.src = protector + '?url=' + encodeURIComponent(src) + '&glitch=true';
      });
    }());
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2015/08/19 13:10:12 - 2015-08-19
  2. 2015/08/18 17:12:05 - 2015-08-18
  3. 2015/08/18 17:09:04 - 2015-08-18