全屏版Github Trending

加强版Github Trending

As of 15.02.2023. See ბოლო ვერსია.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         全屏版Github Trending
// @license MIT
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  加强版Github Trending
// @author       twfb
// @match        https://github.com/trending*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant        none
// ==/UserScript==

function change(){
    document.querySelector('main div.Box').style="position: fixed;bottom: 0;left: 0;z-index: 999;width: 100vw;height: 100vh;overflow: scroll;padding: 0 10vw 0 10vw"
    let rows = document.querySelectorAll('.Box-row');
    for(let i=0;i<rows.length;i++){rows[i].style.width='26vw'}
    document.querySelector('main div.Box > div:nth-child(2)').style = 'display: flex;flex-wrap: wrap;'
}


(function() {
    'use strict';
    change()
    let currentPage = location.href;
    setInterval(function()
                {
        if (currentPage != location.href && location.href.includes('https://github.com/trending'))
        {
            currentPage = location.href;
            change()
        }
    }, 500);
})();