14 points · by aliqot · 4y ago · 9 comments
async function handleRequest(request) {
const requestUrl = new URL(request.url);
let target = "https://github.com/theowenyoung?tab=repositories"
if(requestUrl.pathname!=="/"){
target = "https://github.com/theowenyoung"+requestUrl.pathname
}
return Response.redirect(target, 302);
}
addEventListener('fetch', async event => {
event.respondWith(handleRequest(event.request));
});
[0]: https://git.owenyoung.comRight click the omnibar.
The answer to OP's question is that there is no plugin for this, there is a URL for this. If they type in "github.com" in their browser that is what they will get, but if they bookmark the page they want to go to (or select it enough times among the address bars' suggestions) it will automatically become the first suggestion for "git<enter>". A surprising Ask HN indeed.
Or use this GreaseMonkey script:
if(window.location.href == 'https://github.com/') {
window.location.href = 'https://github.com/aliqot?tab=repositories';
}