
























不知道为什么,新版 github 在项目首页上只提供 zip 归档格式的下载,要下载 gzip 包还需要点击 download 到新页面去。可是我就是不喜欢 zip 格式嘛——
// ==UserScript==
// @name github 下载默认 gzip 格式
// @namespace http://lilydjwg.is-programmer.com/
// @description 把默认的 zip 下载按键改成 gzip 的
// @include https://github.com/*
// ==/UserScript==
var dl = document.querySelector('.btn-download');
if(dl){
dl.title = dl.title.replace('zip', 'gzip')
dl.href = dl.href.replace('/zipball/', '/tarball/');
var icon = dl.querySelector('.icon');
if(icon){
icon.nextSibling.textContent = 'GZIP';
}
}此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。