1var MP = { 2 Version: '3.1.1.0', 3 SrcLang: 'en', 4 UrlLang: 'mp_js_current_lang', 5 SrcUrl: decodeURIComponent('mp_js_orgin_url'), 6 oSite: decodeURIComponent('mp_js_origin_baseUrl'), 7 tSite: decodeURIComponent('mp_js_translated_baseUrl'), 8 init: function () { 9 if (MP.oSite.indexOf('p_js_') === 1) { 10 MP.SrcUrl = window.top.document.location.href; 11 MP.oSite = MP.tSite = window.top.document.location.host; 12 MP.UrlLang = MP.SrcLang; 13 } 14 }, 15 switchLanguage: function (url, pref, sync) { 16 var oSite = MP.oSite.replace('http://', '').replace('https://', '').replace(/\/?$/, ''); 17 var tSite = MP.tSite.replace('http://', '').replace('https://', '').replace(/\/?$/, ''); 18 url = url.replace('http://', '').replace('https://', '').replace(/\/?$/, ''); 19 if (sync && typeof MpStorage !== 'undefined' && typeof MpStorage.updatePref !== 'undefined') { 20 if (pref) { 21 var lang = pref.substring(0, 2); 22 pref = lang === MP.UrlLang ? MP.SrcLang + pref.substring(2) : pref; 23 } 24 MpStorage.updatePref(url, pref); 25 } 26 setTimeout(function () { 27 var script = document.createElement('SCRIPT'); 28 if (url === oSite) { 29 script.src = location.protocol + '//' + tSite + '?1023749634;' + encodeURIComponent(location.href); 30 } else { 31 script.src = location.protocol + '//' + url + '?1023749632;' + encodeURIComponent(MP.SrcUrl); 32 } 33 var target = document.getElementsByTagName('script')[0]; 34 target.parentNode.insertBefore(script, target); 35 }, 500); 36 return false; 37 }, 38 switchToLang: function (url) { 39 if (window.top.location.href === url) { 40 if (typeof MpStorage !== 'undefined' && typeof MpStorage.updatePref !== 'undefined') 41 MpStorage.updatePref(MP.oSite, MP.SrcLang); 42 } else { 43 window.top.location.href = url; 44 } 45 } 46};
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.