JavDB_helper

have fun

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         JavDB_helper
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  have fun
// @author       Yich
// @match        https://javdb.com/*
//@require https://code.jquery.com/jquery-3.3.1.min.js
// @require https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012
// @grant        none
//@run-at  document-end
// ==/UserScript==

var originStyle = '';
var originImgUrl = '';

$('.item-image').hover(makeBigger,returnToOriginalSize);
waitForKeyElements (".meta", findMaxSizeVideo);


function findMaxSizeVideo(){
    var maxSize=0;
    var maxDom = null;
    $('.meta').each(function(i, obj) {
        var myRegexp = /([\d\.]+)(GB|MB)/g;
        var str = $(obj).text();
        var match = myRegexp.exec(str);
        var size = match[1];
        var mbgb = match[2];
        if(mbgb==="GB")
            size = parseFloat(size) * 1000;
        if(size > maxSize){
            maxSize = size;
            maxDom = obj
        }
    });
    $(maxDom).parents('td').css("background-color","yellow");
}
function makeBigger() {
    var imageDom = $(this).find('img');
    originStyle = imageDom.attr('style');
    imageDom.removeAttr('style');
    originImgUrl = imageDom.data('src');
    //imageDom.attr('src',originImgUrl.replace('thumbs','covers'));
    imageDom.attr('src',originImgUrl);
    $(this).parent().css({height: '+=60%', width: '+=60%'});
    $(this).parent().parent().css('zIndex', '1');
}
function returnToOriginalSize() {
    var imageDom = $(this).find('img');
    imageDom.attr('style',originStyle);
    imageDom.attr('src',originImgUrl);
    $(this).parent().removeAttr('style');
    $(this).parent().parent().removeAttr('style');
}