Greasy Fork

Greasy Fork is available in English.

GitHub.io一键直达仓库

访问GitHub.io时点击按钮即可直达对应GitHub主页,目前脚本可能不完善。

当前为 2023-04-05 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         GitHub.io一键直达仓库
// @namespace    https://viayoo.com/
// @version      1.0
// @description  访问GitHub.io时点击按钮即可直达对应GitHub主页,目前脚本可能不完善。
// @author       孤独散人
// @homepageURL https://ghidgdsr.github.io/test
// @run-at       document-start
// @match        *://*.github.io/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
  var GitBtn = document.createElement("INPUT");
  GitBtn.setAttribute("type", "button");
  GitBtn.setAttribute("value", "GitHub");
  GitBtn.style.position = "absolute";
  GitBtn.style.right = "0%";
  GitBtn.style.bottom = "0%";
  GitBtn.style.height = "3%";
  GitBtn.style.width = "6%";
  GitBtn.style.border = "none";
  GitBtn.style.color = "#FFFFFF";
   GitBtn.setAttribute("onclick","javascript:url=location.host;url=url.replace('.github.io','');url='https://github.com/'+url+location.pathname;location.replace(url)");
  GitBtn.style.backgroundColor = "#000000";
  document.body.appendChild(GitBtn);
})();