Skip to content

jqueryui.com issue #94 #350

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

Closed
wants to merge 4 commits into from
Closed

jqueryui.com issue #94 #350

wants to merge 4 commits into from

Conversation

ashg1910
Copy link
Contributor

No description provided.

@@ -356,6 +356,12 @@ $(function() {
plugin = parts[ 3 ],
demo = parts[ 4 ].substring( 0, parts[ 4 ].length - 5 );

var str1 = "default";
var str2 = "effect";
if ( demo.localeCompare(str1) == 0 && plugin.localeCompare(str2) == 0 ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fairly roundabout way to do this check, why not just plugin === "effect" && demo === "default"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this would be easily understandable to others

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much less understandable than the direct comparison.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I change it to plugin === "effect" && demo === "default"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deffinitly direct comparison lets not obfuscate this by using locale.

@ashg1910
Copy link
Contributor Author

@scottgonzalez Did the final thing

@@ -341,7 +341,7 @@ $(function() {
/*
* jqueryui.com
*/
$(function() {
$(function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra whites space at end of line. No need to change this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arschmitz sorry that was by mistake :P

@scottgonzalez
Copy link
Member

Thanks, but while reviewing this I found a better solution that doesn't require hard-coding exceptions into the script.

@ashg1910
Copy link
Contributor Author

@scottgonzalez What is that?

@scottgonzalez
Copy link
Member

You can see it in the commit that closed this PR: 0196a65

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

Successfully merging this pull request may close these issues.

4 participants