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

Relax script detection #24

Merged
merged 1 commit into from
Mar 18, 2020

Conversation

christopher-stripe
Copy link
Contributor

Fixes #14

Tweaks the logic for detecting whether Stripe.js has already been loaded.

Previously it would expect Stripe.js to be loaded without a trailing slash on the URL (https://js.stripe.com/v3).

Now it will detect the script either with or without a trailing slash appended to this URL (https://js.stripe.com/v3 or https://js.stripe.com/v3/).

@hofman-stripe
Copy link
Contributor

@dweedon-stripe and I were thinking of using the "starts with" [attr^=value] selector to support other future entrypoints.

@christopher-stripe christopher-stripe merged commit 5fca6c4 into master Mar 18, 2020
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

Successfully merging this pull request may close these issues.

Loosen script src detection
3 participants