-
Notifications
You must be signed in to change notification settings - Fork 616
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
added ability to remove a JSON prefix if sent #22
Conversation
function stripJsonPrefix(text) { | ||
// Some implementations return a JSON_PREFIX to help avoid | ||
// allowing your JSON replies to be turned into JSONP replies. | ||
var JSON_PREFIXES = [")]}', ", ")]}',\n"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other prefixes commonly used, like "for(;;);" and "while(1);" (this one by Google).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's great! that's why I made it an array for people to add more to. I hadn't heard of the ones you posted.
The ones I included were from AngularJS's notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have a box on the options for the extensions to enter custom prefixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if this pull request were accepted so I don't need to run my own version of JSONview... :-/
until that happens or anyone takes any interest in this pull request I'm not likely to dedicate any extra effort to it.
In the mean time, could you explain/point to how to integrate this with a local version? |
@AncientSwordRage it seems to be taking forever for the chrome store to approve publishing my patched version of this extension. So you can do it locally. check out my version into a directory on your machine:
in chrome open tools->extensions turn on developer mode (top right) and then click the and you should be good to go. make sure to turn off the installed version you already have. |
@arkarkark I'm getting |
then try the WebContent directory (which has a manifest.json file in it) On Thu, Feb 26, 2015 at 2:03 AM, AncientSwordRage [email protected]
|
@arkarkark yeah that works! 👍 |
Thank you, I added an option called "Regular expression for removing JSON prefix". It will be available in the version 0.1.14. |
this is a fix for issue21 I filed a couple of days ago.
#21