PageSourceSearch

https://mxm999mx.com/static/js/mxm999mxcom_language.js

js mxm999mx.com collected 2026-10-07 21:32:02 UTC 6,634 bytes, 1 lines download raw bytes

1(function(){if(window['__LANG_SWITCHER_LOADED__'])return;window['__LANG_SWITCHER_LOADED__']=!![];class LanguageSwitcher{constructor(){this['languages']={'mx':{'code':'mx','name':'Mexico','flag':'🇲🇽','path':'/','message':'Language\x20Mexico\x20is\x20not\x20available\x20for\x20this\x20page\x20yet.'}},this['currentLanguage']=this['detectCurrentLanguage'](),this['init']();}['detectCurrentLanguage'](){const a=window['location']['pathname']||'/';return'mx';}['getCurrentPageName'](){const a=window['location']['pathname']||'/',b=a['split']('/')['pop']();if(!b||b===''||!b['includes']('.'))return'index.html';return b;}['getTargetPageName'](){const a=this['getCurrentPageName']();if(a['toLowerCase']()==='countries.html')return'index.html';return a;}['buildTargetUrl'](a){const b=this['getTargetPageName'](),c=this['languages'][a];if(!c)return window['location']['href'];const d=window['location']['protocol']==='file:';if(d){const f=this['currentLanguage']==='mx',g=a==='mx';if(g)return f?b:'../'+b;if(f)return a+'/'+b;return this['currentLanguage']===a?b:'../'+a+'/'+b;}const e=window['location']['origin'];if(c['path']==='/')return e+'/'+b;return''+e+c['path']+b;}async['checkPageExists'](a){try{const b=await fetch(a,{'method':'HEAD'});return b['ok'];}catch(c){return![];}}['showDevelopmentAlert'](a){const b=this['languages'][a]||{'name':a,'flag':'🌐','message':'Unavailable'},c=b['message']||'This\x20language\x20is\x20unavailable\x20now.',d=document['createElement']('div');d['style']['cssText']='position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;padding:20px;border-radius:12px;box-shadow:0\x2010px\x2025px\x20rgba(0,0,0,0.2);z-index:10001;max-width:400px;text-align:center;font-family:Arial,sans-serif;',d['innerHTML']='<div\x20style=\x22font-size:36px;margin-bottom:12px;\x22>'+b['flag']+'</div><h3\x20style=\x22margin:0\x200\x2010px\x200;color:#374151;font-size:18px;\x22>'+b['name']+'</h3><p\x20style=\x22margin:0\x200\x2014px\x200;color:#6b7280;line-height:1.5;\x22>'+c+'</p><button\x20id=\x22lang-alert-close\x22\x20style=\x22background:#7C3AED;color:#fff;border:none;padding:8px\x2018px;border-radius:6px;cursor:pointer;\x22>OK</button>';const e=document['createElement']('div');e['style']['cssText']='position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:10000;',document['body']['appendChild'](e),document['body']['appendChild'](d);const f=()=>{if(e['parentNode'])e['parentNode']['removeChild'](e);if(d['parentNode'])d['parentNode']['removeChild'](d);},g=document['getElementById']('lang-alert-close');g&&g['addEventListener']('click',f),e['addEventListener']('click',f);}async['switchLanguage'](a){if(a===this['currentLanguage'])return;const b=this['buildTargetUrl'](a),c=await this['checkPageExists'](b);if(!c){this['showDevelopmentAlert'](a);return;}try{localStorage['setItem']('preferredLanguage',a);}catch(d){}window['location']['href']=b;}['createLanguageSwitcher'](){const a=document['createElement']('div');a['className']='language-bottom-panel',a['style']['cssText']='position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px\x20solid\x20#e5e7eb;border-radius:16px\x2016px\x200\x200;box-shadow:0\x20-4px\x2020px\x20rgba(0,0,0,0.15);z-index:10000;transform:translateY(100%);transition:transform\x20.3s\x20ease;max-height:50vh;overflow-y:auto;';const b=document['createElement']('div');b['style']['cssText']='padding:12px\x2016px;border-bottom:1px\x20solid\x20#f3f4f6;display:flex;justify-content:space-between;align-items:center;',b['innerHTML']='<h3\x20style=\x22margin:0;font-size:16px;font-weight:600;color:#374151;\x22>Select\x20Language</h3>';const c=document['createElement']('button');c['innerHTML']='✕',c['style']['cssText']='background:none;border:none;font-size:18px;color:#6b7280;cursor:pointer;padding:4px;border-radius:4px;',b['appendChild'](c);const d=document['createElement']('div');d['style']['cssText']='padding:8px\x200\x2020px;',Object['values'](this['languages'])['forEach'](g=>{const h=document['createElement']('button'),i=g['code']===this['currentLanguage'];h['innerHTML']='<div\x20style=\x22display:flex;align-items:center;gap:10px;\x22><span\x20style=\x22font-size:22px;\x22>'+g['flag']+'</span><span\x20style=\x22font-size:15px;color:#111827;font-weight:'+(i?'600':'400')+';\x22>'+g['name']+'</span>'+(i?'<span\x20style=\x22margin-left:auto;color:#7C3AED;font-size:16px;\x22>✓</span>
1':'')+'</div>',h['style']['cssText']='width:100%;padding:14px\x2018px;border:none;background:'+(i?'#f8fafc':'transparent')+';text-align:left;cursor:pointer;border-left:'+(i?'4px\x20solid\x20#7C3AED':'4px\x20solid\x20transparent')+';',h['addEventListener']('click',j=>{j['preventDefault'](),j['stopPropagation']();if(!i)this['switchLanguage'](g['code']);}),d['appendChild'](h);}),a['appendChild'](b),a['appendChild'](d);const e=document['createElement']('div');e['className']='language-overlay',e['style']['cssText']='position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:9999;opacity:0;visibility:hidden;transition:all\x20.3s\x20ease;';const f=()=>{e['style']['opacity']='0',e['style']['visibility']='hidden',a['style']['transform']='translateY(100%)',document['body']['style']['overflow']='';};return c['addEventListener']('click',f),e['addEventListener']('click',f),document['body']['appendChild'](e),document['body']['appendChild'](a),{'overlay':e,'panel':a};}['init'](){const a=this['createLanguageSwitcher']();this['overlay']=a['overlay'],this['bottomPanel']=a['panel'];}['showLanguagePanel'](){if(!this['bottomPanel']||!this['overlay'])return;this['overlay']['style']['opacity']='1',this['overlay']['style']['visibility']='visible',this['bottomPanel']['style']['transform']='translateY(0)',document['body']['style']['overflow']='hidden';}['hideLanguagePanel'](){if(!this['bottomPanel']||!this['overlay'])return;this['overlay']['style']['opacity']='0',this['overlay']['style']['visibility']='hidden',this['bottomPanel']['style']['transform']='translateY(100%)',document['body']['style']['overflow']='';}['getCurrentLanguage'](){return this['languages'][this['currentLanguage']];}}window['languageSwitcher']=new LanguageSwitcher(),window['switchLanguage']=function(a){if(window['languageSwitcher'])window['languageSwitcher']['switchLanguage'](a);},window['getCurrentLanguage']=function(){if(window['languageSwitcher'])return window['languageSwitcher']['getCurrentLanguage']();return null;},window['showLanguagePanel']=function(){if(window['languageSwitcher'])window['languageSwitcher']['showLanguagePanel']();},window['hideLanguagePanel']=function(){if(window['languageSwitcher'])window['languageSwitcher']['hideLanguagePanel']();};}());

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.