Closed vijfde closed 7 years ago
Thanks for posting! Whoops my mistake. It should be __exec__
not exec
.
This works:
Go Back in Tab History
{
__exec__() {
let domwin = Services.wm.getMostRecentWindow('navigator:browser');
if (domwin) domwin.gBrowser.goBack();
}
}
Go Forward in Tab History
{
__exec__() {
let domwin = Services.wm.getMostRecentWindow('navigator:browser');
if (domwin) domwin.gBrowser.goForward();
}
}
Thank you very much, works like a charm!
I would like to have a custom command to go to the previous/next page in the history of the currently active tab. However, the following does not work for me:
Previous:
{ exec() { let domwin = Services.wm.getMostRecentWindow('navigator:browser'); if (domwin) domwin.gBrowser.goBack(); } }
Next:{ exec() { let domwin = Services.wm.getMostRecentWindow('navigator:browser'); if (domwin) domwin.gBrowser.goForward(); } }
What exactly am I doing wrong? The chosen mouse actions work for a different default command, so the problem should be in the code. Windows 10, Firefox 49.0.2 Installed v2.x from Github, but add-on list and about:mousecontrol say 2.0 ...