mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-30 13:25:45 +01:00
Closes issue #729.
This commit is contained in:
@@ -1859,6 +1859,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
|
|
||||||
dactyl.log(_("dactyl.modulesLoaded"), 3);
|
dactyl.log(_("dactyl.modulesLoaded"), 3);
|
||||||
|
|
||||||
|
userContext.DOM = Class("DOM", DOM, { init: function DOM_(sel, ctxt) DOM(sel, ctxt || buffer.focusedFrame.document) });
|
||||||
|
userContext.$ = modules.userContext.DOM;
|
||||||
|
|
||||||
dactyl.timeout(function () {
|
dactyl.timeout(function () {
|
||||||
try {
|
try {
|
||||||
var args = config.prefs.get("commandline-args")
|
var args = config.prefs.get("commandline-args")
|
||||||
|
|||||||
@@ -19,9 +19,8 @@ var states = iter([v, k.slice(prefix.length).toLowerCase()]
|
|||||||
|
|
||||||
var Download = Class("Download", {
|
var Download = Class("Download", {
|
||||||
init: function init(id, list) {
|
init: function init(id, list) {
|
||||||
let self = XPCSafeJSObjectWrapper(services.downloadManager.getDownload(id));
|
let self = this;
|
||||||
self.__proto__ = this;
|
this.download = services.downloadManager.getDownload(id);
|
||||||
this.instance = this;
|
|
||||||
this.list = list;
|
this.list = list;
|
||||||
|
|
||||||
this.nodes = {
|
this.nodes = {
|
||||||
@@ -192,6 +191,14 @@ var Download = Class("Download", {
|
|||||||
this.updateProgress();
|
this.updateProgress();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Object.keys(XPCOMShim([Ci.nsIDownload])).forEach(function (key) {
|
||||||
|
if (!(key in Download.prototype))
|
||||||
|
Object.defineProperty(Download.prototype, key, {
|
||||||
|
get: function get() this.download[key],
|
||||||
|
set: function set(val) this.download[key] = val,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
var DownloadList = Class("DownloadList",
|
var DownloadList = Class("DownloadList",
|
||||||
XPCOM([Ci.nsIDownloadProgressListener,
|
XPCOM([Ci.nsIDownloadProgressListener,
|
||||||
|
|||||||
Reference in New Issue
Block a user