github-activity
github-activity copied to clipboard
Allow user to be set in url on gh-pages
I often found I wanted to look through my history using this but would search every-time.
I wanted to be able to do something like this:
https://kirkins.github.io/github-activity/?user=kirkins
So I figured I'd send a pull request. Though I realize this may just be adding an unneeded feature to something meant to be an mvp.
Best, Philip
P.S. I'm only changing the gh-pages branch not modifying the base library like the other open pull-request.
Just a suggestion, you could use:
var parsedUrl = new URL(window.location.href);
var username = parsedUrl.searchParams.get('url');
And then use if statements to put in the default
PS: https://github.com/colmdoyle/gh-activity supports this: https://cdoyle.me/gh-activity/gh-activity.html?user=ypid&type=user :)
I like this idea a lot. I think it could be implemented a little more cleanly using @turquoise-turtle's solution.