您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
download extension for kej.tw/flvretriever
- // ==UserScript==
- // @name Kej YouTube DL Helper
- // @author DickyT
- // @license GPL version 3
- // @encoding utf-8
- // @date 17/05/2015
- // @modified 22/05/2015
- // @include http://kej.tw/*
- // @grant GM_xmlhttpRequest
- // @run-at document-end
- // @version 0.0.6
- // @description download extension for kej.tw/flvretriever
- // @namespace ytbkejhelper
- // ==/UserScript==
- exportFunction(function() {
- unsafeWindow.document.getElementById('videoInfo').value = '請求中... Requesting data...';
- GM_xmlhttpRequest({
- method: 'GET',
- url: unsafeWindow.document.getElementById('linkVideoInfoURL').href,
- onload: function(data) {
- if (data.status == 200) {
- unsafeWindow.document.getElementById('videoInfo').value = data.responseText;
- unsafeWindow.getYouTubeUrl();
- }
- else {
- unsafeWindow.document.getElementById('videoInfo').value = '請求失敗 請重試 Request Fail, please try again';
- }
- }
- });
- }, unsafeWindow, {defineAs: 'getVideoInfo'});
- var dlAnchor = document.getElementById('linkVideoInfoURL');
- dlAnchor.innerHTML = '重新請求 Request again';
- unsafeWindow.window.getVideoInfo();
- dlAnchor.addEventListener('click', function(e) {
- e.preventDefault();
- unsafeWindow.window.getVideoInfo();
- });
- var authorData = document.createElement('span');
- authorData.innerHTML = '<br><a href="http://kej.tw/flvretriever/" class="tdnone">Kej\'s YouTube FLV Retriever Helper (Userscript Extension)</a> is powered by <a href="http://me.idickyt.com/" class="tdnone">Dicky Tsang</a><br>';
- unsafeWindow.document.getElementsByClassName('setcenter')[0].appendChild(authorData);