Browse Source

Changed download url to cover commits as well

master
George Sokianos 6 months ago
parent
commit
3b208e1b12
  1. 10
      github.js

10
github.js

@ -1,6 +1,6 @@
// GitHub CSS fixes
// version 1.1
// 2022-04-04
// version 1.2
// 2022-06-04
// Copyright (c) 2021 Created by Georgios Sokianos
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
@ -10,7 +10,7 @@
// @namespace none
// @description Fixes css in GitHub
// @include https://github.com/*
// @version $VER: GitHub CSS fixes 1.1 (04.04.2022)
// @version $VER: GitHub CSS fixes 1.2 (04.06.2022)
// @url https://ko-fi.com/walkero
// ==/UserScript==
@ -76,11 +76,11 @@ window.onload = function () {
var archiveUrl = canonicalUrl;
if (canonicalUrl.indexOf("tree") > -1) {
archiveUrl = archiveUrl.replace("tree", "archive/refs/heads");
archiveUrl = archiveUrl.replace("tree", "archive");
} else {
var branchElem = document.querySelector("span[data-menu-button]");
if (branchElem !== null) {
archiveUrl += "/archive/refs/heads/" + branchElem.textContent;
archiveUrl += "/archive/" + branchElem.textContent;
}
}

Loading…
Cancel
Save