Changeset 731 for branches/maierman

Show
Ignore:
Timestamp:
2008-01-12 15:10:07 (1 year ago)
Author:
MaierMan
Message:

merged with trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/maierman/searching/chrome.manifest

    r568 r731  
    1919style   chrome://global/content/customizeToolbar.xul    chrome://dta/skin/integration/style.css 
    2020 
     21## toolkit ## 
     22overlay chrome://mozapps/content/downloads/unknownContentType.xul       chrome://dta/content/integration/saveas.xul 
     23 
    2124## Firefox / Flock ## 
    2225overlay chrome://browser/content/browser.xul    chrome://dta/content/integration/firefox.xul 
     
    2831overlay chrome://browser/content/sanitize.xul   chrome://dta/content/privacy/overlaySanitizeUI.xul 
    2932overlay chrome://browser/content/sanitize.xul   chrome://dta/content/privacy/overlaySanitizeCode.xul 
    30 overlay chrome:///content/downloads/unknownContentType.xul      chrome://dta/content/integration/saveas.xul 
    3133 
    3234## Seamonkey ## 
    3335overlay chrome://navigator/content/navigator.xul chrome://dta/content/integration/seamonkey.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} 
    3436overlay chrome://dta/content/integration/seamonkey.xul chrome://dta/content/integration/elements.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} 
    35 overlay chrome://dta/content/preferences/interfacePane.xul chrome://dta/content/preferences/seamonkey.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} 
     37overlay chrome://dta/content/preferences/interfacePane.xul chrome://dta/content/preferences/toolbarButtons.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} 
    3638style   chrome://navigator/content/navigator.xul chrome://dta/skin/integration/style.css application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} 
    3739 
     
    4345style   chrome://messenger/content/messageWindow.xul chrome://dta/skin/integration/style.css application={3550f703-e582-4d05-9a08-453d09bdfdc6} 
    4446 
    45 ## toolkit ## 
    46 overlay chrome://mozapps/content/downloads/unknownContentType.xul       chrome://dta/content/integration/saveas.xul 
     47## Songbird ## 
     48overlay chrome://songbird/content/xul/mainScriptsOverlay.xul    chrome://dta/content/integration/songbird.xul application=songbird@songbirdnest.com 
     49overlay chrome://dta/content/integration/songbird.xul chrome://dta/content/integration/elements.xul application=songbird@songbirdnest.com 
     50style   chrome://songbird/content/xul/mainScriptsOverlay.xul    chrome://dta/skin/integration/style.css application=songbird@songbirdnest.com 
     51style   chrome://dta/content/dta/manager.xul    chrome://dta/skin/common/songbird.css application=songbird@songbirdnest.com 
     52style   chrome://dta/content/dta/select.xul     chrome://dta/skin/common/songbird.css application=songbird@songbirdnest.com 
     53overlay chrome://dta/content/preferences/interfacePane.xul chrome://dta/content/preferences/toolbarButtons.xul application=songbird@songbirdnest.com 
  • branches/maierman/searching/chrome/content/about/about.xul

    r577 r731  
    11<?xml version="1.0"?> 
     2<!DOCTYPE dialog [ 
     3        <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> 
     4        %globalDTD; 
     5        <!ENTITY % aboutDTD 
     6                SYSTEM "chrome://dta/locale/about.dtd"> 
     7        %aboutDTD; 
     8        <!ENTITY % htmlDTD 
     9                PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
     10        %htmlDTD;        
     11]> 
    212<!-- 
    313/* ***** BEGIN LICENSE BLOCK ***** 
     
    2131 * 
    2232 * Contributor(s): 
    23  *   Federico Parodi 
     33 *   Federico Parodi <f.parodi@tiscali.it> 
    2434 *   Stefano Verna <stefano.verna@gmail.com> 
    2535 *   Nils Maier <MaierMan@web.de> 
     
    4555<?xml-stylesheet href="chrome://dta-platform/skin/common.css" type="text/css"?> 
    4656 
    47 <!DOCTYPE window SYSTEM "chrome://dta/locale/about.dtd"> 
    4857<dialog  
    4958        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
     
    7584        </keyset> 
    7685         
    77         <dialogheader id="logo" title="DownThemAll!" description="&about.subtitle;" orient="vertical" style="font-size: smaller;"/> 
     86        <dialogheader id="logo" title="DownThemAll!" description="&about.subtitle;" orient="vertical" style="font-size: smaller;" chromedir="&locale.dir;"/> 
    7887        <groupbox orient="vertical"> 
    7988                <label value="Copyright © 2004-2007 By:" style="font-weight: bold;"/> 
     
    8695          <separator class="thin"/> 
    8796          <description> 
    88                         <html:b>&about.icons;</html:b>&about.based; 
     97                        <html:b>&about.icons;</html:b>&nbsp;&about.based; 
    8998                        <html:ul> 
    9099                                <html:li>© Michael Matas</html:li> 
    91100                                <html:li>© <html:span class="link" onclick="openTab('http://jimmac.musichall.cz/icons.php');">Jakub 'jimmac' Steiner</html:span>; © Novell, Inc.</html:li> 
    92101                                <html:li>© <html:span class="link" onclick="openTab('http://www.famfamfam.com/lab/icons/silk/');">Mark James</html:span> (famfamfam silk icons)</html:li> 
     102                                <html:li>© The mozilla contributors</html:li> 
    93103                        </html:ul> 
    94104                </description> 
  • branches/maierman/searching/chrome/content/common/bindings.xml

    r598 r731  
    6161                                </setter> 
    6262                        </property> 
     63                        <property name="shouldResize"> 
     64                                <getter> 
     65                                        return this.getAttribute('shouldResize') == 'true'; 
     66                                </getter> 
     67                                <setter> 
     68                                        this.setAttribute('shouldResize', val ? 'true' : 'false'); 
     69                                </setter> 
     70                        </property>                      
    6371      <property name="accessibleType" readonly="true"> 
    6472        <getter> 
     
    7482                        <handler event="click"> 
    7583                                this.parentNode.closed = !this.parentNode.closed; 
     84                                if (this.parentNode.shouldResize) { 
     85                                        window.sizeToContent(); 
     86                                } 
    7687                        </handler> 
    7788                </handlers> 
     
    241252                        <field name="_additionalLinks">document.getAnonymousElementByAttribute(this, 'anonid', 'additionallinks');</field> 
    242253                        <field name="_desc">document.getAnonymousElementByAttribute(this, 'anonid', 'desc');</field> 
    243                         <property name="checked" onget="return this._checkbox.checked;"/> 
     254                        <property name="checked" onget="return this._checkbox.checked;"  onset="this._checkbox.checked = !!val; return !!val;"/> 
    244255                </implementation> 
    245256        </binding> 
  • branches/maierman/searching/chrome/content/common/internalFunctions.js

    r592 r731  
    2020 * 
    2121 * Contributor(s): 
    22  *   Federico Parodi 
     22 *   Federico Parodi <f.parodi@tiscali.it> 
    2323 *   Stefano Verna <stefano.verna@gmail.com> 
    2424 *   Nils Maier <MaierMan@web.de> 
     
    4343var Preferences = DTA_preferences; 
    4444 
     45const IOService = Components.classes["@mozilla.org/network/io-service;1"] 
     46        .getService(Components.interfaces.nsIIOService); 
     47 
     48const FileFactory = new Components.Constructor( 
     49        '@mozilla.org/file/local;1', 
     50        'nsILocalFile', 
     51        'initWithPath' 
     52); 
     53 
     54const SoundFactory = new Components.Constructor( 
     55        '@mozilla.org/sound;1', 
     56        'nsISound', 
     57        'play' 
     58); 
     59         
     60         
    4561const SYSTEMSLASH = (DTA_profileFile.get('dummy').path.indexOf('/') != -1) ? '/' : '\\'; 
    4662 
     
    8399                return document.getElementById(arguments[0]); 
    84100        } 
    85         var elements = []; 
    86         for (var i = 0, e = arguments.length; i < e; ++i) { 
    87                 var id = arguments[i]; 
    88                 var element = document.getElementById(id); 
     101        let elements = []; 
     102        for (let i = 0, e = arguments.length; i < e; ++i) { 
     103                let element = document.getElementById(arguments[i]); 
    89104                if (element) { 
    90105                        elements.push(element); 
     
    103118} 
    104119 
    105        // not instanceof save, you know ;) 
     120// not instanceof save, you know ;) 
    106121function clone(obj) { 
    107         { 
    108                 var rv = {}; 
    109                 merge(rv, obj); 
    110                 rv.prototype = this.prototype; 
    111     rv.constructor = this.constructor; 
    112                 return rv; 
    113         } 
     122        var rv = {}; 
     123        merge(rv, obj); 
     124        rv.prototype = this.prototype; 
     125        rv.constructor = this.constructor; 
     126        return rv; 
    114127} 
    115128merge( 
     
    162175                }, 
    163176                getUsableFileName : function() { 
    164                         let t = this.replace(/[#?].*$/g, '') 
     177                        let t = this.replace(/\?.*$/, '') 
    165178                                .normalizeSlashes() 
    166179                                .trim() 
     
    182195                        } 
    183196                        return this; 
     197                }, 
     198                toURI: function(charset, baseURI) { 
     199                        return IOService.newURI(this, charset, baseURI);                         
     200                }, 
     201                toURL: function(charset, baseURI) { 
     202                        return this.toURI(charset, baseURI).QueryInterface(Components.interfaces.nsIURL); 
    184203                } 
    185204        } 
     
    193212         * @return A string containing the user selected path, or false if user cancels the dialog. 
    194213         */ 
     214        FilePicker: Components.Constructor('@mozilla.org/filepicker;1', 'nsIFilePicker', 'init'), 
    195215        askForDir: function (predefined, text) { 
    196216                try { 
    197217                        // nsIFilePicker object 
    198218                        var nsIFilePicker = Components.interfaces.nsIFilePicker; 
    199                         var fp = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker); 
    200                         fp.init(window, text, nsIFilePicker.modeGetFolder); 
     219                        var fp = new Utils.FilePicker(window, text, nsIFilePicker.modeGetFolder); 
    201220                        fp.appendFilters(nsIFilePicker.filterAll); 
    202221                 
     
    225244         */ 
    226245        validateDir: function(path) { 
    227                 var directory = null; 
     246                let directory = null; 
    228247                if (!(path instanceof Components.interfaces.nsILocalFile)) { 
    229248                        if (!path || !String(path).trim().length) { 
    230249                                return false; 
    231250                        } 
    232                         var directory = Components.classes["@mozilla.org/file/local;1"]. 
    233                         createInstance(Components.interfaces.nsILocalFile); 
    234                         try { 
    235                                 directory.initWithPath(path); 
    236                         } 
    237                         catch (ex) { 
    238                                 // 
    239                         } 
     251                        directory = new FileFactory(path); 
    240252                } 
    241253                else { 
    242254                        directory = path.clone(); 
    243255                } 
    244                 if (directory) { 
    245                         try { 
    246                                 // look for the first directory that exists. 
    247                                 var parent = directory.clone(); 
    248                                 while (parent && !parent.exists()) { 
    249                                         parent = parent.parent; 
    250                                 } 
    251                                 if (parent) { 
    252                                         // from nsIFile 
    253                                         parent = parent.QueryInterface(Components.interfaces.nsILocalFile); 
    254                                         // we look for a directory that is writeable and has some diskspace 
    255                                         return parent.isDirectory() && parent.isWritable() && parent.diskSpaceAvailable ? directory : false; 
    256                                 } 
    257                         } 
    258                         catch(ex) { 
    259                                 Debug.dump('Utils.validateDir()', ex); 
    260                         } 
     256                if (!directory) { 
     257                        return false; 
     258                } 
     259                try { 
     260                        // look for the first directory that exists. 
     261                        let parent = directory.clone(); 
     262                        while (parent && !parent.exists()) { 
     263                                parent = parent.parent; 
     264                        } 
     265                        if (parent) { 
     266                                // from nsIFile 
     267                                parent = parent.QueryInterface(Components.interfaces.nsILocalFile); 
     268                                // we look for a directory that is writable and has some disk-space 
     269                                return parent.isDirectory() && parent.isWritable() && parent.diskSpaceAvailable ? directory : false; 
     270                        } 
     271                } 
     272                catch(ex) { 
     273                        Debug.dump('Utils.validateDir()', ex); 
    261274                } 
    262275                return false; 
     
    266279         * Here, because diskSpaceAvailable requires valid path and/or path to be a directory 
    267280         * @param file Valid nsILocalFile 
    268          * @return the diskspace available to the caller 
     281         * @return the disk-space available to the caller 
    269282         * @author Nils 
    270283         */ 
     
    280293        /** 
    281294         * Play a sound file (if prefs allow to do so) 
    282          * @param name Name of the sound (correpsonding to the pref name and the file name of desired sound) 
     295         * @param name Name of the sound (corresponding to the pref name and the file name of desired sound) 
    283296         */ 
    284297        playSound: function(name) { 
    285298                try { 
    286299                        if (Preferences.getDTA("sounds." + name, false)) { 
    287                                 var sound = Components.classes["@mozilla.org/sound;1"] 
    288                                         .createInstance(Ci.nsISound); 
    289                                 var uri = Cc['@mozilla.org/network/standard-url;1'] 
    290                                         .createInstance(Ci.nsIURI); 
    291                                 uri.spec = "chrome://dta/skin/sounds/" + name + ".wav"; 
    292                                 sound.play(uri);  
     300                                new SoundFactory(("chrome://dta/skin/sounds/" + name + ".wav").toURI()); 
    293301                        } 
    294302                } 
     
    379387}; 
    380388 
    381 var _getIcon = function() { 
    382         if (navigator.platform.search(/mac/i) != -1) { 
    383                 const _getIcon_recognizedMac = /\.(?:gz|zip|gif|jpe?g|jpe|mp3|pdf|avi|mpe?g)$/i; 
     389const _getIcon_recognizedMac = /\.(?:gz|zip|gif|jpe?g|jpe|mp3|pdf|avi|mpe?g)$/i; 
     390 
     391function _getIcon() { 
     392        if (/mac/i.test(navigator.platform)) { 
    384393                return function (url, size) { 
    385                         var uri = Components.classes["@mozilla.org/network/standard-url;1"] 
    386                                 .createInstance(Components.interfaces.nsIURI); 
    387                         uri.spec = url; 
    388                         if (uri.path.search(_getIcon_recognizedMac) != -1) { 
     394                        let uri = url.toURI(); 
     395                        if (_getIcon_recognizedMac.test(uri.path)) { 
    389396                                return "moz-icon://" + url + "?size=" + size; 
    390397                        } 
     
    496503 
    497504/** 
    498  * Constructor helper for nsILocalFile 
    499  */ 
    500 const FileFactory = new Components.Constructor( 
    501         "@mozilla.org/file/local;1", 
    502         "nsILocalFile", 
    503         "initWithPath" 
    504 ); 
    505  
    506 /** 
    507505 * XP compatible reveal/launch 
    508506 * @author Nils (derived from DownloadManager code) 
    509507 */ 
    510508var OpenExternal = { 
    511         _io: Components.classes['@mozilla.org/network/io-service;1'] 
    512                 .getService(Components.interfaces.nsIIOService), 
    513509        _proto: Components.classes['@mozilla.org/uriloader/external-protocol-service;1'] 
    514510                .getService(Components.interfaces.nsIExternalProtocolService), 
    515511        _prepare: function(file) { 
     512                if (typeof(file) == 'string' || file instanceof String) { 
     513                        return new FileFactory(file); 
     514                } 
     515                if (file instanceof Components.interfaces.nsIFile) { 
     516                        return file.QueryInterface(Components.interfaces.nsILocalFile); 
     517                } 
    516518                if (file instanceof Components.interfaces.nsILocalFile) { 
    517519                        return file; 
    518520                } 
    519                 else if (typeof(file) == 'string') { 
    520                         return new FileFactory(file); 
    521                 } 
    522521                throw new Components.Exception('OpenExternal: feed me with nsILocalFile or String'); 
    523522        }, 
    524523        _nixLaunch: function(file) { 
    525                 this._proto.loadUrl(this._io.newFileURI(file));         
     524                this._proto.loadUrl(IOService.newFileURI(file));        
    526525        }, 
    527526        /** 
     
    531530        launch: function(file) { 
    532531                file = this._prepare(file); 
     532                if (!file.exists()) { 
     533                        throw new Components.Exception("OpenExternal: file not found!"); 
     534                } 
     535                 
    533536                try { 
    534537                        file.launch(); 
     
    545548        reveal: function(file) { 
    546549                file = this._prepare(file); 
    547                  
    548550                try { 
    549551                        if (!file.exists()) { 
    550                                 file.parent.QueryInterface(Components.interfaces.nsILocalFile).launch(); 
     552                                throw new Components.Exception("File does not exist"); 
    551553                        } 
    552554                        else { 
     
    555557                } 
    556558                catch (ex) { 
    557                         if (file.parent.exists()) { 
    558                                 this._nixLaunch(file.parent); 
    559                         } 
     559                        // try to open the directory instead 
     560                        // (either because the file does not exist anymore 
     561                        // or because the platform does not implement reveal); 
     562                        this.launch(file.parent); 
    560563                } 
    561564        } 
     
    563566 
    564567/** 
    565  * Range generator (python style). Difference: step direction is inialized accordingly if corresponding parameter is omitted. 
     568 * Range generator (python style). Difference: step direction is initialized accordingly if corresponding parameter is omitted. 
    566569 * @param start Optional. Start value (default: 0) 
    567570 * @param stop Stop value (exclusive) 
     
    591594                return; 
    592595        } 
    593         stop += (stop - start) % step; 
    594         for (;start != stop; start += step) { 
     596        stop += -Math.abs(step)/step; 
     597        stop += step - ((stop - start) % step); 
     598        for (; start != stop; start += step) { 
    595599                yield start; 
    596600        } 
     601 
    597602} 
    598603 
  • branches/maierman/searching/chrome/content/common/overlayFunctions.js

    r576 r731  
    2020 * Contributor(s): 
    2121 *   Nils Maier <MaierMan@web.de> 
    22  *   Federico Parodi 
     22 *   Federico Parodi <f.parodi@tiscali.it> 
    2323 *   Stefano Verna <stefano.verna@gmail.com> 
    2424 * 
     
    220220                        } 
    221221                        if (e instanceof Components.Exception) { 
    222                                 if (!e.message) 
    223                                         text += e; 
    224                                 else 
    225                                         text += e.message + " (nsResult=" + e.result + ")"; 
     222                                text += e.toString(); 
    226223                        } else if (e instanceof Error) { 
    227224                                if (!e.message) 
     
    292289function DTA_URL(url, charset, usable, preference) { 
    293290        this.charset = this.str(charset); 
    294         this.usable = this.str(usable); 
    295         this._url = this.str(url); 
     291        this.url = url; 
     292        if (usable) { 
     293                this.usable = this.str(usable); 
     294        } 
    296295        this.preference = preference ? preference : 100; 
    297296 
     
    307306        }, 
    308307        set url(nv) { 
     308                delete this.hash; 
    309309                this._url = this.str(nv); 
     310                var hash = DTA_getLinkPrintHash(this._url); 
     311                if (hash) { 
     312                        this.hash = hash; 
     313                } 
     314                this._url = this._url.replace(/#.*$/, ''); 
    310315                this.usable = ''; 
    311316                this.decode(); 
    312317        }, 
    313318        decode: function DU_decode() { 
    314                 if (!this.usable.length
     319                if (!this.usable
    315320                { 
    316321                        this.usable = DTA_URLhelpers.decodeCharset(this._url, this.charset); 
     
    345350                } 
    346351                var doc = document.commandDispatcher.focusedWindow.document; 
    347                 url = new DTA_URL(url, doc.characterSet); 
     352                 
     353                var ml = DTA_getLinkPrintMetalink(url); 
     354                url = new DTA_URL(ml ? ml : url, doc.characterSet); 
     355                 
    348356                var ref = DTA_AddingFunctions.getRef(doc); 
    349357                this.func(url, ref); 
     
    444452 
    445453        saveSingleLink : function(turbo, url, referrer, description) { 
    446                 var hash = null;                 
    447                 var ml = DTA_getLinkPrintMetalink(url.url); 
    448                 if (ml) { 
    449                         url.url = ml; 
    450                 } 
    451                 else { 
    452                         hash = DTA_getLinkPrintHash(url.url); 
    453                 } 
    454                 url.url = url.url.replace(/#.*$/, ''); 
    455                  
    456454                var item = { 
    457455                        'url': url, 
    458456                        'referrer': referrer, 
    459                         'description': description, 
    460                         'hash': hash 
     457                        'description': description 
    461458                }; 
    462459 
     
    709706        'MD5': 32, 
    710707        'SHA1': 40, 
    711         'SHA256': 64 
    712         /* Currently broken: https://bugzilla.mozilla.org/show_bug.cgi?id=383390 
    713         'sha384': 96, 
    714         'sha512':  128 */ 
     708        'SHA256': 64, 
     709        'SHA384': 96, 
     710        'SHA512':  128 
    715711}; 
    716712function DTA_Hash(hash, type) { 
     
    732728        } 
    733729} 
     730DTA_Hash.prototype = { 
     731        toString: function() { 
     732                return this.type + " [" + this.sum + "]"; 
     733        } 
     734}; 
    734735 
    735736/** 
  • branches/maierman/searching/chrome/content/dta/addurl.js

    r594 r731  
    5151        this.mask = Dialog.ddRenaming.value; 
    5252        this.dirSave = Dialog.ddDirectory.value; 
    53         this.hash = hash; 
     53        if (hash) { 
     54                this.url.hash = hash; 
     55        } 
    5456} 
    5557 
    5658function Literal(str) { 
    5759        this.str = str; 
     60        this.first = this.last = this.str; 
    5861        this.length = 1; 
    5962} 
     
    6669        } 
    6770}; 
    68 function NumericRange(name, start, stop, step, strl) { 
    69         this.name = name; 
    70         this.start = start; 
    71         this.stop = stop + (start > stop ? -1 : 1); 
    72         this.step = step; 
    73         this.length = Math.floor((stop - start) / step + 1); 
    74         this.strl = strl; 
    75 }; 
    76 NumericRange.prototype = { 
    77         _format: function(i) { 
    78                 var rv = String(Math.abs(i)); 
    79                 while (rv.length < this.strl) { 
    80                         rv = '0' + rv; 
    81                 } 
    82                 if (i < 0) { 
    83                         rv = '-' + rv; 
    84                 } 
    85                 return rv; 
     71 
     72function Range() { 
     73}; 
     74Range.prototype = { 
     75        init: function(name, start, stop, step) { 
     76                stop += -Math.abs(step)/step; 
     77                stop += step - ((stop - start) % step); 
     78                 
     79                this.name = name; 
     80                this.start = start; 
     81                this.stop = stop; 
     82                this.step = step; 
     83                this.length = Math.floor((stop - start) / step); 
     84                this.first = this._format(this.start); 
     85                this.last = this._format(this.stop - this.step); 
    8686        }, 
    8787        join: function(str) { 
     
    9191        } 
    9292}; 
     93 
     94function NumericRange(name, start, stop, step, strl) { 
     95        this._format = function(val) { 
     96                let rv = String(Math.abs(val)); 
     97                while (rv.length < this.strl) { 
     98                        rv = '0' + rv; 
     99                } 
     100                if (val < 0) { 
     101                        return '-' + rv; 
     102                } 
     103                return rv; 
     104        }; 
     105        this.strl = strl; 
     106         
     107        this.init(name, start, stop + (step > 0 ? 1 : -1), step); 
     108}; 
     109NumericRange.prototype = Range.prototype; 
    93110function CharRange(name, start, stop, step) { 
    94         this.name = name; 
    95         this.start = start; 
    96         this.stop = stop + (start > stop ? -1 : 1); 
    97         this.step = step; 
    98         this.length = Math.floor((stop - start) / step + 1); 
    99 };       
    100 CharRange.prototype = { 
    101         join: function(str) { 
    102                 for (let i in range(this.start, this.stop, this.step)) { 
    103                         yield str + String.fromCharCode(i); 
    104                 } 
    105         } 
    106 
     111        this._format = String.fromCharCode; 
     112 
     113        this.init(name, start, stop + (step > 0 ? 1 : -1), step); 
     114}; 
     115CharRange.prototype = Range.prototype; 
     116 
    107117function BatchGenerator(link) { 
    108118        if (!(link instanceof DTA_URL)) { 
     
    119129                        url = url.slice(i); 
    120130                } 
    121                 var m; 
     131                let m; 
    122132                if ((m = url.match(/^\[(-?\d+):(-?\d+)(?::(-?\d+))?\]/))) { 
    123133                        url = url.slice(m[0].length); 
    124134                        try { 
    125                                 var start = new Number(m[1]); 
    126                                 var stop = new Number(m[2]); 
    127                                 var step = stop > start ? 1 : -1; 
     135                                let start = new Number(m[1]); 
     136                                let stop = new Number(m[2]); 
     137                                let step = stop > start ? 1 : -1; 
    128138                                if (m.length > 3 && typeof(m[3]) != 'undefined') { 
    129139                                        step = new Number(m[3]); 
     
    142152                        } 
    143153                        catch (ex) { 
     154                                Debug.dump(ex); 
    144155                                this._pats.push(new Literal(m[0])); 
    145156                        } 
     
    150161                        url = url.slice(m[0].length); 
    151162                        try { 
    152                                 var start = m[1].charCodeAt(0); 
    153                                 var stop = m[2].charCodeAt(0); 
    154                                 var step = stop > start ? 1 : -1; 
     163                                let start = m[1].charCodeAt(0); 
     164                                let stop = m[2].charCodeAt(0); 
     165                                let step = stop > start ? 1 : -1; 
    155166                                if (m.length > 3 && typeof(m[3]) != 'undefined') { 
    156167                                        step = new Number(m[3]); 
     
    164175                        } 
    165176                        catch (ex) { 
     177                                Debug.dump(ex); 
    166178                                this._pats.push(new Literal(m[0])); 
    167179                        } 
    168180                        continue; 
    169                 } 
    170                 if ((m = url.match(/\[.*?\]/))) { 
    171                         url = url.slice(m[0].length); 
    172                         this._pats.push(new Literal(m[0])); 
    173181                } 
    174182        } 
     
    224232                return this._pats.map( 
    225233                        function(p) { 
    226                                 if (!(p instanceof Literal)) { 
    227                                         return p.start; 
    228