github-url-detection 
Which GitHub page are you on? Is it an issue? Is it a list? Perfect for your WebExtension or userscript.
Install
npm install github-url-detection
import * as pageDetect from 'github-url-detection';
const pageDetect = require('github-url-detection');
Usage
if (pageDetect.isRepo()) {
alert('You’re looking at a repo!')
}
if (pageDetect.isDiscussionList()) {
alert('You’re looking at a issues and PRs list!')
}
In the source you can see the full list of detections and their matching URLs.
License
MIT © Federico Brigante