「利用者:Koikm/common.js」の版間の差分

提供:エケペディア
ナビゲーションに移動 検索に移動
 
(localStorage から実行)
 
1行目: 1行目:
/* <syntaxhighlight lang=js line start=1> */
/* <syntaxhighlight lang=js line start=1> */
/* User:Koikm/common.js */
/* User:Koikm/common.js */
mw.loader.enqueue(['mediawiki.page.ready'], function() {
  "use strict";


  /**
  * localStorage から実行
  *
  * Type in the console:
  *  localStorage.setItem('__console__.script', String(function() {
  *  (function(){ "use strict";
  *    // some codes
  *  })();
  *  }).replace(/^function ?\(\) ?{\n/, '').replace(/}$/, ''));
  */
  eval(localStorage.getItem('__console__.script'));
});
/* </syntaxhighlight> */
/* </syntaxhighlight> */

2019年10月3日 (木) 21:44時点における最新版

/* <syntaxhighlight lang=js line start=1> */
/* User:Koikm/common.js */
mw.loader.enqueue(['mediawiki.page.ready'], function() {
  "use strict";

  /**
   * localStorage から実行
   * 
   * Type in the console: 
   *   localStorage.setItem('__console__.script', String(function() {
   *   (function(){ "use strict";
   *     // some codes
   *   })();
   *   }).replace(/^function ?\(\) ?{\n/, '').replace(/}$/, ''));
   */
  eval(localStorage.getItem('__console__.script'));

});
/* </syntaxhighlight> */