sindresorhus/refined-github

Link to gh.com repo/user from .io page. #4212

jtagcat posted onGitHub

There's a surprising number of persons whom have a project page, but it doesn't link to the repo.

When at username.github.io/projectname, link to github.com/username/projectname.

Implementation is not straightforward.
First, I'd be against modifying the .io page. The add-on has toolbar presence (currently opens gh.com when opened). It could be used to instead open the repo/user page.

projectname isn't always available on github.com. Checking, if it's 404 should direct the user to github.com/username instead. Not sure, what's the best way to check, and what to do, when checking fails/isn't available.


This is tough because it requires UI either on the page (👎) or as a browser icon context menu (so undiscoverable) + it requires adding a *.github.io permission, which disables the extension for everyone.

I don't think it's worth it. The same could be achieved by manually selecting .io/ in the URL bar, pressing <kbd>space</kbd> and then <kbd>enter</kbd>

posted by fregante almost 4 years ago

I know that .com is supposed to be appended (changing it to username.github.com/projectname, what is invalid), doesn't work for me.

Since I do the shuffling around quite often (change .io to .com, move username to path), I guess it'd be another, separate add-on.

Thanks for your time.

posted by jtagcat almost 4 years ago

I remember seeing some extensions that do this, but they are really old. Perhaps still work, I don't know.

But I have a userscript for this use case: https://github.com/kidonng/cherry/blob/master/scripts/README.md#pages-source

posted by kidonng almost 4 years ago

I like that idea, I was actually going to suggest that.

There's an extension that does that: https://chrome.google.com/webstore/detail/github-pages-view-source/eboipoomjlbpkfmmiicfgmclghepgbbk

However, it would be nice to add in the context menu.

posted by leocaseiro almost 4 years ago

There's an extension that does that: https://chrome.google.com/webstore/detail/github-pages-view-source/eboipoomjlbpkfmmiicfgmclghepgbbk

Yeah, I was referring to this one.

However, it would be nice to add in the context menu.

Doesn't it still require the *.github.io permission, so the statements above still apply?

This feature is (IMO) slightly going out of scope for Refined GitHub, but it can be easily solved via existing solutions (like the extension and user script). If you want something unobtrusive, perhaps we can turn the user script into a bookmarklet and use it instead.

posted by kidonng almost 4 years ago

Gonna bring it out here as well, while we at it. https://github.com/kidonng/cherry/issues/14

posted by jtagcat almost 4 years ago

Fund this Issue

$0.00
Funded

Pull requests