PineappleeaHacker

替换页面中的github链接改为下载地址直连

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name           PineappleeaHacker
// @namespace      https://pineappleea.github.io/
// @description    替换页面中的github链接改为下载地址直连
// @include        https://pineappleea.github.io/*
// @version 0.0.1.202211242021
// ==/UserScript==

var sites = [
    {
        domain: 'pineappleea.github.io',
        handler: function() {
            var source_link_node = document.getElementsByClassName('scrollbox')[0].getElementsByTagName('a');
          for(var i =0;i< source_link_node.length;i++)
          {
            var ti = source_link_node[i].text.replace('Yuzu EA ','') ;
            var dl ="https://github.com/pineappleEA/pineapple-src/releases/download/EA-"+ ti+ "/Windows-Yuzu-EA-"+ti+".zip" 
            source_link_node[i].setAttribute('href',dl);

          }
        }
    }
    
];

var url = document.URL;
var i, site;
for (i = 0; i < sites.length; i += 1) {
    site = sites[i];
    if (url.indexOf(site.domain) != -1) {
        site.handler();
        break;
    }
}