Twitch Clip Downloader

Twitch Clip Download Easily

// ==UserScript==
// @name         Twitch Clip Downloader
// @namespace    http://oxcakmak.com/
// @version      3.5
// @description  Twitch Clip Download Easily
// @author       You
// @include       *://clips.twitch.tv/*
// @include       *://*twitch.tv/*/clip/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function addButton(){
    	var el = document.getElementsByClassName("channel-info-content")[0],
    		html = '<strong><a href="'+document.querySelector('video').src+'" target="_blank">Click To Download Clip</a></strong>';
    	// Internet Explorer, Opera, Chrome, Firefox 8+ and Safari
    	if (el.insertAdjacentHTML)
    		el.insertAdjacentHTML ("beforebegin", html);
    	else {
    		var range = document.createRange();
    		var frag = range.createContextualFragment(html);
    		el.parentNode.insertBefore(frag, el);
    	}
    }
    let loadDownloadButton = setInterval(() => {
      if (document.querySelector('.player-controls__right-control-group')) {
        if (location.pathname.includes('/clip/') || document.querySelector('[data-a-page-loaded-name="ClipsViewPage"]') ){
          addButton();
        }
      }
      clearInterval(loadDownloadButton);
    }, 1000);
})();
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元