1(function(window) { 2 yomvi.addPackage('yomvi.device', function() { 3 yomvi.cons.NAVIGATOR = window.YOMVI_NAVIGATOR; 4 yomvi.cons.OS = window.YOMVI_OS; 5 6 var tipoDispositivo = 'PC'; 7 var yomviNavigator = null; 8 9 var getTipoDispositivo = window.YomviGetTipoDispositivo; 10 11 this.init = function(){ 12 tipoDispositivo = getTipoDispositivo(); 13 }; 14 15 this.tipo = function() { 16 return tipoDispositivo; 17 }; 18 19 20 this.showBannerGooglePlay = function() { 21 if (document.body.classList.contains("noAddApp")) { 22 return false; 23 } 24 $.when( 25 yomvi.loadPackage('google_play') 26 ) 27 .done(function(){ 28 var google_play_tpl = yomvi.util.parseTpl('google_play', { 29 url: yomvi.system.urls.getUrlConf('yomvi_googleplay_web') 30 }); 31 $('.menu-superior').before(google_play_tpl); 32 var capa_google_play = $('#capa_google_play'); 33 capa_google_play.on('click', '.closeModal',function(e) { 34 capa_google_play.hide(); 35 }); 36 }); 37 }; 38 39 this.mostrarErrorDispositivo = function(tipo) { 40 var txt_msg = 'ERROR_DISPOSITIVO'; 41 var txt_url= '#'; 42 var txt_cabecera = 'INFORMACIÃN'; 43 var url = false; 44 switch (tipo) { 45 case 'ipad': 46 case 'iphone': 47 txt_msg = 'ERROR_DISPOSITIVO_STORE'; 48 txt_url = 'STORE_IOS'; 49 src = '/img/dis-app-store.png'; 50 url = yomvi.system.urls.getUrlConf('yomvi_appstore'); 51 break; 52 case 'android': 53 txt_msg = 'ERROR_DISPOSITIVO_STORE'; 54 txt_url = 'STORE_ANDROID'; 55 src = '/img/google-play-logo.png'; 56 url = yomvi.system.urls.getUrlConf('yomvi_googleplay_web'); 57 //url_app = yomvi.system.urls.getUrlConf('yomvi_googleplay_app'); 58 break; 59 case 'smarttvLG': 60 txt_msg = 'ERROR_DISPOSITIVO_STORE'; 61 txt_url = 'STORE_LG'; 62 src = '/img/tele.png'; 63 //url = yomvi.system.urls.getUrlConf('yomvi_googleplay_web'); 64 break; 65 case 'smarttvSAMSUNG': 66 txt_msg = 'ERROR_DISPOSITIVO_STORE'; 67 txt_url = 'STORE_SAMSUNG'; 68 src = '/img/tele.png'; 69 //url = yomvi.system.urls.getUrlConf('yomvi_googleplay_web'); 70 break; 71 case 'chromecast': 72 txt_msg = 'ERROR_DISPOSITIVO_STORE'; 73 txt_url = 'STORE_GENERICO'; 74 //src = '/img/tele.png'; 75 //url = yomvi.system.urls.getUrlConf('yomvi_googleplay_web'); 76 break; 77 default: 78 break; 79 } 80 yomvi.struct.showPopup('popup_error_dispositivo', jQuery.extend(true, { 81 cabecera: txt_cabecera, 82 msg: yomvi.txt(txt_msg) + yomvi.txt(txt_url), 83 src: src, 84 url: url, 85 botones: { 86 'a.tiendaYomvi': function() { 87 if (url) { 88 yomvi.struct.showModalSpinner(); 89 yomvi.struct.redirectTo(url); 90 yomvi.struct.closePopup(); 91 } 92 }, 93 '.closeModal': yomvi.struct.closePopup 94 // '#error_btn': yomvi.struct.closePopup 95 } 96 }, {}) 97 ); 98 }; 99 100 this.getNavigator = function() { 101 if (this.yomviNavigator) return this.yomviNavigator; 102 this.yomviNavigator = window.YomviGetNavigator(); 103 return this.yomviNavigator; 104 }; 105 106 this.getBrowserName = function() { 107 var _navigator = window.YomviGetNavigator(); 108 var _object = YOMVI_NAVIGATOR; 109 return Object.keys(_object).find(_key => _object[_key] === _navigator); 110 }; 111 112 this.getOSName = function() { 113 var _os = window.YomviGetOS(); 114 var _object = YOMVI_OS_NAME; 115 return Object.keys(_object).find(_key => _object[_key] === _os); 116 }; 117 118 this.getVersionOs = function() { 119 var getversion = window.getOSVersion().os.version || 'default'; 120 return yomvi.device.getOSName() + "_y_" + getversion; 121 } 122 123 this.getArchitecture = window.YomviGetArchitecture; 124 this.getOS = window.YomviGetOS; 125 126 yomvi.dispositivo = yomvi.device; 127 128 }); 129})(window);
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.