Context menu entries works different
Posted: Tue Aug 13, 2013 8:43 am
FlashGot Link:
gFlashGot.downloadPopupLink
gFlashGot.__lookupGetter__("popupLink")
(correctly works from page context menu)
Now go to FlashGot Options - General, select any available download manager and check "Shown in context menu":
gFlashGot.downloadLink
gFlashGot.__lookupGetter__("currentLink")
Then open context menu for any link and move mouse over any other link (while menu is opened): will be downloaded hovered link instead of "context" link.
I think, it's better to use something like
Can be tested here: ftp://ftp.mozilla.org/pub/mozilla.org/f ... win32/xpi/
P.S. [ link] without space triggers antispam blocker.
Code: Select all
<menuitem id="flashgot-menuitem-it" label="FlashGot Link" accesskey="F" oncommand="gFlashGot.downloadPopupLink()" />
Code: Select all
function (dmName) {
const link = this.popupLink;
return link && this.download([ link], gFlashGotService.OP_ONE, dmName);
}
Code: Select all
function () {
return this.findLinkAsc(document.popupNode);
}
Now go to FlashGot Options - General, select any available download manager and check "Shown in context menu":
Code: Select all
<menuitem class="menuitem-iconic flashgot-command-menuitem" label="Download Master Portable" id="flashgot-command-mi-Download_Master_Portable" oncommand="gFlashGot.downloadSel(this.label) || gFlashGot.downloadLink(this.label)" />
Code: Select all
function (dmName) {
const link = this.currentLink;
return link && this.download([ link], gFlashGotService.OP_ONE, dmName);
}
Code: Select all
function () {
const sel = this.srcWindow.getSelection();
return !sel.isCollapsed && this._wrapAnchor(sel.anchorNode)
|| this.findLinkAsc(this.hoverElement) || this.findLinkAsc(document.commandDispatcher.focusedElement);
}
I think, it's better to use something like
Code: Select all
gFlashGot.downloadSel(this.label) || gFlashGot.downloadPopupLink(this.label)
P.S. [ link] without space triggers antispam blocker.