Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a feature detector #28

Open
mjaschen opened this issue Jul 17, 2015 · 0 comments
Open

Add a feature detector #28

mjaschen opened this issue Jul 17, 2015 · 0 comments

Comments

@mjaschen
Copy link
Owner

It's often needed to know which is the current page, is the user logged in or not, or has the user a premium account.

I suggest a feature detection routine to avoid scattering of detection code around the extension modules. The feature detection will enumerate all needed information and adds classes to the page's element:

<html class="strava-helper-is-logged-in 
    strava-helper-is-premium 
    strava-helper-has-kudos-buttons
    strava-helper-page-profile 
    strava-helper-page-own-profile">
...
</html>

The legendary Modernizr library does it in a similar way so it seems to be a good practice.

@saesh saesh self-assigned this Jul 25, 2015
@saesh saesh removed their assignment Nov 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants