props?

    @@ -1,6 +1,6 @@ /* - * @title prop? - * @description list global props of site content + * @title props? + * @description list global props of content-scripts * @include http://* * @include https://* * @license MIT License https://opensource.org/licenses/MIT @@ -9,12 +9,14 @@ // TODO well set-difference { - const pure = new Set(Object.getOwnPropertyNames(document.body.appendChild(document.createElement('iframe')).contentWindow)); - Object.getOwnPropertyNames(window).filter(name => { - return !pure.has(name) && - // TODO `$*` family smart filtering + const sandbox = document.body.appendChild(document.createElement('iframe')).contentWindow + console.table( + Object.entries(Object.getOwnPropertyDescriptors(window)).filter(([name, descr]) => { + return !(name in sandbox) && + // TODO devtools `$*` family smart filtering in Console !String(window[name]).includes('[Command Line API]') && - Boolean(window[name]); - })//.map(name => Object.getOwnPropertyDescriptors(window[name])) + Boolean(window[name]) + }) + ) }
  • /*
     * @title props?
     * @description list global props of content-scripts
     * @include http://*
     * @include https://*
     * @license MIT License https://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // TODO well set-difference
    {
      const sandbox = document.body.appendChild(document.createElement('iframe')).contentWindow
      console.table(
        Object.entries(Object.getOwnPropertyDescriptors(window)).filter(([name, descr]) => {
          return !(name in sandbox) &&
          // TODO devtools `$*` family smart filtering in Console
          !String(window[name]).includes('[Command Line API]') &&
          Boolean(window[name])
        })
      )
    }
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2018/08/11 08:29:04 - 2018-08-11
  2. 2018/08/10 08:35:22 - 2018-08-10