githubwidth

resizes github repos for smaller window widths.

目前為 2020-07-01 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         githubwidth
// @version      0.2
// @description  resizes github repos for smaller window widths.
// @match        http://github.com/*
// @match        https://github.com/*
// @match        http://*.github.com/*
// @match        https://*.github.com/*
// @namespace    https://greatest.deepsurf.us/users/217495-eric-toombs
// @run-at       document-idle
// @require      https://code.jquery.com/jquery-latest.min.js
// ==/UserScript==

$("nav.mt-0")[0].hidden = true;

$("table.files").map(function(n, t) {
	t.style.tableLayout = "fixed";
  // table>thead>tr>th
  ths = t.children[0].children[0].children;
  ths[0].style.width = "32px";  // icon
  ths[1].style.width = "192px"; // filename
  ths[3].style.width = "128px"; // mtime
})

$(".min-width-lg").map(function(i, node) {
  node.style.minWidth = "0";
})