I'm sorry, but this has to be said. This guy loves exclamation points! Almost every paragraph features one. It reminds me of a great Seinfeld episode: Jake: Well, maybe I don't use my exclamation points as haphazardly as you do. Elaine: You don't think that someone having a baby warrants an exclamation point. Jake: Hey, I just chalked down the message. I didn't know I was required to capture the mood of each caller.…
John Resig annotates original jQuery source code
81–90 of 102 posts
Re: John Resig annotates original jQuery source code
#82Anyone else already find the XSS in genius.it? Edit: wow, the whole thing is seriously broken. Emailing them now. Edit 2: It's not as broken as I thought, and these guys are quick to reply and try to figure things out. To be clear, I haven't gotten it to run arbitrary JS, just include arbitrary HTML, which isn't as dangerous.
How is including arbitrary html not as dangerous, when arbitrary html also means tags?
Re: John Resig annotates original jQuery source code
#83Re: John Resig annotates original jQuery source code
#84Re: John Resig annotates original jQuery source code
#85Very neat content, but does it have to be formatted like this? I respect that it preserves the original file, but it makes it very difficult to read. Comments added to the source code would serve much better for the purposes of understanding the code. This tool makes it impossible to read the annotation and the source code at the same time. Clicking on 'set' for example, about 20-30 lines in, lets you read the annota…
This looks like an ad for Genius, though, so that'd be why.
Re: John Resig annotates original jQuery source code
#86Earlier quoted context omitted.
If it's supposed to be an ad for Genius, it's a pretty lousy one, in my opinion. Half of the time I click on a highlighted line, it opens the annotation and then scrolls away, so I can't see it. It's pretty frustrating. And the "view on Genius" link redirects to the top-level Genius.com page, which just makes me sigh and close the window.
Doesn't matter. People will be like "Oh! John Resig uses Genius! Looks like that's actually real software for the cools guys, not some stuff nobody uses." Usability is optional for that.
Re: John Resig annotates original jQuery source code
#87What surprises me is the lack of comments in the original file. This leads to e.g.: this._get(i).$$tmpFunc = f; this._get(i).$$tmpFunc(i); this._get(i).$$tmpFunc = null; with the comment (from now): So this may look crazy — it certainly does to me! Why not just do: f.call(this._get(i))? If I remember correctly, and I just did some double-checking and I think this is the case, but IE 5 didn’t support .call()! The orig…
Absolutely agreed - comments are so important! Seemingly when I was working on jQuery alone and without much feedback I was totally fine just having no comments. I noticed that in the subsequent releases of the code that the number of comments quickly rose - likely as people started to use the library I felt bad that the code was so poorly explained!
// Arrrrghhhhhhhh!!
// I overwrote the event plugin's .load
// this won't happen again, I hope -John
BTW, do you know what happened to Dean Edwards. He was doing some really interesting work around the same time as you.Re: John Resig annotates original jQuery source code
#88I'm sorry, but this has to be said. This guy loves exclamation points! Almost every paragraph features one. It reminds me of a great Seinfeld episode: Jake: Well, maybe I don't use my exclamation points as haphazardly as you do. Elaine: You don't think that someone having a baby warrants an exclamation point. Jake: Hey, I just chalked down the message. I didn't know I was required to capture the mood of each caller.…
That's just negation in JS.
Re: John Resig annotates original jQuery source code
#89Earlier quoted context omitted.
Absolutely agreed - comments are so important! Seemingly when I was working on jQuery alone and without much feedback I was totally fine just having no comments. I noticed that in the subsequent releases of the code that the number of comments quickly rose - likely as people started to use the library I felt bad that the code was so poorly explained!
I still have 0.3 in my code base, and there are some gems like: // Arrrrghhhhhhhh!! // I overwrote the event plugin's .load // this won't happen again, I hope -John BTW, do you know what happened to Dean Edwards. He was doing some really interesting work around the same time as you.
Re: John Resig annotates original jQuery source code
#90Earlier quoted context omitted.
How is including arbitrary html not as dangerous, when arbitrary html also means tags?
I'm not sure what exactly he's referring to, but annotations allow you to use markdown and some (limited, heavily sanatized and whitelisted) html, so that could be what he was talking about.