Make GitHub Pull Request, Commit, and Blob pages full width

Makes the GitHub Pull Request, Commit, and Blob pages span the full width of the browser, rather than maxing out at the default.

23.06.2020 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name           Make GitHub Pull Request, Commit, and Blob pages full width
// @namespace      https://bitbucket.org/deadlydog/greasemonkeyscripts
// @description    Makes the GitHub Pull Request, Commit, and Blob pages span the full width of the browser, rather than maxing out at the default.
// @include        https://github.com/*/pull/*
// @include        https://github.com/*/commit/*
// @include        https://github.com/*/blob/*
// @grant          none
// @version        1.2.0
// ==/UserScript==

function large() {
    elements = document.getElementsByClassName('container-lg');
    for (index = 0; index < elements.length; index++)
    {
    	elements[index].style.maxWidth="95%";	// Only 95% to leave room for the "add comment" tooltip icon.
    }

    elements = document.getElementsByClassName('container-xl');
    for (index = 0; index < elements.length; index++)
    {
    	elements[index].style.maxWidth="95%";	// Only 95% to leave room for the "add comment" tooltip icon.
    }
}
large();

var observer = new MutationObserver(large);

observer.observe(document.body, {
  childList: true
});