githubwidth

resizes github repos for smaller window widths.

2020-07-03 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         githubwidth
// @version      0.3
// @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").map(function(i, node) {
  node.hidden = true;
});
$(".Header-link").map(function(i, node) {
  for (l of ["https://github.com/marketplace",
             "https://github.com/explore"]) {
    if (node.href === l) {
      node.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
});

for (t of [".min-width-lg", ".header-search", "body"]) {
  $(t).map(function(i, node) {
    node.style.minWidth = "0";
  });
}