John Resig annotates original jQuery source code
71–80 of 102 posts
Re: John Resig annotates original jQuery source code
#72Anyone knows if there are outdated sites that still using early versions of jQuery? =))
Re: John Resig annotates original jQuery source code
#73What 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…
Also with all my respects to mr. Resig, but this is not really code to learn from. It's full of bad habits and it's hard to read. Poorly named, mostly uncommented and pretty hacky. Not really judging, it was just a bunch of handy hacks he had for personal use. Another reason it's hard to follow is of course: writing a CSS selector is not a trivial task, and that with all the browser quirks workarounds. I'm sure getti…
Re: John Resig annotates original jQuery source code
#74Earlier quoted context omitted.
The main difference between Genius-style annotation and code comments, which I think is important to note (and valuable) is that code comments annotate a point or position in the source, while genius annotations are referring to a span or range in the source.
Well, I think the idea is sound. I'm even into Hip-Hop/Rap, so I should like them. Unfortunately the user interface is a world of pain. It's unusable. It's worse than quora. Good idea, but the execution needs work.
Re: John Resig annotates original jQuery source code
#75Anyone 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.
Let us know this'd be very helpful! tom@genius.com
Re: John Resig annotates original jQuery source code
#76 if ( !b )
for ( var j in a )
this.style[j] = a[j];
else
this.style[a] = b;
I really dis-liked having unnecessary braces. This… unfortunate… style preference plagued us for quite a while and caused all sorts of avoidable logic errors.I really wish this kind of coding was removed completely from some languages.
Re: John Resig annotates original jQuery source code
#77Earlier quoted context omitted.
This formatting style for annotated sources always seems to work so well: http://robflaherty.github.io/jquery-annotated-source/docs/01...
Strangely, the "default" Genius UI seems to be more or less the two column view - e.g., http://genius.com/1258740/Walt-whitman-song-of-myself/I-cele... Is this intentionally divergent or is it some kind of bug?
Re: John Resig annotates original jQuery source code
#78Very 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 formatting style for annotated sources always seems to work so well: http://robflaherty.github.io/jquery-annotated-source/docs/01...
Re: John Resig annotates original jQuery source code
#79Jake: 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.
Elaine: I just thought you would be a little more excited about a friend of mine having a baby.
Jake: Ok, I'm excited. I just don't happen to like exclamation points.
Re: John Resig annotates original jQuery source code
#80Anyone 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.
This is a sandboxed domain, like googleusercontent, so not a bug. XSS on genius.com would be a vulnerability.