keyconfig 20110522
-
- Posts: 12
- Joined: April 24th, 2015, 11:23 pm
Re: keyconfig 20110522
Hi,
when I get an email with references to remote content, ThunderBird displays a pop up on top of the message body that says "To protect your privacy, Thunderbird has blocked remote content in this message."
On the right on the pop up, there is an "Options" box.
What would be the code for keyconfig that would press the "Options" box and then choose the "Show remote content in message" option?
Thanks.
when I get an email with references to remote content, ThunderBird displays a pop up on top of the message body that says "To protect your privacy, Thunderbird has blocked remote content in this message."
On the right on the pop up, there is an "Options" box.
What would be the code for keyconfig that would press the "Options" box and then choose the "Show remote content in message" option?
Thanks.
-
- Posts: 31
- Joined: September 24th, 2008, 2:20 am
Re: keyconfig 20110522
morat wrote:@Patu
Try this:Code: Select all
var selectors = "#maincontent > DIV:nth-of-type(3) > FORM > TABLE > TBODY > TR:nth-of-type(4) > TD:nth-of-type(2) > A";
var element = content.document.querySelector(selectors);
element.click();
https://developer.mozilla.org/en-US/doc ... rySelector
Dear Morat,
That was very helpful. Firstly, it works great. Secondly, it enabled me to adjust other key commands based on your solution. Thank you.
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: keyconfig 20110522
@TBDTBD
Try this:
* toggle "Show remote content for this message"
http://mxr.mozilla.org/comm-esr31/searc ... is+message
http://mxr.mozilla.org/comm-esr31/searc ... llowForMsg
http://mxr.mozilla.org/comm-esr31/searc ... oteContent
note: /mail/ is source for Thunderbird, /suite/ is source for SeaMonkey
Similar thread: viewtopic.php?f=39&t=2866097
Try this:
* toggle "Show remote content for this message"
Code: Select all
var kNoRemoteContentPolicy = 0;
var kBlockRemoteContent = 1;
var kAllowRemoteContent = 2;
var msgHdr = gMessageDisplay.displayedMessage;
if (msgHdr) {
var remoteContentPolicy = msgHdr.getUint32Property("remoteContentPolicy");
if (remoteContentPolicy == kBlockRemoteContent) {
setMsgHdrPropertyAndReload("remoteContentPolicy", kAllowRemoteContent);
} else if (remoteContentPolicy == kAllowRemoteContent) {
setMsgHdrPropertyAndReload("remoteContentPolicy", kNoRemoteContentPolicy);
}
window.content.focus();
}
http://mxr.mozilla.org/comm-esr31/searc ... is+message
http://mxr.mozilla.org/comm-esr31/searc ... llowForMsg
http://mxr.mozilla.org/comm-esr31/searc ... oteContent
note: /mail/ is source for Thunderbird, /suite/ is source for SeaMonkey
Similar thread: viewtopic.php?f=39&t=2866097
-
- Posts: 12
- Joined: April 24th, 2015, 11:23 pm
Re: keyconfig 20110522
Thanks Morat! The code works perfectly well.
-
- Posts: 2
- Joined: May 13th, 2015, 8:10 am
Re: keyconfig 20110522
I'm trying to set a domain prefix in the location bar for a new tab, but I don't want firefox to load the url since it isn't complete. I'm using:
gBrowser.selectedTab = gBrowser.addTab("http://test.site/");
which opens a new tab and loads the url. Keyconfig is working perfectly, but I'm hoping that someone knows how to just set the text in a new tab without firefox trying to connect.
Thank you,
Tom
gBrowser.selectedTab = gBrowser.addTab("http://test.site/");
which opens a new tab and loads the url. Keyconfig is working perfectly, but I'm hoping that someone knows how to just set the text in a new tab without firefox trying to connect.
Thank you,
Tom
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: keyconfig 20110522
@tom011
Try these:
Try these:
Code: Select all
var url = "http://www.google.com/search?q=";
var flags = Components.interfaces.nsIWebNavigation.STOP_ALL;
var browser = gBrowser.getBrowserForTab(
gBrowser.selectedTab = gBrowser.addTab(url));
browser.webNavigation.stop(flags);
Code: Select all
var url = "http://www.google.com/search?q=";
var browser = gBrowser.getBrowserForTab(
gBrowser.selectedTab = gBrowser.addTab("about:blank"));
browser.addEventListener("load", function onload(event) {
event.currentTarget.removeEventListener(event.type, onload, true);
event.originalTarget.title = "Google Search";
openLocation();
gURLBar.value = url;
}, true);
-
- Posts: 2
- Joined: May 13th, 2015, 8:10 am
Re: keyconfig 20110522
morat,
Thank you! Both code blocks do exactly what I need to do. Also, thank you for such a fast answer as well!
Tom
Thank you! Both code blocks do exactly what I need to do. Also, thank you for such a fast answer as well!
Tom
-
- Posts: 68
- Joined: November 8th, 2013, 8:59 pm
Re: keyconfig 20110522
Could someone tell me how to toggle the Web Inspector panel using keyconfig? Tried using some modified code someone here provided a while ago for toggling the Find in page panel, but it merely opened the Inspector panel rather than toggling it on/off.
Any ideas? Cheers.
Any ideas? Cheers.
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: keyconfig 20110522
Springtime wrote:set 'Toggle Bookmarks Toolbar' to a hotkey and noticed that if I toggle it via the hotkey the bookmarks don't appear
viewtopic.php?p=13858103#p13858103
Try this:
Code: Select all
// Toggle, View > Toolbars > Bookmarks Toolbar
var toolbar = document.getElementById("PersonalToolbar");
setToolbarVisibility(toolbar, toolbar.collapsed);
Springtime wrote:toggle the Web Inspector panel
Try the second code snippet:
Code: Select all
// Open, Tools > Web Developer > Inspector
gDevToolsBrowser.selectToolCommand(gBrowser, "inspector");
Code: Select all
// Toggle, Tools > Web Developer > Inspector
Services.prefs.setCharPref("devtools.toolbox.selectedTool", "inspector");
gDevToolsBrowser.toggleToolboxCommand(gBrowser);
http://mxr.mozilla.org/mozilla-esr31/se ... oolCommand
http://mxr.mozilla.org/mozilla-esr31/se ... boxCommand
Last edited by morat on May 23rd, 2015, 10:46 am, edited 1 time in total.
-
- Posts: 68
- Joined: November 8th, 2013, 8:59 pm
Re: keyconfig 20110522
morat wrote:Springtime wrote:set 'Toggle Bookmarks Toolbar' to a hotkey and noticed that if I toggle it via the hotkey the bookmarks don't appear
Try this:
*snip*
Ahhh, thank you so much! And for remembering the previous post, too! Didn't think I'd find a solution to that Both toggle commands work flawlessly.
-
- Posts: 5
- Joined: May 31st, 2015, 8:39 pm
Re: keyconfig 20110522
Hello everybody and thanks for a great addon!
Is there a keyboard shortcut to "SEND" a message once it's composed?
What would the syntax for that be? Just a simple "Send" in the code?
Is there a keyboard shortcut to "SEND" a message once it's composed?
What would the syntax for that be? Just a simple "Send" in the code?
-
- Posts: 153
- Joined: January 23rd, 2009, 9:14 pm
- Location: Germany
Re: keyconfig 20110522
tonymec wrote:There is a rumor that (I don't know exactly when) all add-ons will have to be signed, uploaded to AMO and reviewed by AMO editors including extensions not hosted at AMO, otherwise they'll be disabled by the add-ons manager. Dorando, if this rumour is true it will doubtlessly affect keyconfig. I've been told the matter is being discussed at mozilla.addons.user-experience (a list I don't follow). Any thoughts?
I read in a post in camp-firefox.de that this will come with Firefox 40 or 41. Dorando, will you have keyconfig (and menumanipulator) signed till then?
Thank you very much.
-
- Posts: 90
- Joined: January 6th, 2015, 4:45 am
Re: keyconfig 20110522
Hi !
Is any possible edit the location bar by keyconfig !?
editLocationBar("google.com");
i did find out how to implement it !
Is any possible edit the location bar by keyconfig !?
editLocationBar("google.com");
i did find out how to implement it !
Last edited by ar11x on June 4th, 2015, 5:39 pm, edited 1 time in total.
-
- Posts: 153
- Joined: January 23rd, 2009, 9:14 pm
- Location: Germany
Re: keyconfig 20110522
fefrie wrote:Hello everybody and thanks for a great addon!
Is there a keyboard shortcut to "SEND" a message once it's composed?
What would the syntax for that be? Just a simple "Send" in the code?
As far as I know there is a standard shortcut in Thunderbird for this command: Ctrl+return
-
- Posts: 63
- Joined: February 29th, 2004, 10:28 am
- Location: Chicago, Illinois
- Contact:
Re: keyconfig 20110522
Can anyone let me know if there's a built-in keystroke for saving the current page to Firefox's newly-integrated Pocket?
If not, I got as far as here ...
https://hg.mozilla.org/mozilla-central/ ... et/main.js
... but could not take it any further. Would anyone be willing or able to work out the appropriate keyconfig code?
If not, I got as far as here ...
https://hg.mozilla.org/mozilla-central/ ... et/main.js
... but could not take it any further. Would anyone be willing or able to work out the appropriate keyconfig code?