atrix

    
      
  • /*
     * @title matrix
     * @javascript_url
     * @description my bookmarklet
     * @include http://*
     * @license MIT License
     * @require 
     */
    
    // original: https://github.com/MinhasKamal/CreepyCodeCollection/blob/master/matrix_effect.html
    
    (function() {
      let q = document.createElement('canvas');
      document.body.appendChild(q);
      let s=window.screen;
      let w=q.width=s.width;
      let h=q.height=document.body.scrollHeight;
      let p=Array(256).join(1).split('');
      let c=q.getContext("2d");
      let m=Math;
      // q.style.height = `${document.body.scrollHeight}px`;
      q.style.position = 'absolute';
      q.style.top = q.style.left = '0';
      q.style.zIndex = '99999';
      let opacity = 0;
      let inc = true;
      setInterval(() => {
        c.fillStyle="rgba(0,0,0,0.05)";
        c.fillRect(0,0,w,h);
        c.fillStyle="rgba(0,255,0,1)";
        if (inc) {
          opacity += 10;
          q.style.opacity = `${opacity/100}`;
          if (opacity >= 100) {
            inc = false;
          }
        } else {
          opacity -= 10;
          q.style.opacity = `${opacity/100}`;
          if (opacity <= 0) {
            inc = true;
          }
        }
        p=p.map((v,i) => {
          let r=m.random();
          c.fillText(String.fromCharCode(m.floor(2720+r*33)),i*10,v);
          v+=10;
          return v>768+r*1e4?0:v
        })
      },33);
    }())
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2017/01/31 21:57:12 - 2017-01-31
  2. 2017/01/31 20:10:36 - 2017-01-31
  3. 2017/01/31 13:10:04 - 2017-01-31
  4. 2017/01/30 14:18:22 - 2017-01-30
  5. 2017/01/30 14:17:20 - 2017-01-30