Greasy Fork is available in English.

Lib Export Holder

Hold the exports inside the variable.

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

// ==UserScript==
// @name           Lib Export Holder
// @author         Jixun
// @description    Hold the exports inside the variable.
// @version        1.0
// @copyright      2014+, Jixun
// ==/UserScript==

var exports = {};

// TODO: Logic of callbacks?
var require = function (name) {
    return exports[name];
};