Lib Export Holder

Hold the exports inside the variable.

目前為 2014-09-24 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/5259/18703/Lib%20Export%20Holder.js

  1. // ==UserScript==
  2. // @name Lib Export Holder
  3. // @author Jixun
  4. // @description Hold the exports inside the variable.
  5. // @version 1.0
  6. // @copyright 2014+, Jixun
  7. // ==/UserScript==
  8.  
  9. var exports = {};
  10.  
  11. // TODO: Logic of callbacks?
  12. var require = function (name) {
  13. return exports[name];
  14. };