Script JKStyle

Script para cambiar "Funciones" de JKanime

目前為 2015-10-26 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Script JKStyle
// @description  Script para cambiar "Funciones" de JKanime
// @author       Angel Komander
// @website      http://angelkrak.hol.es
// @version      0.3
// @include      http://*jkanime.net/*
// @include      http://*www.jkanime.net/*
// @namespace https://greasyfork.org/users/18876
// ==/UserScript==

/* Estilos para la Transparencia*/
jQuery('head').append('<style id="transparent" type="text/css">#content{background:0 0;border:1px solid #D5D5D5;border-radius:3px}#global{background-attachment:fixed;background-position:50% 0;background-repeat:no-repeat;background-size:100%;height:100%}#latest_animes_menu{background:rgba(242,246,247,.4)}#select_lang{color:#000}#simplemodal-container code{background:rgba(0,0,0,.3);color:#fff}.listpage li a:hover,.rated_stars span,.spec:hover div a,.src_box{color:#000}#top_menu{background:0 0;border:1px solid #D5D5D5}#videobox_content div,.video_option_act{position:relative;z-index:9999}.capitulos_right .seoblock{background-color:rgba(249,249,249,.6)}#letters_bg,#select_lang,.comment_like,.cont_top,.latest_end,.listbox,.listpage .search,.publibox,.publibox iframe,.ratedback,.ratedwhite,.select_lang_act,.srcpage_box,.video_actions,.videobox{background:0 0}.listpage .search,.listpage .search p{color:#000;opacity:.99}.listpage .search:hover,.listpage li:hover{background-color:rgba(249,249,249,.6)}.mode_extend{width:100%}.nivo-caption p{opacity:1}.player_conte{display:block}#a4gss77519563910,#moveboxr,.ads_home,.search_right .feed_box,div>div>div>div>object>embed{display:none}.publibox iframe{height:218px}.ratedul li:hover,.spec:hover{background-color:rgba(249,249,249,.5)}.search_right .publibox:nth-child(1){background-image:url(http://www.renders-graphics.com/image/upload/normal/849370.png);background-size:100% 100%;height:500px}.select_lang_act{margin:1.5px 0 0 170px}.descripbox,.listnavi .listpag,.listpage li,.seoblock{background-color:rgba(242,246,247,.3)}.simplemodal-container{background-color:rgba(249,249,249,.6);z-index:999999}.sinopsis_title{border-radius:9px 6px 0 0;margin:0;width:552px}.src_box{background:0 0;font-family:georgia;font-size:18px;outline:0}.sticboxl_act,.video_actions_act{position:relative;z-index:9999}.comment_like,.video_left>.videobox{background:rgba(255,255,255,.5)}.video_right .publibox:nth-child(1){background-size:100% 100%;height:500px;position:absolute;top:190px;}</style>');

/* Estilos para el Script*/
jQuery('head').append('<style id="script" type="text/css">.button,.label{margin-top:-1px}.arrow,.button,h2.insert{cursor:pointer}.button,.label input{outline:0;width:100%}.selectJK{position:fixed;right:0;transition:all .9s ease;transform:translateX(100%)}.arrow{border-right:25px solid rgba(0,0,0, .5);border-top:25px solid transparent;border-bottom:25px solid transparent;position:absolute;content:"";top:5%;left:-25px;width:0;height:0;transition:all .8s ease}.label{position:relative;display:block}.label input{padding:15px;border:1px solid #ddd}.button{padding:15px;border:1px solid #145fd7;background:#4a87ee;color:#fff;font-weight:400;font-family:Helvetica;font-size:16px;box-sizing:content-box}h2.insert{background:#DDD;color:#75808C;text-align:center;width:100%;padding:16px;border-radius:3px 3px 0 0;margin-bottom:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#cursorM,#fondoM,#sidebarM{padding:15px;width:100%;outline:0;border:1px solid #ddd;background:#fff;display:block;word-wrap:break-word}#global, .selectJK{z-index:9999;}</style>');

/* Agregamos el contenido del Arrow */
$("#global").append('<div class="selectJK"><div class="arrow"></div><div class="uno"><h2 class="insert">Insertar Imagenes</h2><label class="label"> <input type="text" placeholder="Fondo de Imagen" id="fondo"></label><label class="label"> <input type="text" placeholder="Sidebar" id="sidebar"></label><label class="label"> <input type="text" placeholder="Cursor //No Funciona Todavia" id="cursor"></label><button class="button" id="boton-guardar">Insertar</button></div><div class="dos"><h2 class="insert">Mostrar Enlaces</h2><label id="fondoM"></label><label id="sidebarM"></label><label id="cursorM"></label></div></div>');

/* Boton Open */
var open = 0;

$(".arrow").click(function(e) {
	e.preventdefault;
	if (open == 0) {
	$(".selectJK").css({
		"transform": "translateX(-16%)"
	});
	$(".arrow").css({
		"top": "50%"
	});
	open = 1;
	}else{
	$(".selectJK").css({
		"transform": "translateX(100%)"
	});
	$(".arrow").css({
		"top": "5%"
	});
	open = 0;
	}
});

/* Mostramos y Ocultamos */
$(".uno").show();
$(".dos label").hide();

$("h2.insert").click(function() {
$(".dos label").slideToggle("slow");
});

$("h2.insert").click(function() {
$(".uno label, #boton-guardar").slideToggle("slow");
});

/*Funcion de Capturar, Almacenar datos y Limpiar campos*/
$(document).ready(function(){    
    $('#boton-guardar').click(function(){
		if (confirm('Estas Seguro(a) ?')) {
        /*Captura de datos escrito en los inputs*/        
        var fon = document.getElementById("fondo").value;
        var sid = document.getElementById("sidebar").value;
        var cur = document.getElementById("cursor").value;
        
        /*Guardando los datos en el LocalStorage*/
        localStorage.setItem("Fondo", fon);
        localStorage.setItem("Sidebar", sid);
        localStorage.setItem("Cursor", cur);
        
        /*Limpiando los campos o inputs*/
        document.getElementById("fondo").value = "";
        document.getElementById("sidebar").value = "";
        document.getElementById("cursor").value = "";
		}
    });
});

/*Funcion Cargar y Mostrar datos*/
$(document).ready(function(){

        /*Obtener datos almacenados*/
        var fondo = localStorage.getItem("Fondo");
        var sidebar = localStorage.getItem("Sidebar");
        var cursor = localStorage.getItem("Cursor");
        
        /*Mostrar datos almacenados*/      
        var background = "background-image: url('"+fondo+"')";
        $("body #global").attr("style", background);
        document.getElementById("fondoM").innerHTML = fondo;
	    var background2 = "background-image: url('"+sidebar+"')";
        $(".video_right .publibox:nth-child(1)").attr("style", background2);
        document.getElementById("sidebarM").innerHTML = sidebar;
        document.getElementById("cursorM").innerHTML = cursor;         
        
    });   

/*Funcion Eliminar datos y Limpiar campos*/
$(document).ready(function(){    
    $('#boton-eliminar').click(function(){                
                                                   
        /*Eliminar datos almacenados*/
        localStorage.removeItem("Fondo");
        localStorage.removeItem("Sidebar");
        localStorage.removeItem("Cursor");
        
        /*Limpiar datos almacenados*/       
        document.getElementById('fondo').innerHTML = "";
        document.getElementById('sidebar').innerHTML = "";
        document.getElementById('cursor').innerHTML = "";
        
    });   
});