keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
Elaphe666
Posts: 2
Joined: July 3rd, 2017, 3:39 am

Re: keyconfig 20110522

Post by Elaphe666 »

morat wrote:@kramb21

Try this:

Code: Select all

gBrowser.selectedTab = gBrowser.addTab("https://www.google.de/");
@Elaphe666

Try this:

Code: Select all

if (XULBrowserWindow.overLink) {
  Components.classes["@mozilla.org/widget/clipboardhelper;1"].
    getService(Components.interfaces.nsIClipboardHelper).
      copyString(XULBrowserWindow.overLink);
}
Similar post: http://forums.mozillazine.org/viewtopic ... 3#p9739973

Thank you. I have been able to make it work (I had to tick the global option). However, when I assign it to Ctrl C, the normal behaviour of this hotkey (copying text to the clipboard, for instance) no longer works. Is there any way to have both functions working at the same time (normal Ctrl C behaviour and the copy url hovering a url special function)?
morat
Posts: 6394
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@Elaphe666

Try this:

Code: Select all

if (XULBrowserWindow.overLink) {
  Components.classes["@mozilla.org/widget/clipboardhelper;1"].
    getService(Components.interfaces.nsIClipboardHelper).
      copyString(XULBrowserWindow.overLink);
} else {
  goDoCommand("cmd_copy");
}
kramb21
Posts: 5
Joined: October 31st, 2013, 2:05 am

Re: keyconfig 20110522

Post by kramb21 »

morat wrote:@kramb21

Try this:

Code: Select all

gBrowser.selectedTab = gBrowser.addTab("https://www.google.de/");
@Elaphe666
Thank you so much! It works perfectly!
nerbrume
Posts: 1
Joined: July 24th, 2017, 7:58 am

Re: keyconfig 20110522

Post by nerbrume »

Hi,

My Firefox recently switched to e10s, and I have some troubles.
I used to have a shortcut that search for the selected text (probably taken from here :P ) :

Code: Select all

goDoCommand('cmd_copy'); 
var paste = readFromClipboard();
if(!paste)
  return; 
gBrowser.selectedTab = gBrowser.addTab('https://www.google.com/search?q='+paste);
However, this does not work : the searched term is the previous content of the clipboard, rather than the selected text. But if I hit the shortcut again, while on the "wrong search" tab, the new opened search is made on the correct term.
In other words : cmd_copy is correctly executed, but readFromClipboard() is somehow executed before.

Any ideas ?
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

morat wrote:@avada

Try something like:

Code: Select all

var url = content.document.location.href;
var localFile = Components.classes["@mozilla.org/file/local;1"].
  createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes["@mozilla.org/process/util;1"].
  createInstance(Components.interfaces.nsIProcess);
var args = ["--incognito", url];
localFile.initWithPath("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe");
process.init(localFile);
process.run(false, args, args.length);
avada wrote: Hmmm... Nothing seems to be happening.
I assume I need to change the chrome path to yt-dl's?

Update:
So if I use this code via custom buttons it works

Here's the modified code:

Code: Select all

var url = content.document.location.href;
var localFile = Components.classes["@mozilla.org/file/local;1"].
  createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes["@mozilla.org/process/util;1"].
  createInstance(Components.interfaces.nsIProcess);
var args = [url];
localFile.initWithPath("d:\\Path\\to\\YTDL\\youtube-dl.exe");
process.init(localFile);
process.run(false, args, args.length);
For whatever reason nothing happens with keyconfig. Anyway, it'll serve... Thanks a lot!
Hi Morat!
I want to tweak the code to pass an argument to a download folder, but I'm failing as usual...

This is what I'm trying:

Code: Select all

var url = content.document.location.href;
var localFile = Components.classes["@mozilla.org/file/local;1"].
  createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes["@mozilla.org/process/util;1"].
  createInstance(Components.interfaces.nsIProcess);
var args = ["-o "d:\Letöltés\%(title)s.%(ext)s\"", url];
//var args = [url];
localFile.initWithPath("d:\\Programok\\videó\\CLI\\youtube-dl.exe");
process.init(localFile);
process.run(false, args, args.length);
I guess I'm missing some syntax/escape peculiarity but I don't know what. Do you have tip? (If you're still around)
morat
Posts: 6394
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@avada

Try this:

Code: Select all

var url = content.document.location.href;
var localFile = Components.classes["@mozilla.org/file/local;1"].
  createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes["@mozilla.org/process/util;1"].
  createInstance(Components.interfaces.nsIProcess);
var args = ["-o", "D:\\Letöltés\\%(title)s.%(ext)s", url];
localFile.initWithPath("D:\\Programok\\videó\\CLI\\youtube-dl.exe");
process.init(localFile);
process.run(false, args, args.length);
Reference
http://github.com/rg3/youtube-dl/blob/master/README.md
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

morat wrote:@avada

Try this:

Code: Select all

var url = content.document.location.href;
var localFile = Components.classes["@mozilla.org/file/local;1"].
  createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes["@mozilla.org/process/util;1"].
  createInstance(Components.interfaces.nsIProcess);
var args = ["-o", "D:\\Letöltés\\%(title)s.%(ext)s", url];
localFile.initWithPath("D:\\Programok\\videó\\CLI\\youtube-dl.exe");
process.init(localFile);
process.run(false, args, args.length);
Reference
http://github.com/rg3/youtube-dl/blob/master/README.md
Thanks! This seems to work.

I expected something like this to fail (if there's a space in the title) because of the lack of quotes around the path.
evo_9
Posts: 2
Joined: July 25th, 2017, 9:21 am

Re: keyconfig 20110522

Post by evo_9 »

How does one figure out how to create an entirely new shortcut? Aka, I want to add a shortcut for 'Email Link...' and since it currently does not have a shortcut, I can't easily re-assign it. What are the steps I need to take to determine the code to create a short-cut for this? Tutorial/wiki somewhere explains this?
morat
Posts: 6394
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@evo_9

Here is the command for the Email Link menu item in the File menu.

Code: Select all

MailIntegration.sendLinkForBrowser(gBrowser.selectedBrowser);
Instructions:

* open keyconfig window
* add a new key
* type a command in the /* CODE */ box, e.g. alert("test");
* type a shortcut in the <Disabled> box, e.g. Ctrl+Shift+!
* apply
* close
Springtime
Posts: 68
Joined: November 8th, 2013, 8:59 pm

Re: keyconfig 20110522

Post by Springtime »

Quote-bumping in case anyone knows:
Springtime wrote:Regarding Dorando keyconfig, it states that it's Firefox for Android compatible but after installation there doesn't appear to be any way of accessing the settings. Is the compatibility for Android just an automatic label or is there indeed a way of using it on mobile?

Asking as I've been seeking a way to add hotkeys to the Firefox for Android browser, since I have a Blackberry physical keyboard and I'm used to the native browser hotkeys of 'T' for scroll to top, 'B' for scroll to bottom, etc. And also as the Firefox for Android toolbar lacks a back button. Would be marvelous to be able to recreate them.
Cleverson
Posts: 16
Joined: March 11th, 2009, 3:09 pm

Re: keyconfig 20110522

Post by Cleverson »

Hello, please how is the procedure for installing Dorando_keyconfig on Thunderbird? I've managed to download the XPI file, but there seems to be no option anywhere in TB to open an extension file. I also went to the add-ons manager > add, but it simply displays a web page for choosing an add-on, then when I choose one, instead of installing the extension, it prompts me to open or save the file. If I choose Open, it rather opens a new blank message.

Uinsg Thunderbird 52.3 on Windows 10.
User avatar
WildcatRay
Posts: 7484
Joined: October 18th, 2007, 7:03 pm
Location: Columbus, OH

Re: keyconfig 20110522

Post by WildcatRay »

Choose the drop down button at the top of the add on manager page and choose install from file option.
Ray

OS'es: 4 computers with Win10 Pro 64-bit; Current Firefox, Beta, Nightly, Chrome, Vivaldi
Cleverson
Posts: 16
Joined: March 11th, 2009, 3:09 pm

Re: keyconfig 20110522

Post by Cleverson »

Thank you! That was the only thing I forgot to do... :-)
rocco.xyz
Posts: 31
Joined: December 28th, 2015, 10:54 pm

back/forward drop-down list

Post by rocco.xyz »

Hi guys. :)
I would like to know how to create a hotkey to show the drop-down list of the "back" and "forward" buttons and assign them the keys "Alt + Shift+ Left Arrow" and "Alt + Shift + Right Arrow" respectively, and (if possible) move the pointer there when pressed.
Image
VLMin
Posts: 67
Joined: April 14th, 2006, 7:15 pm

Re: keyconfig 20110522

Post by VLMin »

rocco.xyz,

This is not a keyconfig solution, but there is an add-on called Back/forward Dropmarker
Post Reply