rtega wrote:Has anyone figured out a way yet to switch from tab-group to tab-group (just like next-tab but for tab-groups).
If you want to assign a shortcut to it try
Code: Select all
var groupItems = TabView._window.GroupItems;
var tabItem = groupItems.getNextGroupItemTab(true);
if (!tabItem)
return;
var oldGroupItem = groupItems.getActiveGroupItem();
window.gBrowser.selectedTab = tabItem.tab;
oldGroupItem.closeIfEmpty();
and for previous group
Code: Select all
var groupItems = TabView._window.GroupItems;
var tabItem = groupItems.getNextGroupItemTab(false);
if (!tabItem)
return;
var oldGroupItem = groupItems.getActiveGroupItem();
window.gBrowser.selectedTab = tabItem.tab;
oldGroupItem.closeIfEmpty();
K4RBQT99 wrote: I want to toggle the visibility of the menubar.
Try
Code: Select all
var toolbar = document.getElementById("toolbar-menubar");
toolbar.setAttribute("autohide", toolbar.getAttribute("autohide") != "true");
K4RBQT99 wrote:Oh, now I see that F10 do this on gnome. With KDE is Alt. crap, i prefer use Alt.
Try setting the ui.key.menuAccessKeyFocuses to true in
about:config.
K4RBQT99 wrote:I need the code anyway.
Try
Code: Select all
var utils = content.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_F10, 0, 0);
geon wrote:is it possible to have keyconfig in Thunderbird and simultaneously not to have in contacts (in tb)? or to have one shortcut (Del) different in tb and in its contacts? Thank you.
Add a new key, tick the Global checkbox, and use something like
Code: Select all
switch(document.location.toString()) {
case "chrome://messenger/content/messenger.xul":
alert("Main");
break;
case "chrome://messenger/content/addressbook/addressbook.xul":
alert("Contacts");
break;
default:
alert(document.location);
break;
}
bolidew wrote:I used this command to "Hide/Show TabBar":
"gBrowser.mStrip.collapsed = !gBrowser.mStrip.collapsed;"
But it doesn't work any more in Firefox 4 (with "Tabs on Top" disabled).
Would appreciate any suggestions for a shortcut key to Hide/Show TabBar ! Thanks.
Try
Code: Select all
gBrowser.tabContainer.parentNode.collapsed = !gBrowser.tabContainer.parentNode.collapsed;
ballyhairs wrote:Hey dorando,
I need a key that is global, which means it works even when FF is not active or even minimized to the tray that will activate FF if not active and minimize it if active, I hope its possible and thanks anyway.
Gecko 2.0 doesn't have any API for that, but with js-ctypes it is relatively easy to hook into the system API. Try
Code: Select all
Components.utils.import("resource://gre/modules/Services.jsm");
if(!Services.ww.activeWindow) {
Components.utils.import("resource://gre/modules/ctypes.jsm");
const user32 = ctypes.open("user32");
const BOOL = ctypes.int;
const PVOID = ctypes.voidptr_t;
const HANDLE = PVOID;
const HWND = HANDLE;
const WCHAR = ctypes.jschar;
const LPCWSTR = WCHAR.ptr;
const LPCTSTR = LPCWSTR;
const FindWindow = user32.declare("FindWindowW", ctypes.winapi_abi, HWND, LPCTSTR, LPCTSTR);
const SetForegroundWindow = user32.declare("SetForegroundWindow", ctypes.winapi_abi, BOOL, HWND);
var win = FindWindow("MozillaWindowClass", document.title);
SetForegroundWindow(win);
window.focus();
} else if(Services.ww.activeWindow != window){
window.focus();
} else {
window.minimize();
}
together with
a bootstrapped (restartless) extension for Windows which during startup tries to register a handler for any shortcut marked as global in keyconfig to invoke the associated <key> in the topmost Gecko window (adding a keyconfig.globalWindowType pref containing navigator:browser will use the topmost Browser window only). These shortcuts also work while a plugin has the focus, and the meta modifier (Windows key) can also be used (needs to be set trough about:config).
chirpy_7 wrote:a code to toggle
Pin and Unpin (as App Tab)
would also be highly desirable / nice-to-have
Try
Code: Select all
if(gBrowser.mCurrentTab.pinned)
gBrowser.unpinTab(gBrowser.mCurrentTab);
else
gBrowser.pinTab(gBrowser.mCurrentTab);
Cattleya wrote:[...] a hotkey that can On/Off Adobe Flash Player Plugin [...]
Try
Code: Select all
Components.utils.import("resource://gre/modules/AddonManager.jsm");
AddonManager.getAddonsByTypes("plugin", function(addons) {
for(var i = 0, l = addons.length; i < l; i++)
if(addons[i].name == "Shockwave Flash") addons[i].userDisabled = !addons[i].userDisabled;
});
ekbworldwide wrote:Does "functions for keyconfig" exist for FF4?
The only link I know of for it is dead:
Code: Select all
http://www.pqrs.org/tekezo/firefox/extensions/functions_for_keyconfig/
It redirects to
pqrs.org
Assumable he removed it since it wasn't updated anymore (version
1.4.0 might work in Firefox 4 if you disable the compatibility claim enforcing).
zakk wrote:Code: Select all
Error: gDocument.getElementById(node.getAttribute("command")) is null
Source File: chrome://keyconfig/content/keyconfig.js
Line: 470
Hmm, that extension adds a
Code: Select all
<key id="key_openwebapps" keycode="" command="cmd_openSharePage"/>
but no cmd_openSharePage (and during initialization the keycode is strangely set to VK_OWA)…
Until I have time for another release you can edit
Profile/extensions/keyconfig@dorando.xpi/keyconfig.zip/content/keyconfig.js (.xpi is the same as .zip) while Firefox is closed and replace
Code: Select all
return gDocument.getElementById(node.getAttribute("command")).getAttribute("oncommand");
with
Code: Select all
try { return gDocument.getElementById(node.getAttribute("command")).getAttribute("oncommand"); } catch(err){}
to fix that issue.
chirpy_7 wrote:I'm searching for the
code to
- create
and
- give focus to
- a new group (panorama group)
- with one (and only one) new tab
Try
Code: Select all
var tab = gBrowser.addTab();
TabView.moveTabTo(tab, null);
gBrowser.selectedTab = tab;
chirpy_7 wrote:I'm looking for the code to open the active / focussed tab's
tab context menu
Try
Code: Select all
var tabMenu = gBrowser.tabContextMenu || document.getAnonymousElementByAttribute(gBrowser,"anonid","tabContextMenu");
document.popupNode = gBrowser.mCurrentTab;
tabMenu.openPopup(gBrowser.mCurrentTab, "after_start", 0, 0, true);
ballyhairs wrote:Oh this incompatibility issue every update is just annoying
Disable the compatibility claim enforcing, or don't use pre-releases…