spin

    @@ -1,20 +1,43 @@ /* * @title spin - * @description http://let.st-hatelabo.com/unko-man/let/hLHWv-3firtV.bookmarklet.js - * @include http://* - * @license MIT License - * @require + * @description Teacups/Tea-Cups-Ride + * @include http:* + * @include https:* + * @contributor unko-man http://let.hatelabo.jp/unko-man/let/hLHWv-3firtV + * @contributor yuta25 http://let.hatelabo.jp/yuta25/let/hJmf4eqOzsBd + * @license MIT License https://opensource.org/licenses/MIT * @javascript_url */ +// e.g. +// http://let.hatelabo.jp + +// original +// http://let.st-hatelabo.com/unko-man/let/hLHWv-3firtV.bookmarklet.js +{ +'use strict'; + const lastLink = Array.from(document.querySelectorAll('head link')).pop(); -const fontAwesome = document.createElement('link'); -fontAwesome.href = '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css'; -fontAwesome.rel = 'stylesheet'; +// TBD PDFium has not head +//if (!lastLink) return; + +const fontAwesome = Object.assign(document.createElement('link'), { + href: '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css', + rel: 'stylesheet', +}); lastLink.after(fontAwesome); -let i = 0; -Array.from(document.querySelectorAll('font,img,span,a,li')).forEach(e => { + +Array.from(document.body.querySelectorAll([ + 'font', + 'img', + 'span', + 'a', + 'li', +])).forEach((e, i) => { setTimeout(() => { e.classList.add('fa-spin'); }, i * 10); -}); +}); + +} +
  • /*
     * @title spin
     * @description Teacups/Tea-Cups-Ride
     * @include http:*
     * @include https:*
     * @contributor unko-man  http://let.hatelabo.jp/unko-man/let/hLHWv-3firtV
     * @contributor yuta25    http://let.hatelabo.jp/yuta25/let/hJmf4eqOzsBd
     * @license MIT License   https://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // e.g.
    // http://let.hatelabo.jp
    
    // original
    // http://let.st-hatelabo.com/unko-man/let/hLHWv-3firtV.bookmarklet.js
    {
    'use strict';
    
    const lastLink = Array.from(document.querySelectorAll('head link')).pop();
    // TBD  PDFium has not head
    //if (!lastLink) return;
    
    const fontAwesome = Object.assign(document.createElement('link'), {
      href: '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css',
      rel: 'stylesheet',
    });
    lastLink.after(fontAwesome);
    
    Array.from(document.body.querySelectorAll([
      'font',
      'img',
      'span',
      'a',
      'li',
    ])).forEach((e, i) => {
      setTimeout(() => {
        e.classList.add('fa-spin');
      }, i * 10);
    });
    
    }
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2017/11/03 16:32:04 - 2017-11-03
  2. 2017/10/14 17:42:04 - 2017-10-14
  3. 2017/10/14 17:40:10 - 2017-10-14