MozillaZine

Saved logins page changes window size

Discussion of bugs in Mozilla Firefox
tomri
 
Posts: 38
Joined: November 18th, 2004, 3:30 am

Post Posted July 15th, 2019, 5:59 am

Hi,

After updating to FF 68 when I load chrome://passwordmgr/content/passwordManager.xul it changes the size of the FF main window. It did not do that up to FF 67.

Anyone know how to prevent that? The "normal" way to get t the passwords is so idiotically inefficient, I don't like that (Menu->Options->Security->Scroll down and search for the button->Click the button->..." you get the idea.

Other than removing useful features and breaking existing ones there has not been much coming down the pipe from Mozilla lately (SCNR).

br/Tom

morat
 
Posts: 3472
Joined: February 3rd, 2009, 6:29 pm

Post Posted July 15th, 2019, 8:38 am

You can create a desktop shortcut to open a new Saved Logins window.

firefox.exe -chrome "chrome://passwordmgr/content/passwordManager.xul"

http://kb.mozillazine.org/Command_line_arguments

therube

User avatar
 
Posts: 20074
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted July 15th, 2019, 5:48 pm

changes the size of the FF main window

True that.
At first, I thought FF had crashed & I was looking at Crash Reporter.


Seems Password Manager remembers its' size.
So if you were to resize it... next time you open it, it will open to that size.

Still not optimal, but...
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

therube

User avatar
 
Posts: 20074
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted July 15th, 2019, 6:16 pm

If you include the -new-window switch to your shortcut, then Password Manager will open in a new window, leaving existing window size unaffected.

Code: Select all
firefox  -new-window  -chrome "chrome://passwordmgr/content/passwordManager.xul"
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

tomri
 
Posts: 38
Joined: November 18th, 2004, 3:30 am

Post Posted July 16th, 2019, 12:06 am

Is there a way to do this with a bookmark inside FF?

morat
 
Posts: 3472
Joined: February 3rd, 2009, 6:29 pm

Post Posted July 16th, 2019, 5:32 am

@tomri

You could create a button to open the password manager, but such hacks are not recommended for normal users.

Firefox Quantum compatible userChrome.js
http://github.com/Sporif/firefox-quantum-userchromejs

Restart Button
http://gist.github.com/Sporif/ad6e917d87787491538bac80d3c8918c

Code: Select all
// open or focus password manager
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
  getService(Components.interfaces.nsIWindowMediator);
var win = wm.getMostRecentWindow("Toolkit:PasswordManager");
if (win) {
  win.focus();
} else {
  var url = "chrome://passwordmgr/content/passwordManager.xul";
  window.openDialog(url, "Toolkit:PasswordManager", "", null);
}

@therube

Examples (1) and (2) work the same for me. Both open a new window.

1. FirefoxPortable.exe -chrome "chrome://passwordmgr/content/passwordManager.xul"
2. FirefoxPortable.exe -new-window -chrome "chrome://passwordmgr/content/passwordManager.xul"

therube

User avatar
 
Posts: 20074
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted July 16th, 2019, 12:06 pm

(Pretty sure on my end 1. opened in current window.
Maybe FirefoxPortable.exe automatically sends the -new-window switch?
Does FirefoxPortable.exe www.google.com open google.com, & does that open a tab or new window?)
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

morat
 
Posts: 3472
Joined: February 3rd, 2009, 6:29 pm

Post Posted July 16th, 2019, 3:54 pm

@therube

Example (3) opens the page in a new tab in the foreground in the main window.

3. FirefoxPortable.exe www.google.com

It may be a preference that causes the different behavior.

tomri
 
Posts: 38
Joined: November 18th, 2004, 3:30 am

Post Posted July 18th, 2019, 4:29 am

@morat
Thanks for the hint. It made me wonder if perhaps that JS script could also work from a normal FF bookmark when enclosed with:
Code: Select all
javascript:(function() { your code })();

I have one existing Bookmarklet of that type but the method does not seem to work for the pswd mgr. Going through the hoops to install custom chrome whatever seems way too complex and is likely to break at some point.

I am really wondering if anyone @Mozilla is ever using their own pswd mgr? I cannot quickly get to the pswd mgr. Why do I need it? Because on some pages FF will not offer to enter the pswd. Same for basic CRUD operations on the stored data. Thought that was common practice; but no. Or why did they remove the export pswd option? Because users are too dumb to handle their pswds safely? Oh my. "Forcing people to only do what is right" has failed so many times in so many ways. I already thought of migrating to an external pswd manager but that opens a whole new can of worms. I want to keep it simple. (end rant)

morat
 
Posts: 3472
Joined: February 3rd, 2009, 6:29 pm

Post Posted July 18th, 2019, 5:46 am

tomri wrote:Thanks for the hint. It made me wonder if perhaps...

The above JS script is system privileged code. It can not execute in a bookmarklet.

Here is the code for a password manager button if you want to try it.

Instructions:

1. create userChrome.css, userChrome.xml and PasswordManagerFirefoxButton_Movable.uc.js files
2. restart application
3. open menu bar
4. left click password manager button on menu bar

userChrome.css
http://kb.mozillazine.org/UserChrome.css

* chrome\userChrome.css

Code: Select all
/* Firefox userChrome.css */

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

toolbarbutton#alltabs-button {
  -moz-binding: url("userChrome.xml#js");
}

* chrome\userChrome.xml for Firefox 68

http://github.com/Sporif/firefox-quantu ... Chrome.xml

* chrome\userChrome.xml for Firefox 69

http://github.com/Sporif/firefox-quantu ... Chrome.xml

* chrome\PasswordManagerFirefoxButton_Movable.uc.js

Code: Select all
(function () {
  if (location != "chrome://browser/content/browser.xul") return;

  /* CustomizableUI
     http://developer.mozilla.org/docs/Mozilla/JavaScript_code_modules/CustomizableUI.jsm
     http://developer.mozilla.org/docs/Mozilla/JavaScript_code_modules/CustomizableUI.jsm/API-provided_widgets
  */

  try {
    CustomizableUI.createWidget({
      id: "__unique_identifier_password_manager_button", // should match id below
      type: "button",
      defaultArea: CustomizableUI.AREA_MENUBAR,
   // defaultArea: CustomizableUI.AREA_NAVBAR,
      label: "Password Manager",
      tooltiptext: "Password Manager" + "\n" + "\n" +
        "L: open or focus password manager" + "\n" + "R: open button context popup",
      onCommand: function (aEvent) {
        var win = aEvent.target.ownerDocument.defaultView;
        var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
          getService(Components.interfaces.nsIWindowMediator);
        var pmWin = wm.getMostRecentWindow("Toolkit:PasswordManager");
        if (pmWin) {
          pmWin.focus();
        } else {
          var url = "chrome://passwordmgr/content/passwordManager.xul";
          win.openDialog(url, "Toolkit:PasswordManager", "", null);
        }
      },
    });
  } catch (e) {
    Components.utils.reportError(e);
  };

  var ios = Components.classes["@mozilla.org/network/io-service;1"].
    getService(Components.interfaces.nsIIOService);
  var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].
    getService(Components.interfaces.nsIStyleSheetService);
  var dataUrl = "data:image/png;base64," +
    "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAADt0lEQVR42rWV/1PTBRjHP0" +
    "ecq0goQMcFjeKIrZ03YDQENmAbJ3GCIISyhAGbICGyOsZgqDBGgqUMJDvJ49tRyVnSpZ5F" +
    "chzZGSGNkiS0GTUnbjEYjCFMmIx3v3X9GJ/V+w94ve6e57n340aQiCyTGVieH9ahUXCNZ1" +
    "VCnFEnLNcrhV8dPyLgEa6mPJfFby6Psd7qzcLscAEWb5XCoa/AyoNqfP1pjrO5VignDd8v" +
    "Ct6qKYuxGAbyYP7+AJb1rXio7wZsFwCLCpiuwpWuNKf67VcFpASqEk7tyPksWLTF0A0exl" +
    "BnGj5Rc3C1bTcWbrdh5e5BLN6Uor4s4hopgaaCO2L9qQT2yQpc69yDwsQtNbJ9wV6KPHb2" +
    "O1mcx/bb5VjSitBVx14lJWhRJthX71UCFjU08igbQRB/H4lSxBozDWZi4XoyWmt3g5Sg9D" +
    "WfUae5BbDW4VJbOo5VcbMiCcLtSAGd0V7HeWi9vguLQ6kQBdDXSAkKBN6nb16WY91UCeOw" +
    "FP2dKehqiF37XMPDRO8OmPt4+LmjCFzi6TFSgqLUINrJIgbMP56C/U4xFrV7sTCUBsvgDp" +
    "j7Y2EaqIHEj47YTZvzNz6efdtoJxS8RzZdIwwDYnz3QSkefKvBzA/N+O2iClcq5cjx8AOf" +
    "4tm1cbgs0rdRGWdb0jfBaf0Io+3pyH/F97GMHbQu2ULF6+5eSHR/xsSneJb+c/H/Dv7Gdq" +
    "/Gw/w5+3Q3YOvF5MUsHIp+YSUp4CnveH9vyi4fHw8eheKxYTBBEEQcP/DJxqo489JUK5zW" +
    "Hvzak4LqtGCHlOcf5HLn5BDEE+/KY4wW3Qk4Z7vxS4cQqpSX1sXRfgyX4XG0Z59Tvxlhtt" +
    "xphMN0FtqmKNTtpK2LOdRQl+EsKuFxVBJmmRnXwGFqx+ipeDQkB2MPw2u7y3AmQWyqlob/" +
    "adQ2wDnXg/mRXLRlMyEV+E/l7OR5usp3qykINxiG1HBMnYaxLxlfKmJgGz8E3Y338V5J6H" +
    "xZ0TY/0nTVgYjJyW+qsXq/BfrPuOgtDMPsjXysTp0BLHWYHpNB81bY8slqKZ1cFcsYyyv6" +
    "JtxtfxnnRMG490Ui5oYlmB46CPPwUfxxtQYTfZU4Xhg6Qe4VZrPFNenstfOScDQLQ3D/Qh" +
    "Rm+hMwfi4JFUkRKEkIWVHlsOf282lM0mPKpFP55RnMy6n+W7VKFgO/fxwPw6VE1BdHzQsD" +
    "PL32Cnw3E/9R3DMCqR8qIlnQdYugKY22Ef9HMkKeLxGzaI/yol/MJcv4C1pp72KyCTytAA" +
    "AAK3RFWHRDb3B5cmlnaHQAQ29weXJpZ2h0IKkgMjAwOC0yMDExIElOQ09SUyBHbWJIEI4h" +
    "TwAAAABJRU5ErkJggg==";
  var css = "#__unique_identifier_password_manager_button {";
  css += 'list-style-image: url("' + dataUrl + '") !important;';
  css += "-moz-image-region: auto !important;";
  css += "}";
  var uri = ios.newURI("data:text/css," + encodeURIComponent(css), null, null);
  if (!sss.sheetRegistered(uri, sss.USER_SHEET)) {
    sss.loadAndRegisterSheet(uri, sss.USER_SHEET);
  }
})();

CustomizableUI
http://developer.mozilla.org/docs/Mozilla/JavaScript_code_modules/CustomizableUI.jsm
http://developer.mozilla.org/docs/Mozilla/JavaScript_code_modules/CustomizableUI.jsm/API-provided_widgets

tomri
 
Posts: 38
Joined: November 18th, 2004, 3:30 am

Post Posted July 19th, 2019, 12:43 am

@morat Thanks for the summary.

Return to Firefox Bugs


Who is online

Users browsing this forum: No registered users and 3 guests