add:   if (!base) { base = "gm_script"; } 
context:   this.initFilename = function(script) {    var index = {};    var base = script.name.replace(/[^A-Z0-9_]/gi, "").toLowerCase();    // 24 is a totally arbitrary max length    if (base.length > 24) {      base = base.substring(0, 24);    }        for (var i = 0; i < this.scripts.length; i++) {      index[this.scripts[i].filename] = this.scripts[i];    }        if (!index[base + ".user.js"]) {      script.filename = base + ".user.js";      return;    }        for (var count = 1; count < Number.MAX_VALUE; count++) {      if (!index[base + count + ".user.js"]) {        script.filename = base + count + ".user.js";        return;      }    }        throw new Error("doooooooode. get some different user script or something.");  }
meta: 4585	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4585/19f3148325aee62fc8ed969890b86473177554ae/config.js/clean/src/content/config.js