if(!window.loaded_modss) { //show Date.now||(Date.now=function(){return(new Date.getTime())}),function(){"use strict";for(var t=["webkit","moz"],e=0;el-(this.size+6)&&this.reset(),this.element.style.top=this.y+"px",this.element.style.left=this.x+"px",this.step+=this.stepSize,y===!1?this.x+=Math.cos(this.step):this.x+=y+Math.cos(this.step),i.collection&&this.x>this.target.x&&this.xthis.target.y&&this.ythis.target.height)if(s+this.speed+this.size>this.target.height){for(;s+this.speed+this.size>this.target.height&&this.speed>0;)this.speed*=.5;t.fillStyle=o.flakeColor,void 0==n[parseInt(e)][parseInt(s+this.speed+this.size)]?(n[parseInt(e)][parseInt(s+this.speed+this.size)]=1,t.fillRect(e,s+this.speed+this.size,this.size,this.size)):(n[parseInt(e)][parseInt(s+this.speed)]=1,t.fillRect(e,s+this.speed,this.size,this.size)),this.reset()}else this.speed=1,this.stepSize=0,parseInt(e)+10&&void 0==n[parseInt(e)-1][parseInt(s)+1]?this.x--:(t.fillStyle=o.flakeColor,t.fillRect(e,s,this.size,this.size),n[parseInt(e)][parseInt(s)]=1,this.reset())}(this.x+this.size>d-c||this.x",{"class":"snowfall-canvas"}),z=[];if(u.top-g>0){t("body").append(x),x.css({position:i.flakePosition,left:u.left+"px",top:u.top-g+"px"}).prop({width:u.width,height:g});for(var v=0;v 800) buf.shift(); } catch (eCap) { } }; window.__modssEnsureConsoleCapture = function () { try { if (!Array.isArray(window.__modssConsoleBuf)) window.__modssConsoleBuf = []; var methods = ['log', 'info', 'warn', 'error', 'debug']; for (var i = 0; i < methods.length; i++) { (function (method) { /** try на каждый метод: на части WebView console.* только для чтения — * раньше падение на первом методе снимало перехват целиком. */ try { var cur = console[method]; if (typeof cur !== 'function' || cur.__modssCap) return; var orig = cur; var wrapped = function () { try { if (typeof window.__modssConsoleOnCall === 'function') window.__modssConsoleOnCall(method, arguments); } catch (e1) { } try { return orig.apply(console, arguments); } catch (e2) { } }; wrapped.__modssCap = 1; console[method] = wrapped; if (console[method] !== wrapped) { Object.defineProperty(console, method, { value: wrapped, configurable: true, writable: true }); } } catch (eM) { window.__modssConsoleCaptureError = String((eM && eM.message) || eM).slice(0, 200); } })(methods[i]); } window.__modssConsoleCapture = !!(typeof console.log === 'function' && console.log.__modssCap); } catch (eEns) { window.__modssConsoleCaptureError = String((eEns && eEns.message) || eEns).slice(0, 200); } }; window.__modssEnsureConsoleCapture(); setInterval(window.__modssEnsureConsoleCapture, 1000); } catch (eBootCap) { } var pluginSetup = { urlKey: function (url) { return String(url == null ? '' : url).trim().toLowerCase().replace(/^https?:\/\//, '').replace(/\/+$/, ''); }, accountPluginKeys: function (done) { Lampa.Account.Api.plugins(function (items) { var keys = []; for (var i = 0; i < (items || []).length; i++) { var key = Number(items[i].status) === 1 ? pluginSetup.urlKey(items[i].url) : ''; if (key) keys.push(key); } done(keys); }); }, detectShell: function () { var ua = String(navigator.userAgent || '').toLowerCase(); if (typeof webapis !== 'undefined' && typeof tizen !== 'undefined') return 'tizen'; if (typeof webOS !== 'undefined' && webOS.platform && webOS.platform.tv === true) return 'webos'; if (window.TVXHost || window.TVXManager) return 'msx'; if (ua.indexOf('tizen') !== -1 || ua.indexOf('webos') !== -1 || ua.indexOf('web0s') !== -1) return 'msx'; if (Lampa.Platform.is('apple_tv')) return 'apple_tv'; if (Lampa.Utils.isPWA && Lampa.Utils.isPWA()) return 'pwa'; return ''; }, baseDeviceId: function (value) { return String(value == null ? '' : value).trim().replace(/_(?:pwa|msx|apple_tv|tizen|webos)$/, ''); }, taggedDeviceId: function (value) { var base = pluginSetup.baseDeviceId(value); var shell = pluginSetup.detectShell(); return base && shell ? base + '_' + shell : base; }, saveDeviceId: function (value) { var deviceId = pluginSetup.taggedDeviceId(value); if (deviceId && deviceId !== Lampa.Storage.get('modss_device_id', '')) { Lampa.Storage.set('modss_device_id', deviceId); } return deviceId; }, resolveDeviceId: function (issuedId) { var cached = Lampa.Storage.get('modss_device_id', ''); return cached ? pluginSetup.saveDeviceId(cached) : pluginSetup.taggedDeviceId(issuedId); }, syncDeviceId: function (issuedId, onReady) { var attempts = 0; var tick = function () { var cached = Lampa.Storage.get('modss_device_id', ''); if ((!cached || !pluginSetup.detectShell()) && attempts++ < 15) return setTimeout(tick, 100); if (typeof onReady === 'function') onReady(pluginSetup.saveDeviceId(cached || issuedId)); }; tick(); }, shell: function () { return pluginSetup.detectShell() || Lampa.Platform.get(); }, deviceKind: function (base) { var kind = String(base || 'other'); var shell = pluginSetup.shell(); if (!shell || kind.indexOf('_') !== -1) return kind; return kind + '_' + shell; }, logDevice: function (base, issuedId, onChange) { pluginSetup.syncDeviceId(issuedId, function (deviceId) { if (deviceId && typeof onChange === 'function') onChange(deviceId); console.log('Modss', 'device', '[' + pluginSetup.deviceKind(base) + ']'); }); }, cleanPluginList: function (liveUrls, deadUrls) { pluginSetup.accountPluginKeys(function (accountKeys) { pluginSetup.applyPluginList(liveUrls, deadUrls, accountKeys); }); }, applyPluginList: function (liveUrls, deadUrls, accountKeys) { try { var plugins = Lampa.Plugins.get(); var accountHasLive = false; var remove = []; var live = []; var changed = false; for (var a = 0; a < liveUrls.length; a++) { if (accountKeys.indexOf(liveUrls[a]) !== -1) accountHasLive = true; } for (var i = 0; i < plugins.length; i++) { var plugin = plugins[i]; var key = pluginSetup.urlKey(plugin.url); if (deadUrls.indexOf(key) !== -1) { remove.push({ plugin: plugin, reason: 'dead' }); continue; } if (liveUrls.indexOf(key) === -1) continue; if (accountHasLive) remove.push({ plugin: plugin, reason: 'cub' }); else live.push({ plugin: plugin, key: key }); } var keep = null; for (var k = 0; k < live.length; k++) { if (keep === null || liveUrls.indexOf(live[k].key) < liveUrls.indexOf(keep.key)) keep = live[k]; } for (var d = 0; d < live.length; d++) { if (live[d] !== keep) remove.push({ plugin: live[d].plugin, reason: 'dup' }); } if (keep && String(keep.plugin.descr || '').trim() !== '') { keep.plugin.descr = ''; keep.plugin.name = "MODS's"; changed = true; } for (var r = 0; r < remove.length; r++) { if (!keep && !accountHasLive && r === 0) { keep = { plugin: remove[r].plugin, key: liveUrls[0] }; keep.plugin.url = (window.location.protocol === 'https:' ? 'https://' : 'http://') + liveUrls[0]; changed = true; console.log('Modss', 'plugin url', 'moved to ' + keep.plugin.url); continue; } console.log('Modss', 'plugin url', 'removed [' + remove[r].reason + '] ' + remove[r].plugin.url); Lampa.Plugins.remove(remove[r].plugin); } if (changed) Lampa.Plugins.save(); } catch (eClean) { console.error('Modss', 'plugin url', 'clean error', eClean && eClean.message ? eClean.message : String(eClean)); } } }; var Protocol = function Protocol() { return window.location.protocol == 'https:' ? 'https://' : 'http://'; } var TRASH_R = ['$$$####!!!!!!!', '^^^^^^##@', '@!^^!@#@@$$$$$', '^^#@@!!@#!$', '@#!@@@##$$@@']; var version_modss = '3.4.4', API = Protocol() + 'api.lampa.stream/', type = '', jackets = {}, cards, ping_auth, manifest, menu_list = [], vip = false, leftVipD = '', user_id = '', uid = '9f1c933cf85ae1ac7df7f332c_9d8ef5d9e88eb7c443bd2751', IP, logged = undefined, cashe = encodeURIComponent(Lampa.Base64.encode(window.location.origin)); var device_id = pluginSetup.resolveDeviceId('b546aae137ce4d0421cccb77ff745878'); var urls = [ Protocol() + 'lampa.stream/modss', Protocol() + 'modss.tv' ]; console.log('Modss', 'protocol:', Protocol()); console.log('Modss', 'origin', window.location.origin); console.log('Modss', 'plugin', '[VERSION] ' + version_modss); pluginSetup.logDevice("other", device_id, function (next) { device_id = next; if (requestData) requestData.device_id = next; }); console.log('Modss', 'init', 'LOADED - RU [85.234.8.237] - [GET] ' + urls[0]); window.loaded_modss = true; var network = new Lampa.Reguest(); var currentUrlIndex = 0; var loadErrors = []; var requestData = { user_id: user_id, uid: uid, ips: '85.234.8.237', cas: cashe, cache: false, id: '', or: 'dW5kZWZpbmVk', auth: logged, device_id: device_id }; function tryNextUrl() { if (currentUrlIndex >= urls.length) { var statusCodes = loadErrors.map(function(e) { return String(e.status != null ? e.status : '?'); }).join(', '); console.log('Modss', 'init', 'RU [85.234.8.237] - все URL недоступны. Статусы ответов:', statusCodes, loadErrors); Lampa.Noty.show('RU [85.234.8.237] - MODSs ОШИБКА ЗАГРУЗКИ ПЛАГИНА -> все серверы недоступны.
Статусы: ' + (statusCodes || '—') + '
Lampa: ' + window.location.origin, {time: 10000}); window.loaded_modss = false; return; } var currentUrl = urls[currentUrlIndex]; var attemptNumber = currentUrlIndex + 1; console.log('Modss', 'init', '[POST] Попытка ' + attemptNumber + '/' + urls.length + ' - загрузки:', currentUrl); if(attemptNumber > 1) Lampa.Noty.show('Modss - init [POST] Попытка ' + attemptNumber + '/' + urls.length + ' - загрузки: ' + currentUrl, {time: 6000}); network.timeout(10000); network.silent(currentUrl, function(json) { try { console.log('Modss', 'push', 'START - ' + currentUrl); eval(json + '//# sourceURL='+window.location.origin+'/plugin_modss.js'); window.loaded_modss = true; } catch (error) { Lampa.Noty.show('MODSs ОШИБКА ЗАГРУЗКИ -> ' + error.message); console.log('Modss', 'init', 'ERROR - ' + currentUrl, error.message); console.error('Ошибка выполнения кода:', error); currentUrlIndex++; tryNextUrl(); } }, function(a, c) { var errMsg = network.errorDecode(a, c); var statusNum = typeof a === 'number' ? a : (a && (a.status !== undefined ? a.status : (a.statusCode !== undefined ? a.statusCode : null))); if (statusNum === undefined || statusNum === null) statusNum = '?'; loadErrors.push({ url: currentUrl, status: statusNum, message: errMsg || '' }); console.log('Modss', 'init', 'RU [85.234.8.237] - load get plugin error - [POST] ' + currentUrl, 'status:', statusNum, errMsg); if (statusNum === 444 || statusNum === 403) { console.error('Modss', 'init', 'ERROR - BLOCKED (status ' + statusNum + ')'); Lampa.Noty.show('MODSs BLOCKED — ' + (errMsg || statusNum), {time: 8000}); window.loaded_modss = false; return; } currentUrlIndex++; tryNextUrl(); }, requestData, { dataType: 'text' }); } tryNextUrl(); })(); }