keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

Hi!

Can I increase/decrease zoom level by a specific percentate via keyconfig? I'm thinking of using ctrl+shift +wheel and num +/-
User avatar
WildcatRay
Posts: 7484
Joined: October 18th, 2007, 7:03 pm
Location: Columbus, OH

Re: keyconfig 20110522

Post by WildcatRay »

avada wrote:Hi!

Can I increase/decrease zoom level by a specific percentate via keyconfig? I'm thinking of using ctrl+shift +wheel and num +/-
Do you mean something other than the +/-10% that occurs when you hold Ctrl and scroll the mouse wheel?
Ray

OS'es: 4 computers with Win10 Pro 64-bit; Current Firefox, Beta, Nightly, Chrome, Vivaldi
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

WildcatRay wrote:
avada wrote:Hi!

Can I increase/decrease zoom level by a specific percentate via keyconfig? I'm thinking of using ctrl+shift +wheel and num +/-
Do you mean something other than the +/-10% that occurs when you hold Ctrl and scroll the mouse wheel?
Yes. Actually I zoom by zoom levels specified in an addon. But it would be nice to have a fixed percent mode as well.
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@avada

Normally Fx uses the values in the toolkit.zoomManager.zoomValues pref.

Try these:

Code: Select all

ZoomManager.zoom += 0.10;

Code: Select all

ZoomManager.zoom -= 0.10;
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

morat wrote:@avada

Normally Fx uses the values in the toolkit.zoomManager.zoomValues pref.

Try these:

Code: Select all

ZoomManager.zoom += 0.10;

Code: Select all

ZoomManager.zoom -= 0.10;
Thanks! It works fine.
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

Hi!

Does anyone have a neat solution to hide all GUI elements (preferably, for the particular window only) and show them, leaving only the window frame. And them show them again on when they're hidden

(I guess the titlebar can't be hidden via JS/css)
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@avada

I don't remember what works and what doesn't work on Firefox 56. Perhaps...

Full Screen Plus
http://custombuttons.sourceforge.net/fo ... ?f=4&t=250

Edit:

Here is a version for keyconfig of the toggle chrome middle click button.

Code: Select all

// setToolbarVisibility function uses document.persist
// i.e. toolbar visibility persists across browser sessions
// https://developer.mozilla.org/en/XUL/Attribute/persist
function hideChrome() {
  var mainWindow = document.getElementById("main-window");
  window.moveTo(0, 0);
  window.maximize();
  mainWindow.setAttribute("hidechrome", "true");
  window.resizeTo(window.screen.availWidth, window.screen.availHeight - 2);
}
function showChrome() {
  var mainWindow = document.getElementById("main-window");
  mainWindow.setAttribute("hidechrome", "");
  window.resizeTo(window.screen.availWidth, window.screen.availHeight);
  window.maximize();
}
function setToolbarGroupVisibility(isVisible) {
  var toolbar;
  // toolbar = document.getElementById("toolbar-menubar"); // Menu Bar
  // setToolbarVisibility(toolbar, isVisible);
  // toolbar = document.getElementById("nav-bar"); // Navigation Toolbar
  // setToolbarVisibility(toolbar, isVisible);
  toolbar = document.getElementById("PersonalToolbar"); // Bookmarks Toolbar
  setToolbarVisibility(toolbar, isVisible);
  // toolbar = document.getElementById("status4evar-status-bar"); // Status-4-Evar, Status Bar
  // setToolbarVisibility(toolbar, isVisible);
  // toolbar = document.getElementById("ctraddon_extra-bar"); // Classic Theme Restorer, Additional Toolbar
  // setToolbarVisibility(toolbar, isVisible);
  // toolbar = document.getElementById("ctraddon_addon-bar"); // Classic Theme Restorer, Add-on Bar
  // setToolbarVisibility(toolbar, isVisible);
  // toolbar = document.getElementById("GBL-Toolbar"); // Googlebar Lite Toolbar
  // toolbar.collapsed = !isVisible;
  // document.persist(toolbar.id, "collapsed");
  // toolbar = document.getElementById("webdeveloper-toolbar"); // Web Developer Toolbar
  // toolbar.collapsed = !isVisible;
  // document.persist(toolbar.id, "collapsed");
}
if (window.fullScreen) {
  window.fullScreen = false;
  gBrowser.setStripVisibilityTo(true);
} else if (isChromeVisible) {
  hideChrome();
  setToolbarGroupVisibility(false);
} else {
  showChrome();
  setToolbarGroupVisibility(true);
}
Last edited by morat on June 10th, 2019, 4:43 am, edited 1 time in total.
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

morat wrote:@avada

I don't remember what works and what doesn't work on Firefox 56. Perhaps...

Full Screen Plus
http://custombuttons.sourceforge.net/fo ... ?f=4&t=250
Thanks, I'll have a look. Though I don't want full screen. I want to hide all ui elements in floating window mode.
teabow
Posts: 3
Joined: June 15th, 2019, 2:18 am

Re: keyconfig 20110522

Post by teabow »

Hi,

Using Keyconfig, I found out how to move a message to a specified folder (using update from this old post).

However, I cannot figure out how to create macro to go to a specific folder. I did try code suggested here (mention "Go to a specific folder" in section "Custom code") and searched backward on this thread (a dozen pages) with no result.

Any suggestion?

(Linux Ubuntu 16.04 Thunderbird 60.7 Keyconfig 2018.1)
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@teabow

Try these:

Code: Select all

// show folder uri
alert(GetFirstSelectedMsgFolder().URI);

Code: Select all

// select folder
var targetUri = "mailbox://nobody@Local%20Folders/Trash";
SelectFolder(targetUri);

Code: Select all

// move message
var targetUri = "mailbox://nobody@Local%20Folders/Trash";
var targetFolder = MailUtils.getFolderForURI(targetUri);
MsgMoveMessage(targetFolder);
teabow
Posts: 3
Joined: June 15th, 2019, 2:18 am

Re: keyconfig 20110522

Post by teabow »

@morat

Thanks for reply.

#1 and #2 don't seem to work, except if I'm doing something wrong.
In #1, URI is to be replaced by the URI, correct? Or should I leave it and put the URI between empty ()? EDIT: does not work either.
In #2, what is in "quote" is to be replaced by the URI, correct? Or should I also replace targetUri in the last line?

Haven't tried #3 which seems to be moving message to a folder.
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@teabow

The code snippets work for me.

Thunderbird 60.7.1
Windows 7 SP1 32-bit

You just need to change the folder uri.

My "Trash" folder uri for my "Local Folders" account is "mailbox://nobody@Local%20Folders/Trash".

My "Inbox" folder uri for my Google IMAP account is "imap://username%40gmail.com@imap.googlemail.com/INBOX".

Your folder uris are different than mine. You can use the first code snippet to show the folder uri of the selected folder.

As a test, you can select a folder, then run the first code snippet in the console.

Tools > Developer Tools > Error Console

Error Console command line
http://developer.mozilla.org/en-US/docs ... mmand_line
teabow
Posts: 3
Joined: June 15th, 2019, 2:18 am

Re: keyconfig 20110522

Post by teabow »

@morat

Your suggestion does work, thank you.

A conflict between keyboard shortcuts was the problem.
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: keyconfig 20110522

Post by avada »

avada wrote:Hi!

Does anyone have a neat solution to hide all GUI elements (preferably, for the particular window only) and show them, leaving only the window frame. And them show them again on when they're hidden

(I guess the titlebar can't be hidden via JS/css)
Well, I got as far as finding this CSS:

Code: Select all

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); 


#TabsToolbar {visibility: collapse;}
#navigator-toolbox {visibility: collapse;}
browser {margin-right: -14px; margin-bottom: -14px;}
(Though it's not near perfect, I get weird 4 pixel wide scrollbars)

Now, I guess I can apply this via JS and keyconfig somehow.
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: keyconfig 20110522

Post by morat »

@avada

Try something like:

Code: Select all

var css = [];
css.push("#TabsToolbar { visibility: collapse !important; }");
// css.push("...");
// css.push("...");
var ios = Components.classes["@mozilla.org/network/io-service;1"].
  getService(Components.interfaces.nsIIOService);
var uri = ios.newURI("data:text/css," + encodeURIComponent(css.join("\n")), null, null);
var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].
  getService(Components.interfaces.nsIStyleSheetService);
if (sss.sheetRegistered(uri, sss.USER_SHEET)) {
  sss.unregisterSheet(uri, sss.USER_SHEET);
} else {
  sss.loadAndRegisterSheet(uri, sss.USER_SHEET);
}
Post Reply