github-activity icon indicating copy to clipboard operation
github-activity copied to clipboard

Allow user to be set in url on gh-pages

Open kirkins opened this issue 7 years ago • 4 comments

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

kirkins avatar Mar 11 '17 01:03 kirkins

P.S. I'm only changing the gh-pages branch not modifying the base library like the other open pull-request.

kirkins avatar Mar 11 '17 01:03 kirkins

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

turquoise-turtle avatar Apr 30 '18 05:04 turquoise-turtle

PS: https://github.com/colmdoyle/gh-activity supports this: https://cdoyle.me/gh-activity/gh-activity.html?user=ypid&type=user :)

ypid avatar May 21 '18 11:05 ypid

I like this idea a lot. I think it could be implemented a little more cleanly using @turquoise-turtle's solution.

caseyscarborough avatar Jun 18 '21 02:06 caseyscarborough