github-custom-styles

github custom styles

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला 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         github-custom-styles
// @namespace    github-custom-styles
// @description  github custom styles
// @version      1.0.0
// @author       roojay
// @homepage     https://github.com/roojay520/github-custom-styles
// @license      http://opensource.org/licenses/MIT

// @include      https://github.com/*
// @run-at       document-start

// @grant        GM_addStyle

// @noframes
// @connect      *
// ==/UserScript==

const customStyles = `
  :root {
    --bg-gray-light: #fafbfc;
    --max-width: 1012px;
    --border-radius: 4px;
    --border-color: #e1e4e8;
  }

  .container-xl {
    max-width: var(--max-width) !important;
  }

  .Box {
    border-radius: var(--border-radius);
  }

  .Box-row:last-of-type {
    border-bottom-right-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
  }

  .Box-header {
    border-top-left-radius: var(--border-radius) !important;
    border-top-right-radius: var(--border-radius) !important;
  }

  .btn {
    border-radius: var(--border-radius);
  }

  .btn-with-count {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .social-count {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
  }

  .pagehead {
    margin-bottom: 16px !important;

    box-shadow: inset 0 -1px 0 var(--border-color);
  }

  .pagehead > div:first-child {
    margin-right: auto;
    margin-left: auto;
    padding-left: 14px !important;
    max-width: var(--max-width);
  }

  .pagehead > nav > ul {
    margin: 0 auto;
    padding-left: 0 !important;
    width: 980px;
    max-width: var(--max-width);
  }

  .pagehead > nav > ul:focus {
    outline: none;
  }

  .repository-content > div.gutter-condensed > div.flex-shrink-0:first-child:not(.col-3):not(.col-md-3) {
    padding-right: 0 !important;
    padding-left: 0 !important;
    width: var(--max-width);
  }

  .repository-content > div.gutter-condensed .Box-header {
    border-color: var(--border-color);
    padding: 16px;

    background-color: #fafbfc;
  }

  .repository-content > div.gutter-condensed div.js-details-container.Details div.Box-row:not(:last-child) {
    box-shadow: inset 0 -1px 0 0 rgba(227, 233, 237, .5);
  }

  #readme > div.Box-header {
    color: #333;
    background: #fcfcfc !important;

    box-shadow: inset 0 -1px 0 var(--border-color);
  }

  .IssueLabel,
  .IssueLabel--big.lh-condensed {
    border-radius: 2px;
  }
`;

(function () {
  if (typeof GM_addStyle !== 'undefined') {
    GM_addStyle(customStyles);
  } else {
    let styleNode = document.createElement('style');
    styleNode.appendChild(document.createTextNode(customStyles));
    (document.querySelector('head') || document.documentElement).appendChild(styleNode);
  }
})();