arbu3iki / Filmix HD

// ==UserScript==
// @name         Filmix HD
// @namespace    filmix.me
// @version      0.0.1
// @description  View HD videos without limits.
// @author       SHaRK
// @include      http://filmix.me/*
// @include      https://filmix.me/*
// @grant        none
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==

function fullhd() {
    setTimeout(function(){
        $('uppod_player_div.uppod-control_hd_select > select > option').each(function(){
            newurl = $(this).val();
            newurl = newurl.replace(/p.mp4$/g,'.mp4');
            $(this).val(newurl);
        });
        $('#html5 > uppod_player_div > img').remove();
    },1000);
    if ($('uppod_player_div > div > video > source').length){
        $('uppod_player_div > div > video > source').each(function(){
            newsrc = $(this).attr('src');
            newsrc = newsrc.replace(/p.mp4$/g,'.mp4');
            $(this).attr('src', newsrc);
        });
        $('div#geturl').html('<center><span>Ссылка для просмотра в проигрывателе:</span><br><input size="80" onClick="this.select();" value="'+newsrc+'" /></center>');
    }
}
(function() {
    $(document).ready(function() {
        if ($('div.noplayer').length){
            $('div.noplayer > div').html('Просмотр видео будет доступен<br>через <strong>10</strong> <span>секунд<span>');
            var timeleft = 10;
            var downloadTimer = setInterval(function(){
                timeleft--;
                $('div.noplayer > div > strong').text(timeleft);
                if(timeleft < 1){
                    clearInterval(downloadTimer);
                }
                if(timeleft === 0){
                    $('div.noplayer > div').text('Приятного просмотра!');
                } else if(timeleft === 1){
                    $('div.noplayer > div > span').text('секунду');
                } else if(timeleft < 5){
                    $('div.noplayer > div > span').text('секунды');
                }
            },1000);
            setTimeout(function(){
                $('span.btn-html5').click();
                fullhd();
                $('#html5 > uppod_player_div > img').remove();
            },11000);
        }
        $('div.player-main-block').append('<div id="geturl"></div>');
        $('iframe').remove();
        $('div#added_block').remove();
        $('div.page-wrapper').removeAttr('style').css({'padding-top:':'0 !important'});
        $('div.remove-sda-wrap').remove();
        $('div[id*="Composite"]').remove();
        fullhd();
        $('nav.translations').on('click', 'li', function(){
            console.log('translation clicked');
            location.reload();
        });
        $('#html5').on('click', '.uppod-control_prev', function(){
            console.log('prev clicked');
            fullhd();
        });
        $('#html5').on('click', '.uppod-control_next', function(){
            console.log('next clicked');
            fullhd();
        });
        $('uppod_player_div.uppod-control_hd_select').on('click', function(){
            console.log('quality clicked');
            fullhd();
        });
        $('#html5').on('click', 'uppod_player_div[class*="background"]', function(){
            console.log('episode clicked');
            fullhd();
        });
    });
})();