githubwidth

resizes github repos for smaller window widths.

目前為 2020-06-05 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name githubwidth
  3. // @version 0.1
  4. // @description resizes github repos for smaller window widths.
  5. // @match http://github.com/*
  6. // @match https://github.com/*
  7. // @match http://*.github.com/*
  8. // @match https://*.github.com/*
  9. // @namespace https://greasyfork.org/users/<my_id_here>
  10. // @run-at document-idle
  11. // @require https://code.jquery.com/jquery-latest.min.js
  12. // ==/UserScript==
  13.  
  14. $("nav.mt-0")[0].hidden = true;
  15.  
  16. $("table.files").map(function(n, t) {
  17. t.style.tableLayout = "fixed";
  18. // table>thead>tr>th
  19. ths = t.children[0].children[0].children;
  20. ths[0].style.width = "32px"; // icon
  21. ths[1].style.width = "192px"; // filename
  22. ths[3].style.width = "128px"; // mtime
  23. })
  24.  
  25. $(".min-width-lg").map(function(i, node) {
  26. node.style.minWidth = "0";
  27. })