Kinox Image Thumbnails

Loads Thumbnails on Kinox.to

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 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         Kinox Image Thumbnails
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Loads Thumbnails on Kinox.to
// @author       Fut
// @match        https://kinoz.to/*
// @match        https://www3.kinox.to/*
// @require      http://code.jquery.com/jquery-latest.js
// @grant        GM_addStyle
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    GM_addStyle("#preview { visibility: hidden; }");
    GM_addStyle(".Title > a { font: 18px Arial, Helvetica, sans-serif; }");

    var $ = window.jQuery;


    // Home
    $('.FullModuleTable > tbody  > tr').each(function(index, tr) {
        //console.log(index);
        //console.log(tr);
        //console.log($(tr).find(".Icon > img").attr('src'));
        var thumb = $(tr).find(".img_preview").attr('rel');
        $(tr).find("td.img_preview > a").css('display', 'block');
        $(tr).find(".OverlayLabel").css('display', 'block');
        $(tr).find("td.img_preview").append('<img src="' + thumb + '">');
    });





    // Newest, etc.
    $('#RsltTableStatic > tbody > tr').each(function(index, tr) {
        var url = $(tr).find('.Title > a').attr('href');
        console.log(url);

        $.ajax({
            url: url,
            type:'GET',
            success: function(data){
                var thumb = $(data).find('#Vadda').find('a').find('img').attr('src');

                console.log(thumb);
                $(tr).find("span.Year").css('display', 'block');
                $(tr).find("td.Title").append('<img src="' + thumb + '">');
                //$(tr).find("td.Title").append(thumb);

                //$('#content').html($(data).find('#firstHeading').html());
            }
        });


    });



    function StartWork(){
        setTimeout(() => {
            console.log(DoCheck());
            if(DoCheck()){
                DoWork();
            }
        }, 1000);
    }

    $(document).ready(function() {
        $(document).on('click','.paginate_button',function(e) {
            //handler code here
            StartWork();
        });
        $(document).on('click','.paginate_active',function(e) {
            //handler code here
            StartWork();
        });
        $(document).on('click','.LetterMode',function(e) {
            //handler code here
            StartWork();
        });
    });



    StartWork();
    


    function DoCheck(){
        if($('#RsltTable_processing').css('visibility') === 'hidden'){
            return true;
        }
        else{
            setTimeout(DoCheck(), 500);
            return false;
        }

    }

    function DoWork(){
        $("#RsltTable > tbody > tr").each(function(index, tr) {
            var url = $(tr).find('.Title > a').attr('href');
            console.log(url);

            $.ajax({
                url: url,
                type:'GET',
                success: function(data){
                    var thumb = $(data).find('#Vadda').find('a').find('img').attr('src');

                    console.log(thumb);
                    if($(tr).find('.Year').length){
                        $(tr).find('.Year').css('display', 'block');
                    }
                    else{
                        $(tr).find(".Title > a").css('display', 'block');

                    }
                    $(tr).find("td.Title").append('<img src="' + thumb + '">');
                    //$(tr).find("td.Title").append(thumb);

                    //$('#content').html($(data).find('#firstHeading').html());
                }
            });


        });
    }



})();