Forum login lazarus / 8-Other ---------------------------------------------------------------------- tony72 · 2006-09-13 12:27 I don't know if it's just me, but every few days or so, regarless of me checking the "Log me in automatically" box, this forum decides to force me to log in manually. Moreover it seems to do something that prevents firefox from remembering the username and password, so I have to type it in in full. That annoys me, so here's a simple greasemonkey script to do a one- click login - enters and submits your username and password when you click the "Log in" link (requires Firefox and the greasemonkey extension obviously),  for anyone else as lazy as me. Obviously not secure, but then this site doesn't have your credit card details or anything like that (well I hope not). Paste it into a text file, and save it as "laz.user.js", then open it in firefox and click install. Code: [Select]// ==UserScript== // @name           lazarus forum tweaks // @namespace      http://127.0.0.1/ // @description    lazarus forum tweaks // @include        http://www.lazarus.freepascal.org/* // ==/UserScript== (function() { function dologin(){ var loc = new String(window.location.href); if (loc.search(/&file=login/) > -1) { var inputs = document.getElementsByTagName("INPUT"); // fill in username for (var i = 0; i < inputs.length; i++){ if (inputs[i].name == "uname"){ inputs[i].value = "yourusername"; // change this to your username break; } } // fill in password for (var i = 0; i < inputs.length; i++){ if (inputs[i].name == "pass"){ inputs[i].value = "yourpassword"; // change this to your password break; } } // tick "remember me" box for (var i = 0; i < inputs.length; i++){ if (inputs[i].name == "rememberme"){ inputs[i].checked = true; break; } } // submit form for (var i = 0; i < document.forms.length; i++){ if (document.forms[i].action == "http://www.lazarus.freepascal.org/user.php"){ document.forms[i].submit(); //alert("whoo!"); break; } } } } dologin(); })(); ---------------------------------------------------------------------- Vincent Snijders · 2006-09-13 19:38 I also get logged out every couple of days. But always the password box is filled with some *, so I only need to click on the button.