From cybernetnews… you can make it so websites can’t override the password saving feature in Firefox. Edit the file nsLoginManager.js, and modify line 770 to return false all the time.
Continue reading Firefox: Remember All Passwords
Tag: JavaScript
OSX + JavaScript + Multiple Monitors
As I posted a while back, there’s no real definitive help for doing javascript with multiple monitors. Now that I’m on Mac OSX, I thought I’d update with the info for that platform.
Firefox sees various values differently on the main screen and on the secondary screen… here is a quick table with the info — for reference sake, the secondary display is vertically positioned above the primary display, and my Dock is on the left side of the primary screen…
Variable | Primary | Secondary |
Actual Resolution | 1440×900 | 1920×1200 |
screen.top | 0 | -1200 |
screen.left | 0 | -269 |
screen.width | 1440 | 1920 |
screen.height | 900 | 1200 |
screen.availTop | 22 | -1200 |
screen.availLeft | 53 | -269 |
screen.availWidth | 1387 | 1920 |
screen.availHeight | 878 | 1200 |
So, you’d think the same script would work fine… but on the primary screen, moving to (0,0) put you at (availTop, availLeft), aka (22,53) because of the Dock and the OSX menu.
The code that worked for me…
resizeTo( 1024, screen.availHeight ); var screenTop = screen.availTop; if( screen.availHeight != screen.height ) { screenTop = 0; } moveTo( screen.availLeft, screenTop );
Javascript on Multiple Monitor Systems
I have a preference to keep my browser windows a certain width (1024 pixels for various reasons), flush against the right side of my monitor display, and taking the full height of the screen. To do this, I have the following javascript on my start page:
resizeTo( 1024, screen.availHeight );
moveTo( (screen.availWidth - 1024), 0 );
For some reason though, Firefox has always had some strange behavior when running this script on my systems with multiple monitors.
JavaScript Cookbook
No, not the O’Reily book, this is a good website that has a lot of JavaScript code, in case you find yourself in need…
http://www.java2s.com/Code/JavaScript/CatalogJavaScript.htm
As you might imagine, there are examples for more things in the entire website…
Client Side Collapse/Expand
Want to do it directly with javascript? Here’s an example, including changing a collapse/expand button, that I snagged from somewhere… Continue reading Client Side Collapse/Expand
Block Enter Key Submit
Sometimes you want a form to submit when the enter key is pressed, most times you don’t… here’s the code to block it from happening… Continue reading Block Enter Key Submit