code: function custom(name, url, defaults) {
      if (url && urls[name] == undefined) urls[name] = url;
      if (this[name] == undefined) {
        this[name] = function (term, options, callback) {
          // handle "termless" custom methods
          if (typeof term == 'function') {
            callback = term;
            term = '';
          } else if (term.toString() == '[Object object]') {
            callback = options;
            options = term;
            term = '';
          }
          options = normaliseArgs(options, callback);
          setLast(name, term, options);
          // slight hack to support my own shortcuts
          options[name] = options.user = term;
          options.search = encodeURIComponent(term);
          if (options.callback) load(getUrl(name, options), options, options.callback);
          return this;
        };
      }
      // makes my code nicer to read when setting up twitterlib object
      return this[name];
    }
docs: create a new method on twitterlib, that hits the given url, i.e. twitterlib.custom('dm', '/proxy.php?page=%page%&type=direct_messages'); can now be called using twitterlib.dm('rem', function (t) { });