37 lines
1016 B
JavaScript
37 lines
1016 B
JavaScript
// ==UserScript==
|
|
// @name 3+
|
|
// @description 3+ download URL to Wget command
|
|
// @version 0.8
|
|
// @namespace http://www.adrian.kousz.ch/
|
|
// @require https://git.adrian.kousz.ch/adrian/userscripts/raw/master/lib.js
|
|
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
|
|
// @match http://www.3plus.tv/*
|
|
// @grant none
|
|
// ==/UserScript==
|
|
|
|
AdiUserscriptLib.addButton('DL Cmds', function () {
|
|
var vars = {}
|
|
var commandline = 'wget {url}\n'
|
|
var commands = ''
|
|
|
|
var scriptUrl = $('script[src*="container=sdnPlayer"]')
|
|
.attr('src')
|
|
.replace('autoplay=true', 'autoplay=false')
|
|
;
|
|
|
|
// TODO: Overwrite only temporarily
|
|
FlashDetect.versionAtLeast = function() { return false; };
|
|
|
|
var continueFn = function() {
|
|
// TODO: Select best stream
|
|
var qualities = ['hd720', 'mediumlarge','medium'];
|
|
|
|
vars.url = sdnPlayerConfig.playlist[6].src;
|
|
|
|
// NOTE: Prompt because of popup blocking
|
|
prompt('URL', vars.url);
|
|
}
|
|
|
|
$.getScript(scriptUrl, continueFn);
|
|
})
|