new version 1.5.1

in
Subscribe to new version 1.5.1 5 posts, 3 voices



Karate User
FirefoxWindows
// ==UserScript==
// @name           Auto Fill any forms with custom information
// @author         LuckyShot
// @namespace      http://www.luckyshot.es
// @description    Autofill and complete online web formularies with your custom data
// @version        1.5.1
// @include        http*://*
// ==/UserScript==

// FUNCTIONS  

GM_registerMenuCommand("Auto-fill - AutoComplete",
  function()
    {

      var inputtexts = new Array(
      new Array (GM_getValue('af_ot',''),""), /* This one is used as a wildcard (if you want undetected fields to fill with something) */
      new Array (GM_getValue('af_ca',''),"captcha","verif","response","cword","turing","image","security","token","code"),
      new Array (GM_getValue('af_ye','1976'),"year","yy","birth"),
      new Array (GM_getValue('af_mo','7'),"month","mm"),
      new Array (GM_getValue('af_da','21'),"day","dd"),
      new Array (2008 - GM_getValue('af_ye','1976'),"age"),
      new Array (GM_getValue('af_nn','bugmenot'),"user","display","login","nick","id","member","account"),
      new Array (GM_getValue('af_fn','Garold'),"first","real"),
      new Array (GM_getValue('af_ln','Walker'),"last","surname"),
      new Array (GM_getValue('af_fn','Garold')+" "+GM_getValue('af_ln','Walker'),"fullname","full_name"),
      new Array (GM_getValue('af_qu','Who is the best bugger?'),"question"),
      new Array (GM_getValue('af_an','bugmenot'),"answer"),
      new Array (GM_getValue('af_em','garoldwalker@mailinator.com'),"mail"),
      new Array (GM_getValue('af_ms','garoldwalker@hotmail.com'),"msn"),
      new Array (GM_getValue('af_ic','45592738'),"icq"),
      new Array (GM_getValue('af_ti','Dr.'),"title"),
      new Array (GM_getValue('af_ph','(513) 972-6287'),"phone"),
      new Array (GM_getValue('af_ph1','513'),"phone1"),
      new Array (GM_getValue('af_ph2','972'),"phone2"),
      new Array (GM_getValue('af_ph3','6287'),"phone3","ext"),
      new Array (GM_getValue('af_fa','(513) 972-6287'),"fax"),
      new Array (GM_getValue('af_ad','4960 Brandy Run'),"address"),
      new Array (GM_getValue('af_ad2','Dayton, OH 45401'),"address2"),
      new Array (GM_getValue('af_ci','Dayton'),"city","town"),
      new Array (GM_getValue('af_ar','51'),"area"),
      new Array (GM_getValue('af_st','OH'),"state"),
      new Array (GM_getValue('af_ct','United States'),"country","location"),
      new Array (GM_getValue('af_zi','45401'),"zip","postal"),
      new Array (GM_getValue('af_co','Feel Good, Inc.'),"company","organization","organisation"),
      new Array (GM_getValue('af_po','CEO'),"position","occup"),
      new Array (GM_getValue('af_in','I love to dance!'),"interest","hobbie"),
      new Array (GM_getValue('af_we','http://www.luckyshot.es'),"web","url"),
      new Array (GM_getValue('af_re','LuckyShot'),"referrer"),
      new Array (GM_getValue('af_tz','0'),"timezoneoffset")
      );
      
      /* Password */
      var inputpasswords = new Array(GM_getValue('af_ps','bugmenot'),"pass","pw","retype","confirm","verify");
      
      /* You can add or remove from these lists to check, uncheck or leave its default */
      var checkboxes = new Array (
      /* Uncheck these */ new Array ("adminemail","showemail","receive","pm","news","mail","update","spam","send","offer","agent"),
      /* Check these   */ new Array ("rules","tos","terms","coppa","agree","accept","save","remember","age","legal","confirm","token")
      );


      // INPUT
       var textElements = document.getElementsByTagName('input');
       for (var i=0;i<textelements><inputtexts><inputtexts>=0) {
                 textElements[i].value = inputtexts[j][0];
               }
             }
           }
         }
       // INPUT type PASSWORD
         if (textElements[i].type == 'password') {
           for (var k=1; k<inputpasswords>=0) {
               textElements[i].value = inputpasswords[0];
             }
           }
         }
       // INPUT type CHECKBOX
         if (textElements[i].type == 'checkbox') {
           for(var j=1;j<checkboxes>=0){textElements[i].checked=false;}}
           for(var j=1;j<checkboxes>=0){textElements[i].checked=true;}}
         }
       // INPUT type RADIO
       /* Selects the last one */
         if (textElements[i].type == 'radio') {textElements[i].checked=true;}
       }
      
       // SELECT
       /* Selects the middle one */
       var selects = document.getElementsByTagName('select');
       for (var i=0;i<selects><textelements><inputtexts>=0) {
               textElements[i].focus();
             }
           }
         }
      }
   }
);
function createMenu(){
	
      // Insert DIV style
      var styleCode = new Array();
      styleCode.push('#autofill  *, #autofill {color:#000;background:#fff;padding:0;margin:0;font-size:11px;text-align:left;font-family:Arial,sans-serif}');
      styleCode.push('#autofill {z-index:999;padding:10px;min-width:300px;border:2px solid #999;position:absolute;top:10px;right:10px}');
      styleCode.push('#autofill label {width: 3em;margin-left:1em}');
      styleCode.push('#autofill p {color:#000;margin:10px}');
      styleCode.push('#autofill p strong {font-size:14px}');
      styleCode.push('#autofill p label small {color:#ccc;font-size:8px;margin-left:10px}');
      styleCode.push('#autofill h2 a {color:#0085d5;margin:20px;font-size:16px}');
      styleCode.push('#autofill .submit input {margin-left: 20px;background:#fff;border:none;color:#0085d5}');
      styleCode.push('#autofill input {background: #f1f1f1;border: 1px solid #ccc;padding:4px;}');

      var style = document.createElement('style');
      style.innerHTML = styleCode.join('\n');
      
      try { document.getElementsByTagName('head')[0].appendChild(style); }
      catch(e) { console.debug(e)}
      
      // Draw DIV 
      var submitbutts = '

<input /> <input />

'; var guiCode = new Array(); guiCode.push('
'); guiCode.push('

AutoFill Forms Script

'); guiCode.push('

Personal

'); guiCode.push('

Nick name: <label><input /></label>

'); guiCode.push('

First name: <label><input /></label>

'); guiCode.push('

Last name: <label><input /></label>

'); guiCode.push('

Password: <label><input /> Default: bugmenot</label>

'); guiCode.push(submitbutts); guiCode.push('

Professional

'); guiCode.push('

Title: <label><input /></label>

'); guiCode.push('

Position: <label><input /></label>

'); guiCode.push('

Company: <label><input /></label>

'); guiCode.push(submitbutts); guiCode.push('

Birth

'); guiCode.push('

Day: <label><input /></label>

'); guiCode.push('

Month: <label><input /></label>

'); guiCode.push('

Year: <label><input /></label>

'); guiCode.push('

Secret question: <label><input /></label>

'); guiCode.push('

Secret answer: <label><input /> Default: bugmenot</label>

'); guiCode.push(submitbutts); guiCode.push('

Contact

'); guiCode.push('

E-mail: <label><input /></label>

'); guiCode.push('

MSN: <label><input /></label>

'); guiCode.push('

ICQ: <label><input /></label>

'); guiCode.push('

Phone: <label><input /></label>

'); guiCode.push('

Phone 1: <label><input /></label>

'); guiCode.push('

Phone 2: <label><input /></label>

'); guiCode.push('

Phone 3: <label><input /></label>

'); guiCode.push('

Fax: <label><input /></label>

'); guiCode.push(submitbutts); guiCode.push('

Location

'); guiCode.push('

Address 1: <label><input /></label>

'); guiCode.push('

Address 2: <label><input /></label>

'); guiCode.push('

City: <label><input /></label>

'); guiCode.push('

Area: <label><input /></label>

'); guiCode.push('

State: <label><input /></label>

'); guiCode.push('

Country: <label><input /></label>

'); guiCode.push('

Zip code: <label><input /></label>

'); guiCode.push(submitbutts); guiCode.push('

Others

'); guiCode.push('

Interests: <label><input /></label>

'); guiCode.push('

Website: <label><input /></label>

'); guiCode.push('

Referrer: <label><input /></label>

'); guiCode.push('

Time Zone Offset: <label><input /></label>

'); guiCode.push('

Captcha: <label><input /></label>

'); guiCode.push('

Any other field: <label><input /></label>

'); guiCode.push(submitbutts); guiCode.push('
'); // Insert DIV var gui = document.createElement('div'); gui.id = 'autofilloptions'; gui.innerHTML = guiCode.join('\n'); guiCode.length = 0; document.body.insertBefore(gui, document.body.lastChild); // Add event SAVE var sChanges=document.getElementsByName('savechanges'); console.debug(sChanges); for (var z=0;z<schanges>
 
Karate User
FirefoxWindows

damm can post the script here the site mess it up :(
So I fixed 2 bug
1. option could only displayed 2 times
2. only the first save changes link worked.

 
Karate User
FirefoxWindows

uploaded to
http://www.megaupload.com/?d=08AHJAHZ

dunno why ppl forcing anonymous functions, variables
makes the script unreadable and hard to debug

 
l3utterfish User
FirefoxWindows

not working!!

still doesnt save the options for me....

 
XaviEsteve Script's Author
FirefoxMacintosh

Thanks Karate!
I have updated the source code.

Btw, Sorry about being so late to update it but I rarely access Userscripts with my account.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel