1

When GitHub displays the content of a directory, it first shows an index of the files in the directory and then, if available, the content of an optional README.md file. This of course means that one has to scroll down in the README.md file until he or she sees the README.md's content. I find this a bit annoying as I'd rather see the README.md first.

So, is there a way to change GitHub's default behaviour so that the README.md is shown atop of the directory listing?

1 Answer 1

1

This will do it.

$('#readme').insertBefore('.file-navigation'); 

If you're using Chrome, you could create a button or extension that does that automatically when loading GitHub.

2
  • If I put this line into the README.md file, it will be displayed verbatim (as I'd actually expect). Commented Jul 9, 2015 at 14:32
  • No, I don't mean copying the code into the repo. That will just render it as text on the screen. I mean to create an extension in Chrome or FF to run that code when it detects you're in a repo. There are countless tutorials on the web to show you how to create extensions. Commented Jul 9, 2015 at 20:55

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.