JAV Popup

JAV site img popup

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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();
    });
})();