github release 加速下载

github release speedup downloader 给release添加 一个按钮 使用cf代理加速下载

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         github release 加速下载
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  github release speedup downloader 给release添加 一个按钮 使用cf代理加速下载
// @author       https://github.com/holoto
// @match        *://github.com/*/*/releases
// @match        *://github.com/*/*/releases/tag/*
// @run-at       document-end
// @grant        unsafeWindow

// ==/UserScript==

(function() {
    'use strict';
    // console.log("test1");
    //base in gh-proxy  https://github.com/hunshcn/gh-proxy

    //urld 是核心加速服务url

    var urld = "https://githubspeedupdownloader.holoto.workers.dev/";


    //cfworker  免费个人用户10w次请求 如果本项目提供的免费的加速服务 额度用尽
    // 请自行 参照https://github.com/hunshcn/gh-proxy 搭建 加速服务 把 urld 替换为 你自己的加速服务
    // 这里收集了一些加速服务url
    //   如果不能加速 额度用尽 urld 可以改成这个 https://gh.api.99988866.xyz



    var buttondownstyle = "color: red";
    var buttondowntitle = "CF加速下载    ";
    var filelist = Array.from(document.getElementsByClassName('Box Box--condensed mt-3'));
// var v1;
                    // console.log(filelist);
                    //   console.log(document.getElementsByClassName('Box Box--condensed mt-3'));
// var filelist1;

    filelist.forEach(v => {
                          // console.log(v);
                    // console.log(v);

      // v1 =v.getElementsByClassName('Box-row')
      let filelist1=Array.from(v.getElementsByClassName('Box-row'));
          console.log(filelist1)

      filelist1.forEach(vv => { 
                            console.log(vv.getElementsByTagName('a'));

       let divdown = document.createElement("div");

        let buttondown = document.createElement("a");
        buttondown.style = buttondownstyle;
   
        buttondown.innerText=buttondowntitle+vv.getElementsByTagName('a')[0].innerText;
        
        buttondown.href=urld+vv.getElementsByTagName('a')[0].href;

        divdown.style = "margin:10px;";
        divdown.append(buttondown);
        vv.after(divdown);
              console.log(vv);

      })
      
       
    }
                       
                       );




})();