You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extract all page detection checks to a new file #120
We could extract all code related to page detection in a new file and expose a simple interface for them. This includes URL checks mostly using the latest location, but some DOM checks as well.
I wonder if we might want to go one step further. Maybe pop this out into a npm module and we can just import it. This would be a useful utility for anyone regex-ing their way around GitHub. Thoughts?
Wish Chrome had native support for ES2015 modules...
Maybe pop this out into a npm module and we can just import it. This would be a useful utility for anyone regex-ing their way around GitHub.
That's a good idea, but let's wait with that until we're a bit more stable. Having to bump a version on that every time we need a new route will be annoying.
Wish Chrome had native support for ES2015 modules...
Using a package would change the workflow for this repo, and I don't know if it's worth it when the package in question is copying out stuff we have here already.
Having to bump a version on that every time we need a new route will be annoying.
True, but the package is going to diverge at some point. This extension will check for URLs specific to our use case, and won't have useful URLs that we simply don't need. For example, we don't have any need to check if we're on the settings page, but someone else might want to know that.
Activity
paulmolluzzo commentedon Mar 30, 2016
I wonder if we might want to go one step further. Maybe pop this out into a npm module and we can just import it. This would be a useful utility for anyone regex-ing their way around GitHub. Thoughts?
sindresorhus commentedon Mar 30, 2016
Wish Chrome had native support for ES2015 modules...
That's a good idea, but let's wait with that until we're a bit more stable. Having to bump a version on that every time we need a new route will be annoying.
paulmolluzzo commentedon Mar 30, 2016
Using a package would change the workflow for this repo, and I don't know if it's worth it when the package in question is copying out stuff we have here already.
True, but the package is going to diverge at some point. This extension will check for URLs specific to our use case, and won't have useful URLs that we simply don't need. For example, we don't have any need to check if we're on the settings page, but someone else might want to know that.
hkdobrev commentedon Mar 30, 2016
We can extract first, see it works properly, maintain for a bit to see how often it changes and then move to a separate repo.
paulmolluzzo commentedon Mar 30, 2016
👍 Works for me.
Move page detection checks to a separate file
Move page detection checks to a separate file
Move page detection checks to a separate file
Move page detection checks to a separate file
Move page detection checks to a separate file