1function Speller(args) { 2 args = args || new Object; 3 this.url = args.url || "."; 4 this.args = { 5 defLang: args.lang || "ru", 6 defOptions: args.options || 0x0004, 7 spellDlg: args.spellDlg || { width: 440, height: 265 }, 8 optDlg: args.optDlg || { width: 330, height: 275 }, 9 userDicDlg: args.userDicDlg || { width: 270, height: 350 } 10 }; 11} 12 13Speller.IGNORE_UPPERCASE = 0x0001; 14Speller.IGNORE_DIGITS = 0x0002; 15Speller.IGNORE_URLS = 0x0004; 16Speller.FIND_REPEAT = 0x0008; 17Speller.IGNORE_LATIN = 0x0010; 18Speller.FLAG_LATIN = 0x0080; 19 20Speller.prototype.check = function(ctrls) { 21 this.showDialog(this.url + "/spelldlg.html", this.args.spellDlg, ctrls); 22} 23 24Speller.prototype.optionsDialog = function() { 25 this.showDialog(this.url + "/spellopt.html", this.args.optDlg); 26} 27 28Speller.prototype.showDialog = function(url, size, ctrls) { 29 var a = this.args; 30 var args = { ctrls: ctrls, lang: a.lang, options: a.options, 31 defLang: a.defLang, defOptions: a.defOptions, 32 optDlg: a.optDlg, userDicDlg: a.userDicDlg 33 }; 34 var left = 0, top = 0; 35 if (window.outerWidth) { 36 left = window.screenX + ((window.outerWidth - size.width) >> 1); 37 top = window.screenY + ((window.outerHeight - size.height) >> 1); 38 } 39 if (window.showModalDialog && navigator.userAgent.indexOf("Opera") < 0) { 40 var features = "dialogWidth:" + size.width + "px;dialogHeight:" + size.height + "px;scroll:no;help:no;status:no;"; 41 if (navigator.userAgent.indexOf("Firefox") >= 0) 42 features += "dialogLeft:" + left + "px;dialogTop:" + top + "px;"; 43 window.showModalDialog(url, args, features); 44 a.lang = args.lang; a.options = args.options; 45 } 46 else { 47 var name = url.replace(/[\/\.]/g, ""); 48 var features = "width=" + size.width + ",height=" + size.height + ",toolbar=no,status=no,menubar=no,directories=no,resizable=no"; 49 if (left || top) 50 features += ",left=" + left + ",top=" + top; 51 window.theDlgArgs = args; 52 var dlg = window.open(url, name, features); 53 dlg.onunload = function() { 54 a.lang = args.lang; a.options = args.options; 55 } 56 } 57}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.