thucar / E-Calc Unlocker

// ==UserScript==
// @name         E-Calc Unlocker
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://www.ecalc.ch/motorcalc.php
// @grant        none
// ==/UserScript==

var csvoptions = $('#csvForm input');
var csvvalues = $.map(csvoptions ,function(option) {
    option.disabled = false;
});

var battoptions = $('#inBCell option');
var battvalues = $.map(battoptions ,function(option) {
    var newVal = option.text;
    option.disabled = false;
    option.value = newVal;
});

var ESCoptions = $('#inEType option');
var posNum;
var ESCvalues = $.map(ESCoptions ,function(option) {
    if (option.value != "na"){
        posNum = option.value;
    } else {
        posNum++;
    }
    option.disabled = false;
    option.value = posNum;
});

$( "#inMManufacturer" ).change(function() {
    var options = $('#inMType option');

    var values = $.map(options ,function(option) {
        var parentId = $('#inMManufacturer').find(":selected").val();
        var newVal = option.text.replace(/( \(\d+\))/g, "");
        option.disabled = false;
        option.value = parentId+'|'+newVal;
    });
});