make it possible to get/set fragment prefix (#!, #?, #, etc) #55

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

The patch is pretty straightforward.
I apologize for not adding tests; perhaps I can recommend adding a "how to contribute" bit in the docs that will mention exactly how to run them.

Owner

rodneyrehm commented Dec 5, 2012

In this case I'd add a static property URI.default_fragment_prefix = '!' and import that on URI instantiation.

Pardon my weak JS, but won't that set the default for all future URI() instances? I thought it more elegant to make it configurable on a per URI basis, no?

Owner

rodneyrehm commented Dec 5, 2012

Well, yes. All I said was move the defaultPrefix variable onto URI so it is actually configurable. That allows you to configure once and use everywhere, while still being able to use some different prefix for specific URI instances...

Regarding the testing, just open the /test directory in your browser. the testing framework is QUnit. fiddle with it!

Right. I believe I made it as you suggested and added a couple of tests. I hope you'll choose to merge this; and thanks for URI.js!

Owner

rodneyrehm commented Dec 5, 2012

I added some comments to your latest commit. :)

Owner

rodneyrehm commented Dec 17, 2012

Have you given up on this?

Not at all, but then life happened, you know.
I'll try to get to it this week, there's really not that much to do.

@rodneyrehm rodneyrehm added a commit that referenced this pull request Dec 27, 2012

@rodneyrehm rodneyrehm adding `.fragmentPrefix()` to configure prefix of fragmentURI and fra…
…gmentQuery extensions - Issue #55
ec94d48
Owner

rodneyrehm commented Dec 27, 2012

This has been fixed and released in v1.8.2.
(Thank you for your effort!)

rodneyrehm closed this Dec 27, 2012

Thanks for wrapping this up and sorry I dropped the ball on ya... :)

Owner

rodneyrehm commented Dec 27, 2012

oh please… you were the reason this came up and I actually looked for good solution. both fragment abuse extensions were initially only meant to inspire custom implementations, not be used literally. I think that has changed now, thanks to you! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment