From b307c3e435d5c1a8243fd2c936fa519e03e1ccbd Mon Sep 17 00:00:00 2001 From: lemax10 Date: Sat, 25 Oct 2025 04:15:59 -0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20plugins/tmdb-proxy.min.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/tmdb-proxy.min.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 plugins/tmdb-proxy.min.js diff --git a/plugins/tmdb-proxy.min.js b/plugins/tmdb-proxy.min.js new file mode 100644 index 0000000..f2583fb --- /dev/null +++ b/plugins/tmdb-proxy.min.js @@ -0,0 +1 @@ +!function(){"use strict";let t="cubnotrip.top",e=[{url:`https://${t}/api/checker`,name:t}],n={name:"TMDB Proxy by Skaz (Mod. LeMaX)",version:"1.0.5",description:"Проксирование постеров и API сайта TMDB (Optimized )",pathImage:`imagetmdb.${t}/`,pathApi:`apitmdb.${t}/3/`},o=!1;function i(t){let e=t.slice(0,8),n=t.slice(8).replace(/\/\+/g,"/");return e+n}function r(t){let e=function t(){try{let e=Lampa.Storage.get("account","{}");return("string"==typeof e?JSON.parse(e):e).email||""}catch(n){return""}}();return e?Lampa.Utils.addUrlComponent(t,`email=${encodeURIComponent(e)}`):t}1===Lampa.Storage.get("cub_domain_skaz")&&function t(){if(o)return;let n=0;!function t(){if(n>=e.length)return;let i=e[n],r=new XMLHttpRequest;r.open("GET",i.url,!0),r.timeout=5e3,r.onload=function(){if(200===r.status)try{let e=r.responseText;if("ok"===e){localStorage.setItem("cub_domain",i.name),o=!0;return}}catch(a){console.warn("API check error:",a)}n++,t()},r.onerror=r.ontimeout=function(){n++,t()},r.send()}()}(),Lampa.Storage.set("cache_images",!1),Lampa.TMDB.image=function(t){let e=Lampa.Utils.protocol(),o=Lampa.Storage.field("proxy_tmdb"),a=o?`${e}${n.pathImage}${t}`:`${e}image.tmdb.org/${t}`;return r(i(a))},Lampa.TMDB.api=function(t){let e=Lampa.Utils.protocol(),o=Lampa.Storage.field("proxy_tmdb"),a=o?`${e}${n.pathApi}${t}`:`${e}api.themoviedb.org/3/${t}`;return r(i(a))},Lampa.Settings.listener.follow("open",function(t){"tmdb"===t.name&&t.body.find('[data-parent="proxy"]').remove()}),console.log("TMDB-Proxy",`v${n.version} started, enabled:`,Lampa.Storage.field("proxy_tmdb")),Lampa.SettingsApi.addComponent({component:"iptvskaz",icon:'',name:"by Skaz (Optimized)"}),Lampa.SettingsApi.addParam({component:"iptvskaz",param:{name:"b_skaz",type:"trigger",default:!1},field:{name:"Убрать с главной трансляции",description:"Убирает с главной трансляцию события"},onChange:function(t){Lampa.Noty.show("Необходимо перезайти в лампу")}})}(); \ No newline at end of file