Fixt linting issues on social-media.js file #129

wants to merge 1 commit into


None yet

3 participants

dseif commented Aug 22, 2012

Were using this script in Popcorn Maker and lint complained about the lines I touched so I fixed them. If your interested in the fixes, here they are!

@Pomax Pomax commented on the diff Aug 27, 2012
@@ -22,8 +22,8 @@ define(function() {
// Facebook needs additional help, because it needs
// to be told that it has to refresh its button, rather
// than simply reloading.
- if (typeof(FB) === "object" && FB.XFBML && FB.XFBML.parse) {
- FB.XFBML.parse();
+ if (typeof(window.FB) === "object" && window.FB.XFBML && window.FB.XFBML.parse) {
Pomax Aug 27, 2012 Contributor

default scope should already be window, so we can either leave window. prefixes off, or if we want to be explicit about scope, we'll can add window as a function argument and make sure it's passed in properly.


Thanks, dself. We don't currently enforce the "always use brackets" rule for single-line if statements (I personally am ambivalent about that one, as I find that excessive brackets reduce readability), and I also don't feel strongly about the use of the window explicitness here, so I think we'll pass on this for now.

In the future though, I think we should adopt jslint wholesale and ensure all our code complies with some subset of its rules, so I've created #168 to address that.

@toolness toolness closed this Jan 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment