Skip to content

Extract all page detection checks to a new file #120

Closed

Description

@hkdobrev

As per this discussion in #99 (comment).

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.

Activity

  1. added
    meta
    on Mar 30, 2016
  2. paulmolluzzo commented on Mar 30, 2016

    @paulmolluzzo
    Contributor

    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?

  3. sindresorhus commented on Mar 30, 2016

    @sindresorhus
    Member

    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.

  4. paulmolluzzo commented on Mar 30, 2016

    @paulmolluzzo
    Contributor

    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.

  5. hkdobrev commented on Mar 30, 2016

    @hkdobrev
    ContributorAuthor

    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.

  6. paulmolluzzo commented on Mar 30, 2016

    @paulmolluzzo
    Contributor

    👍 Works for me.

  7. self-assigned this
    on Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

meta

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions