keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
dutchrusk
Posts: 6
Joined: November 27th, 2007, 2:44 pm

Re: keyconfig 20080929

Post by dutchrusk »

or (if you added a keyword to the bookmarklet)

Code: Select all
loadURI(getShortcutOrURI('keyword',{}));


works like a charm, thanks!
hllwn
Posts: 54
Joined: March 6th, 2010, 9:52 pm

Re: keyconfig 20080929

Post by hllwn »

dorando wrote:
WCityMike wrote:What I'd like to do is reassign the keystroke that I had assigned to that bookmarklet -- to instruct it to instead "click" (open) this specific folder, so that my next step only need be to hit the down arrow the appropriate number of times and hit Enter.
Try

Code: Select all

document.getElementById("PersonalToolbar").getElementsByAttribute("label","Folder Name")[0].open = true; 
replace Folder Name with the name of the folder you want to open. Using this line multiple times (for different folders) will open all of them with the last one getting focus (selecting an item or pressing escape moves the focus to the next one). Note that it is also possible to open Query folders (the blue ones), but in Firefox 3.5 that code will fail the first time (duplicating the line should work).


I'm trying to open folders in same way but from sidebar bookmarks but it doesnt work. Where am I doing wrong?

Code: Select all

document.getElementById("bookmarks-view-children").getElementsByAttribute("label","Bookmarks Menu")[0].open = true;


Any help is appreciated, thanks.
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

Try

Code: Select all

var sidebarBox = document.getElementById("sidebar-box");

var tree = sidebarBox.lastChild.contentWindow.document.getElementById('bookmarks-view');
//alert(tree.selectedNode.uri);
tree.selectPlaceURI("place:folder=BOOKMARKS_MENU&queryType=1");
tree.selectedNode.containerOpen = true;
tree.focus(); 
. Remove the // to get the place URI of the currently selected. Alternatively try

Code: Select all

var sidebarBox = document.getElementById("sidebar-box");

if(
sidebarBox.getAttribute("sidebarcommand") != "viewBookmarksSidebar") {
 toggleSidebar("viewBookmarksSidebar");
 var me = arguments.callee;
 sidebarBox.lastChild.addEventListener("load", function(event)  {
  sidebarBox.lastChild.removeEventListener("load", arguments.callee,true);
  event.target.defaultView.setTimeout(me,0);
 }, true);
 return;
}

var tree = sidebarBox.lastChild.contentWindow.document.getElementById('bookmarks-view');
tree.place = "place:folder=BOOKMARKS_MENU&queryType=1";
tree.focus(); 
which will open the bookmark sidebar (if it is not open already) and only show the contents of the selected folder.
hllwn
Posts: 54
Joined: March 6th, 2010, 9:52 pm

Re: keyconfig 20080929

Post by hllwn »

dorando wrote:which will open the bookmark sidebar (if it is not open already) and only show the contents of the selected folder.


This is 100% exactly what I wanted to do. Code works perfectly in sidebar. Thank you very very much. However I was planing to use this code with Bookmarks History Panel extension which is basically using sidebar content as a floating panel. I guess I have to figure out a way to adapt this code for that extension.
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

Try

Code: Select all

bookmarksHistoryPanelUtil.PanelBookmarkinit();

var tree = document.getElementById("bookmarks-view");
if(
bookmarksHistoryPanel.popupNode != bookmarksHistoryPanel.PanelBookmark) {
 tree.place = "place:folder=BOOKMARKS_MENU&queryType=1";

 bookmarksHistoryPanel.PanelBookmark.addEventListener("popupshown", function(event){
  event.target.removeEventListener(event.type, arguments.callee, false);
  tree.focus();
 },false);
 bookmarksHistoryPanel.PanelBookmark.addEventListener("popuphidden", function(event){
  event.target.removeEventListener(event.type, arguments.callee, false);
  tree.onkeypress = PanelSidebarUtils.handleTreeKeyPress;
  tree.place = "place:queryType=1&folder=60";
 },false);

 tree.onkeypress = function(event) {
  if (event.keyCode == event.DOM_VK_RETURN && event.target.selectedNode.type < 3) {
   PlacesUIUtils.openNodeWithEvent(event.target.selectedNode, event);
   if(!bookmarksHistoryPanel.sticky.checked) bookmarksHistoryPanel.sticky.parentNode.parentNode.parentNode.hidePopup();
  }
 }
}

bookmarksHistoryPanel.togglePanel('PanelBookmark'); 
hllwn
Posts: 54
Joined: March 6th, 2010, 9:52 pm

Re: keyconfig 20080929

Post by hllwn »

Everything's working perfect. Thank you so much dorando I really appreciate your help.
kondensatorn
Posts: 2
Joined: May 25th, 2010, 1:19 am

Re: keyconfig 20080929

Post by kondensatorn »

Hi, I love this extension so I tried to install it on Thunderbird 3.0.4 (I run it on Solaris 10, on a sparc)

When I did, Thunderbird crashed, and when I started it again, it reported that keyconf was incompatible with this version of T-bird.

Should keyconf work with T-bird 3.0.4?
blekm
Posts: 8
Joined: September 21st, 2007, 1:38 am

Re: keyconfig 20080929

Post by blekm »

i've just installed this spectacular addons.. but only one question: is there a way to add a shortcut for "Print Preview"?

I don't see this voice using this addons..

someone can help me? :D

Thanks
hllwn
Posts: 54
Joined: March 6th, 2010, 9:52 pm

Re: keyconfig 20080929

Post by hllwn »

blekm wrote:i've just installed this spectacular addons.. but only one question: is there a way to add a shortcut for "Print Preview"?

I don't see this voice using this addons..

someone can help me? :D

Thanks


Code: Select all

PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview);
WCityMike
Posts: 63
Joined: February 29th, 2004, 10:28 am
Location: Chicago, Illinois
Contact:

Re: keyconfig 20080929

Post by WCityMike »

Is there a way to apply a keystroke to "open all in tabs" for a particular folder?

In other words, I have a folder that contains my morning bookmarks. At the moment, I right-click on the folder and pick "open all in tabs."

It'd be ideal if I could simply, say, hit Ctrl-Shift-M and have Firefox automatically open all in tabs for my the folder in question.

Edit: Gave it the old college try, and got as far as finding that this was the code from Firefox's browser.jar:

Code: Select all

PlacesUIUtils.openContainerNodeInTabs(this.parentNode._resultNode, event);


Couldn't seem to get past that, though.
mad.engineer
Posts: 314
Joined: August 8th, 2006, 4:08 pm

Re: keyconfig 20080929

Post by mad.engineer »

Hi dorando, Can you please update Keyconfig to make it compatible with TB 3.1 RC1 released today?. Thanks
iklmn
Posts: 2
Joined: May 25th, 2010, 4:33 am

Re: keyconfig 20080929

Post by iklmn »

hi everybody. what is the code for scrolling pages up and down ?
WCityMike
Posts: 63
Joined: February 29th, 2004, 10:28 am
Location: Chicago, Illinois
Contact:

Re: keyconfig 20080929

Post by WCityMike »

Hoping someone might be kind enough to answer my unanswered question from two notes up. Anyone? Thanks in advance!
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

kondensatorn wrote:When I did, Thunderbird crashed, and when I started it again, it reported that keyconf was incompatible with this version of T-bird.
Assumable Thunderbird crashed before it retrieved the compatibility information (you can manually retrieve it with Tools > Add-ons > Find Updates).

WCityMike wrote:Is there a way to apply a keystroke to "open all in tabs" for a particular folder?

In other words, I have a folder that contains my morning bookmarks. At the moment, I right-click on the folder and pick "open all in tabs."

It'd be ideal if I could simply, say, hit Ctrl-Shift-M and have Firefox automatically open all in tabs for my the folder in question.

Edit: Gave it the old college try, and got as far as finding that this was the code from Firefox's browser.jar:

Code: Select all

PlacesUIUtils.openContainerNodeInTabs(this.parentNode._resultNode, event);


Couldn't seem to get past that, though.
Try

Code: Select all

var query = PlacesUtils.history.getNewQuery();
query.setFolders([__ID__], 1);

var options = PlacesUtils.history.getNewQueryOptions();
var result = PlacesUtils.history.executeQuery(query, options);

PlacesUIUtils.openContainerNodeInTabs(result.root, event);  
replace __ID__ with the result of

Code: Select all

function getFolderId(event) {
 if(!event.target.firstChild || !event.target.firstChild._resultNode)
  return;

 window.removeEventListener("mouseup", arguments.callee, true);
 event.preventDefault();
 event.stopPropagation();

 alert(event.target.firstChild._resultNode.itemId);
}

window.addEventListener("mouseup", getFolderId, true);   
. Alternatively try

Code: Select all

gBrowser.loadTabs(["http://www.google.com/","http://planet.mozilla.org/"]);  

mad.engineer wrote:Hi dorando, Can you please update Keyconfig to make it compatible with TB 3.1 RC1 released today?. Thanks
Since Thunderbird 3.1 seems to be unscheduled I won't update compatibility information yet, but you can add a boolean 'extensions.checkCompatibility.3.1' through about:config to disable the compatibility claim enforcing.

iklmn wrote:hi everybody. what is the code for scrolling pages up and down ?
Try

Code: Select all

commandDispatcher.focusedWindow.scrollByLines(7);   
and

Code: Select all

commandDispatcher.focusedWindow.scrollByLines(-7); 
WCityMike
Posts: 63
Joined: February 29th, 2004, 10:28 am
Location: Chicago, Illinois
Contact:

Re: keyconfig 20080929

Post by WCityMike »

Dorando, thanks. That does the trick just fine. It is much appreciated!
Post Reply