您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Wechselt automatisch zum vivo-Tab auf bs.to und auf vivo.XX kopiert es die Video-URL in den Zwischenspeicher oder leitet zur Videoquelle weiter
当前为
// ==UserScript== // @name vivo direct video source or video source to clipboard (for vlc playlist etc) // @author xtrars // @description Wechselt automatisch zum vivo-Tab auf bs.to und auf vivo.XX kopiert es die Video-URL in den Zwischenspeicher oder leitet zur Videoquelle weiter // @description:en Automatically switches to the vivo tab on bs.to and on vivo.XX it copies the video URL to the clipboard or redirects to the video source // @include https://bs.to/* // @include https://vivo.sx/* // @include https://vivo.st/* // @version 1.1 // @run-at document-start // @license CC BY 4.0 // @namespace http://greasyfork.icu/users/140785 // ==/UserScript== (function() { 'use strict'; // CHANGE IF YOU WANT TO TRUE let bCloseTabAfterCopyToClipboard = false; // ADVANCED USERS ONLY window.addEventListener('load', function() { if (isVivo()) { // thanks to Wissidi dom (http://greasyfork.icu/de/scripts/28779-zu-vivo-video-navigieren/code) let sSrc = document.getElementsByTagName('video')[document.getElementsByTagName('video').length -1]['currentSrc']; if (bCloseTabAfterCopyToClipboard) { navigator.clipboard.writeText(sSrc); closeTab(); } else { window['location'].replace(sSrc); } } }); if (isEpisode()) { document['location'].replace(document['location']['href'] + '/Vivo'); } function isEpisode() { let sVivoStr = '/Vivo'; let serieRegex = /[0-9]{1,2}\/[0-9]{1,2}\-/g; return document['location']['href'].search(sVivoStr) === -1 && document['location']['href'].search(serieRegex) !== -1; } function isVivo() { let regex = /vivo\..{1,3}\//g; return document['location']['href'].search(regex) && document.getElementsByTagName('video') && document.getElementsByTagName('video')[document.getElementsByTagName('video').length -1] } function closeTab() { setTimeout(function() { window.open("","_self").close(); }, 500); } })();