var one="",two="",three="";function search(){var a=proxyserver();document.getElementById("buttlol").innerHTML="Searching",fetch(a+"/https://lookmovie.io/api/v1/movies/do-search/?q="+document.getElementById("movie").value).then(a=>{if(a.ok)return a.json();throw new Error("NETWORK RESPONSE ERROR")}).then(a=>{makeVisible(),clear(),document.getElementById("buttlol").innerHTML="Searched";var b=a.total;1==b&&(document.getElementById("2title").style.visibility="hidden",document.getElementById("2img").style.visibility="hidden",document.getElementById("3title").style.visibility="hidden",document.getElementById("3img").style.visibility="hidden",document.getElementById("1title").innerHTML=a.result[0].title+" "+a.result[0].year,document.getElementById("1img").src=a.result[0].poster,one=a.result[0].slug),2==b&&(document.getElementById("3title").style.visibility="hidden",document.getElementById("3img").style.visibility="hidden",document.getElementById("1title").innerHTML=a.result[0].title+" "+a.result[0].year,document.getElementById("1img").src=a.result[0].poster,one=a.result[0].slug,document.getElementById("2title").innerHTML=a.result[1].title+" "+a.result[1].year,document.getElementById("2img").src=a.result[1].poster,two=a.result[1].slug),1!==b&&2!==b&&(document.getElementById("1title").innerHTML=a.result[0].title+" "+a.result[0].year,document.getElementById("1img").src=a.result[0].poster,one=a.result[0].slug,document.getElementById("2title").innerHTML=a.result[1].title+" "+a.result[1].year,document.getElementById("2img").src=a.result[1].poster,two=a.result[1].slug,document.getElementById("3title").innerHTML=a.result[2].title+" "+a.result[2].year,document.getElementById("3img").src=a.result[2].poster,three=a.result[2].slug)}).catch(a=>console.error("FETCH ERROR:",a))}let input=document.getElementById("movie"),timeout=null;function makeVisible(){document.getElementById("1title").style.visibility="visible",document.getElementById("2title").style.visibility="visible",document.getElementById("3title").style.visibility="visible",document.getElementById("1img").style.visibility="visible",document.getElementById("2img").style.visibility="visible",document.getElementById("3img").style.visibility="visible"}function makeHidden(){document.getElementById("1title").style.visibility="hidden",document.getElementById("2title").style.visibility="hidden",document.getElementById("3title").style.visibility="hidden",document.getElementById("1img").style.visibility="hidden",document.getElementById("2img").style.visibility="hidden",document.getElementById("3img").style.visibility="hidden"}function clear(){document.getElementById("1title").innerHTML="No movie found",document.getElementById("2title").innerHTML="No movie found",document.getElementById("3title").innerHTML="No movie found",document.getElementById("1img").src="",document.getElementById("2img").src="",document.getElementById("3img").src="",one="",two="",three=""}function clickPress(a){13==a.keyCode&&search(),clearTimeout(timeout),timeout=setTimeout(function(){search()},300)}function Get(a){var b=new XMLHttpRequest;return b.open("GET",a,!1),b.setRequestHeader("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0"),b.send(null),b.responseText}function Test_get(a){try{var b=new XMLHttpRequest;return b.open("GET",a,!1),b.setRequestHeader("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0"),b.overrideMimeType("text/html"),b.send(null),b.setTimeout(2e3),1e4a?(document.getElementById("video").width=336,document.getElementById("video").height=189):750>a?(document.getElementById("video").width=640,document.getElementById("video").height=360):(document.getElementById("video").width=720,document.getElementById("video").height=405),document.getElementById("video").style.margin="0 auto",document.getElementById("video").style.display="block",document.getElementById("movie").style.backgroundColor="#202020",document.getElementById("movie").style.color="white",document.body.style.backgroundColor="#202020"}function getm3u8(a){ooh();var b=proxyserver(),c=Get(b+"/https://lookmovie.io/movies/view/"+a),d=Get(b+"/https://lookmovie.io/movies/view/"+a).split("\n"),e=c.split("id_movie: ")[1].split(",")[0];fetch(b+"/https://lookmovie.io/api/v1/security/movie-access?id_movie="+e+"&token=1&sk=&step=1").then(a=>{if(a.ok)return a.json();throw new Error("NETWORK RESPONSE ERROR")}).then(a=>{if(!0==a.success){var c=a.data.expires,d=a.data.accessToken,f=document.getElementById("video"),g=JSON.parse(Get(b+"/https://lookmovie.io/manifests/movies/json/"+e+"/"+c+"/"+d+"/master.m3u8"));if(Hls.isSupported()){var h=new Hls;h.loadSource(b+"/"+g["720p"].replace("/720p/","/1080p/")),h.attachMedia(f),clear(),makeHidden(),document.getElementById("buttlol").innerHTML="Search";for(var j=[document.getElementById("1title"),document.getElementById("2title"),document.getElementById("3title"),document.getElementById("1img"),document.getElementById("2img"),document.getElementById("3img"),document.getElementById("buttlol")],k=0;kconsole.error("FETCH ERROR:",a))}function proxyserver(){var a=["https://www.cors.llw.name","https://cors-anywhere-k8s.innocode.no","https://proxy.nil.cx","https://corss.twiketo.com","https://cors.filavents.com","https://control.fairway321.com","https://proxy.sevaexchange.com","https://cors-proxy.husl.pro","https://cors.darpan.online","https://cors-anywhere.usylibra.eu","https://cors.was.exposed","https://cors-proxy.crawler.link","https://k.oe-jpy.com","https://cors.ebapay.ir","https://cors.spiralyze.com","https://proxy.urjc.info","https://cors.dprimero.com","https://cors.netlob.dev","https://cors.r2h.us","https://cors.zimjs.org","https://cors.v001.dev","https://mmcors.autonio.foundation","https://cors.bystrov.agency","https://ip.here.fm","https://cors-proxy.openhouse.study","https://cors.diystock.ai","https://cors-proxy.svi.solutions"],b=a[~~(Math.random()*a.length)];return b}function newsearch(){window.location.reload(!0)}