function bigImg(x) {
document.getElementById("dd-menu-id").style.display = "block";
}
function normalImg(x) {
document.getElementById("dd-menu-id").style.display = "none";
}
function AgregarFavoritosVIP() {
jQuery(document).ready(function($) {
var url = window.location.href;
var idlogged = getCookie("usuario_vip_logged");
$.post( "https://sitio.vip/registro.php", {url : url, idlogged: idlogged} ,function( data ) {
console.log(data);
if(data == "deleted") {
document.getElementById("agregar_fav").innerHTML = " Favoritos";
var x = document.querySelectorAll("#agregar_fav");
x[0].style.setProperty("background-color", "#f25c05", "important");
} else {
document.getElementById("agregar_fav").innerHTML = " Eliminar de Favoritos";
var x = document.querySelectorAll("#agregar_fav");
x[0].style.setProperty("background-color", "red", "important");
}
});
});
}
jQuery(document).ready(function($) {
if (document.cookie.indexOf("usuario_vip") > -1 ) {
var post = "";
var page = "";
const note = document.querySelector("html");
note.style.cssText += "position:relative;margin-top:40px!important";
document.getElementById("bloque_alerta").style.display = "block";
document.getElementById("alerta_mensaje").innerHTML = "Estás ingresando como VIP, puedes descargar directamente el torrent sin completar los pasos normales!";
document.getElementById("telegram").style.display = "none";
const $elem2 = $("#nav_principal");
$elem2[0].style.setProperty("margin-top", "40px", "important");
if ( post == "1" || page == "1" ) {
document.getElementById("agregar_fav").style.display = "inline-block";
document.getElementById("lbxVPN666").style.display = "block";
var url = window.location.href;
var idlogged = getCookie("usuario_vip_logged");
$(".linktorrent").each(function() {
var decode = window.atob($(this).data("src"));
decode = decode.replace(window.atob("ZmlsZXMuZ3JhbnRvcnJlbnQuc2U="), "grantorrent.sitio.vip/files");
$(this).attr("href", decode);
});
$.post( "https://sitio.vip/consulta.php", {url : url, idlogged: idlogged} ,function( data ) {
if(data) {
document.getElementById("agregar_fav").innerHTML = " Eliminar de Favoritos";
var x = document.querySelectorAll("#agregar_fav");
x[0].style.setProperty("background-color", "red", "important");
}
});
} else {
document.getElementById("agregar_fav").style.display = "none";
document.getElementById("lbxVPN666").style.display = "block";
}
$("#bloque_alerta").attr("onclick", "CloseAlert()");
var downbar = Cookies.get("downbar");
if(downbar != "" && downbar != undefined) {
document.getElementById("bloque_alerta").style.display = "none";
}
}
});
function CloseAlert() {
Cookies.set("downbar", "1", { expires: 1 });
document.getElementById("bloque_alerta").style.display = "none";
}
function getCookie(name) {
const value = `; ${document.cookie}`;
const parts = value.split(`; ${name}=`);
if (parts.length === 2) return parts.pop().split(";").shift();
}
var nombre = getCookie("usuario_vip_nick");
document.getElementById("bloque_texto").innerHTML = "Hola "+nombre+", Bienvenido a nuestro Sitio Web.";