MediathekViewWeb - Single Click Download

Direct download of shows via single click

اعتبارا من 19-01-2022. شاهد أحدث إصدار.

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name          MediathekViewWeb - Single Click Download
// @description   Direct download of shows via single click
// @author        TheRealHawk
// @license       MIT
// @namespace     https://greasyfork.org/en/users/18936-therealhawk
// @match         https://mediathekviewweb.de/*
// @version       1.1
// @require       https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @require       https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js
// @require       https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js
// @grant         GM_download
// ==/UserScript==

// Workaround to get rid of "'$' is not defined" warnings
var $ = window.jQuery;

function modTitleCol() {
    $('#mediathek > tbody > tr > td:nth-child(3n)').hover(
        // Mouseover
        function() {
            $(this).css(
                {color:'#0ce3ac'}
            );
        },
        // Mouseout
        function() {
            $(this).css(
                {color:'#ffffff'}
            );
        }
    );

    $('#mediathek > tbody > tr').each( function() {
        const url = $('td', this).last().find('a').attr('href');
        const title = $('td', this).eq(2).text();
        const orgTime = $('td', this).eq(4).text();
        const modTime = moment(orgTime, 'DD.MM.YYYY').format('YYYY-MM-DD');

        $('td', this).eq(2).bind('click', function() {
            $(this).effect('pulsate');

            const details = { url: url,
                              name: modTime + ' - ' + title.replace(/[\\\|\?\.\*:<>/]/g, '').replace(/"/g, '\'').replace(/[\s]{2,}/g, ' ') + '.mp4',
                              saveAs: true
                            };
            GM_download(details);
        } );
    } );
}

const observer = new MutationObserver( function() {
    modTitleCol();
} );

observer.observe($('#mediathek')[0], {childList: true});