1var Url = { 2 prefixes: {}, 3 4 init: function(prefixes){ 5 this.prefixes = prefixes; 6 }, 7 8 clean: function(prefixe, url, parameters = {}){ 9 return this.generate(prefixe, url, parameters) 10 }, 11 12 action: function(prefixe, action, etape = '', parameters = {}){ 13 parameters['Action'] = action; 14 if (etape !== '') { 15 parameters['Etape'] = etape; 16 } 17 return this.generate(prefixe, '', parameters) 18 }, 19 20 generate: function(prefixe, url, parameters){ 21 22 if (this.prefixes.hasOwnProperty(prefixe)) { 23 url = url ? url : '/index.php'; 24 return this.make(this.prefixes[prefixe] + url, parameters); 25 } else { 26 return null; 27 } 28 }, 29 30 make: function(url, parameters){ 31 if (parameters) { 32 url += '?'; 33 for (parameter in parameters) { 34 url += parameter + '=' + parameters[parameter] + '&'; 35 } 36 url = url.slice(0, -1); 37 } 38 return url; 39 } 40};
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.