您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
open embedded player into another window/tab(need to open popup), find vimeo download links and display it on the embedded player
当前为
// ==UserScript== // @name Vimeo Embedded Download Helper // @namespace http://tampermonkey.net/ // @version 0.1.2 // @description open embedded player into another window/tab(need to open popup), find vimeo download links and display it on the embedded player // @author LordKBX // @icon https://vimeo.com/favicon.ico // @include http://*.*/* // @include https://*.*/* // @grant unsafeWindow // @grant GM_addStyle // @grant GM_getResourceText // @grant GM_openInTab // @grant GM_info // @grant GM_getMetadata // @grant GM_getMetadata // @connect * // @run-at document-start // @encoding utf-8 // @license https://creativecommons.org/licenses/by-sa/4.0/ // @homepage https://greasyfork.org/fr/scripts/21002-vimeo-embedded-download-helper // @contactURL mailto:[email protected] // @supportURL mailto:[email protected] // ==/UserScript== var updateInterval = null; var timeInterval = 800; var nbscripts = 0; var nbscriptsCharges = 0; (function() { 'use strict'; setTimeout(verify, 2000); })(); function verify(){ var items = null; var i = 0; var j = 0; var ht = ''; if(window.location.href.search("://player.vimeo.com/video/") != -1){ ht = window.location.href.substring(0,window.location.href.search("://")); items = window.document.getElementsByTagName('script'); if(items !== null){ for(i = 0; i< items.length; i++){ if(items[i].innerHTML !== ''){ div = document.createElement('div'); div.setAttribute("style","background:#ffffff;color:#000;position:fixed;top:0px;left:0px;right:0px;height:20px;z-index:999;"); htm = 'Video Download Links : '; tab = items[i].innerHTML.split('"progressive":'); if(tab[1] !== undefined){ lines = tab[1].split("]")[0]+"]"; lines = JSON.parse(lines); for(j=0; j<lines.length; j++){ htm = htm + ' <a href="'+lines[j].url+'" download="'+document.getElementsByTagName('title')[0].innerHTML+'">' + lines[j].quality + '</a> '; window.console.log(lines[j].quality + " -> " + lines[j].url); } div.innerHTML = htm; window.document.getElementsByTagName('body')[0].appendChild(div); } //window.console.log(items[i].innerHTML); } } } } else{ items = document.querySelectorAll('iframe'); if(items !== null){ for(i = 0; i< items.length; i++){ var url = (items[i].src !== undefined)?items[i].src:null; if(url !== null){ if(url.search("://") != -1){ ht = url.substring(0,url.search("://")); if(url.search(ht+"://player.vimeo.com") != -1){ window.open(url, "_blank"); } } } } } } }