JAV Popup

JAV site img popup

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         JAV Popup
// @namespace    https://greasyfork.org/ja/scripts/375587-jav-popup
// @version      0.1
// @description  JAV site img popup
// @author       kyu-su
// @match        http://javtorrent.re/*
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var xOffset = 20;
    var yOffset = 20;

    $(".base li a img").each(function() {
        var orig = this.src.replace( "_s" , "" );
        var img = this.src.split("/").slice(-1)[0];
        var clases = img.split(".")[0];

        $("body").append("<div class='tooltip " + clases + "' style='position: absolute;z-index: 1000; display: none;'><div class='img'><img src='"+ orig +"' /></div></div>");
   });

    $(".base li a img").hover(function(e){
        var img = this.src.split("/").slice(-1)[0];
        var clases = img.split(".")[0];

        var left = $(this).offset().left < 750 ?
                   $(this).offset().left + $(this).outerWidth() + xOffset : $(this).offset().left - (600 + xOffset);

        $("body").find(".tooltip." + clases)
            .css("top", $(this).offset().top + "px")
            .css("left", left + "px")
            .show();
    }, function(){
        $(".tooltip").hide();
    });
})();