function t(e)
{
return"<iframe allow='accelerometer;
autoplay;
clipboard-write;
encrypted-media;
gyroscope;
picture-in-picture' allowfullscreen='true' frameborder='0' height='315' scrolling='no' src='"+e+"' width='560'></iframe>"
}
function i(t)
{
e.write('<div class="box_item_ads_popup" style="opacity:1"><div><a href="'+t.url+'" target="_blank" rel="nofollow"> <img src="'+t.image+'" rel="nofollow" alt="'+t.title+'" title="'+t.title+'"></a><div class="close-button" onClick="(function()
{
document.querySelector(\'.box_item_ads_popup\').remove()
}
)();
return false;
">'+(t.close||"Tutup Iklan")+"</div></div></div>")
}
function r(t)
{
e.write('<div class="logo-custom">'+t+"</div>")
}
function a(t)
{
let i=e.createElement("link");
i.setAttribute("rel","stylesheet"),i.setAttribute("href",t),e.head.appendChild(i)
}
function o(t)
{
let i=e.createElement("script");
i.src=t.src,"load"in t&&(i.onload=t.load),"err"in t&&(i.onerror=t.err),e.body.appendChild(i)
}
let l=e.location.href,n=new URL(l),s=n.searchParams.get("player"),d=n.searchParams.get("provider"),c=n.searchParams.get("format"),p=n.searchParams.get("link");
s?(()=>
{
e.getElementById("createIframe").remove();
let t="gdrive"==d?"https://www.googleapis.com/drive/v3/files/"+p+"?alt=media&key="+config.gDriveApikey:p;
try
{
"fluidplayer"==s?(e.write('<video class="hidden" id="video"><source src="'+t+'" type="'+c+'"/></video>'),o(
{
src:"https://cdn.fluidplayer.com/v3/current/fluidplayer.min.js",load:function()
{
config.fply=fluidPlayer("video",
{
layoutControls:
{
controlBar:
{
autoHideTimeout:3,animated:!0,autoHide:!0
}
,allowDownload:!0,allowTheatre:!0,fillToContainer:!0,playbackRateEnabled:!1,playPauseAnimation:!0,posterImage:config.poster
}
}
)
}
}
)):"jwpl"==s?(e.write('<div id="arsipin"></div>'),o(
{
src:"https://content.jwplatform.com/libraries/zgIRUsiD.js",load:function()
{
config.jwpl=jwplayer("arsipin"),config.jwpl.setup(
{
title:"",tracks:[
{
file:"",kind:"captions",default:!0
}
],sources:[
{
file:t,type:c
}
],image:config.poster,captions:
{
color:"#FFFF00",fontSize:17,backgroundOpacity:50
}
}
)
}
}
)):"video"==s?e.write('<video id="arsipin" controls poster="'+config.poster+'"><source src="'+t+'" type="'+c+'"/></video>'):"plyr"==s&&(a("https://cdn.plyr.io/3.7.2/plyr.css"),"yt"==d?e.write('<div class="hidden" id="video" data-poster="'+config.poster+'" data-plyr-provider="youtube" data-plyr-embed-id="'+t+'"></div>'):e.write('<video class="hidden" id="video" playsinline controls data-poster="'+config.poster+'"><source src="'+t+'" type="'+c+'"/></video>'),o(
{
src:"https://cdn.plyr.io/3.7.2/plyr.js",load:function()
{
config.plyr=new Plyr("#video")
}
}
)),config.ads&&i(config.ads),config.logo&&r(config.logo)
}
catch(t)
{
e.body.innerHTML=config.err||"<p>Error</p>"
}
}
)():o(
{
src:"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js",load:function()
{
$("#createIframe").show("slow"),$(".form").find("select, input").on("change",function()
{
let e=$(this),t=e.attr("name"),i=e.val();
"player"==t&&(()=>
{
let e=$("select[name=provider]"),t=e.find("[value=yt]");
["fluidplayer","video","jwpl"].some(e=>e==i)?t.attr("disabled",!0):t.attr("disabled",!1),i.length>0?e.attr(
{
disabled:!1,required:!0
}
):e.attr(
{
disabled:!0,required:!1
}
),e.val(""),e.trigger("change")
}
)(),"provider"==t&&(()=>
{
let e=$("[name=format]"),t=$("[name=link]"),r=$(".useLocal");
t.val(""),t.attr("placeholder","Link Video"),i.length>0?t.attr("disabled",!1):t.attr("disabled",!0),("rand"!=i||i.length<1)&&r.hide(),["gdrive","rand"].some(e=>e==i)?(e.attr(
{
disabled:!1,required:!0,placeholder:"video/mp4"
}
),e.val("video/mp4"),"gdrive"==i?t.attr("placeholder","ID GDRIVE"):r.show()):("yt"==i||i.length<1)&&(e.attr(
{
disabled:!0,required:!1,placeholder:"disabled"
}
),e.val(""),"yt"==i&&t.attr("placeholder","ID Youtube"))
}
)(),"file"==t&&(()=>
{
let t=e.prop("files")[0],i=URL.createObjectURL(t),r=t.type;
console.log(t),$('[name="format"]').val(r),$('[name="link"]').val(i)
}
)()
}
),$("#signup form").submit(function(e)
{
e.preventDefault();
const i=$(this).serializeArray();
n.search="",$.each(i,function(e,t)
{
n.searchParams.append(t.name,t.value)
}
),$("#ifcode").val(t(n.href)),$("#links").val(n.href),$('a[href="#login"]').click()
}
),$(".tab a").on("click",function(e)
{
e.preventDefault(),"#signup"==$(this).attr("href")&&($("#signup form").trigger("reset"),$("textarea").each(function()
{
$(this).val("")
}
),$("[name=player]").val("").trigger("change")),$(this).parent().addClass("active"),$(this).parent().siblings().removeClass("active"),target=$(this).attr("href"),$(".tab-content > div").not(target).hide(),$(target).fadeIn(600)
}
)
}
}
)
© 2023 Quttera Ltd. All rights reserved.