1(async function() { 2 3 const queryString = window.location.search; 4 const urlParams = new URLSearchParams(queryString); 5 6 function passOtherParams(baseUrl, params = []) { 7 8 let url = new URL('https://' + location.hostname + baseUrl); 9 let getParams = new URLSearchParams(url.search); 10 11 for (let param of params) { 12 if (urlParams.get(param) !== null) { 13 getParams.append(param, urlParams.get(param)); 14 } 15 } 16 17 url.search = getParams; 18 return url; 19 20 } 21 22 function passAllParams(baseUrl) { 23 24 let url = new URL('https://' + location.hostname + baseUrl); 25 let getParams = new URLSearchParams(url.search); 26 console.log(url); 27 28 const entries = urlParams.entries(); 29 for (let entry of entries) { 30 if (entry[0] === 't') continue; 31 getParams.append(entry[0], entry[1]); 32 } 33 34 url.search = getParams; 35 console.log(url); 36 return url; 37 38 } 39 40 const redirects = { 41 'sammlung': () => location.replace(passOtherParams("/collection/" + urlParams.get('gesusa'), ['extern', 'exWho', 'suinin', 'suinsa', 'recordlang'])), 42 'institution': () => location.replace(passOtherParams("/institution/" + urlParams.get('instnr'), ['extern', 'exWho', 'suinin', 'suinsa', 'recordlang'])), 43 'people': () => location.replace(passOtherParams("/people/" + urlParams.get('id'), ['extern', 'exWho', 'suinin', 'suinsa'])), 44 'serie': () => location.replace(passOtherParams("/series/" + urlParams.get('serges'), ['extern', 'exWho', 'suinin', 'suinsa'])), 45 'objekt': () => location.replace(passOtherParams("/object/" + urlParams.get('oges'), ['extern', 'exWho', 'suinin', 'suinsa', 'recordlang', 'versioning', 'prev'])), 46 'listen': () => location.replace(passAllParams("/objects")), 47 }; 48 49 console.log("hi"); 50 console.log(urlParams); 51 const t = urlParams.get('t'); 52 if (t !== null) { 53 (redirects[t])(); 54 } 55 56})();
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.