GitHub Diff Expander

A userscript that adds more diff code expanding buttons

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

Δημιουργός
Mottie
Ημερήσιες εγκαταστάσεις
0
Σύνολο εγκαταστάσεων
31
Βαθμολογίες
2 0 0
Έκδοση
0.1.5
Δημιουργήθηκε την
09/06/2018
Ενημερώθηκε την
17/02/2024
Μέγεθος
6 KB
Άδεια
MIT
Εφαρμόζεται σε

A userscript that adds more diff code expanding buttons

  • Without this userscript, the code expanders on a diff page work by expanding code blocks up, except for the last expander.
  • With this userscript:
    • More expander buttons are added that will allow expanding the code in either direction.
    • Included with every expander button is the range of code lines, for the left column, that it will load.
  • Limitations & confusing points:
    • GitHub's server will return a maximum of 20 lines of code.
    • Because diffs have before and after line numbers, it would be difficult to show the range of both columns due to alignment and space limitations. This userscript will only show the "before" diff line number range (left column).
    • Overlapping ranges may cause confusion. In this screenshot, the top expander will load the code for lines 21 to 40, while the bottom expander will load lines 34 to 53. Once the expander is clicked, the range will adjust.
    • Within each file, the range shown in the last expander will start with the next left column line number, but end with the maximum line number for either the left or right column. This is due to the range provided by the expander link.
BeforeAfter
before after

Hosted with ♥ at GitHub