[00:00:00] + // The toolbar layout is IE6 [00:00:02] Missing "broken in" ? [00:01:03] + if ( $.wikiEditor.supported != undefined ) { [00:01:39] As mentioned earlier, != undefined checks return errors in certain cases. Note sure when, but I think it's best to steer around this altogether and use typeof foo.bar != 'undefined' or 'bar' in foo [00:02:26] + * Provides a way to extract messages from objects. Wraps the gM function from js2stopgap.js, which will be changing [00:02:37] I thought it was no longer called gM() but mw.something() ? [00:03:15] Ooh autoLang() function is nice [00:05:18] good catches [00:05:25] that hasn't changed quite yet [00:06:27] + * Sets the complete contents of the iframe (in plain text, not HTML; HTML passed will be converted to entities) [00:06:29] + * FIXME: Passing in options like this is sort of akward - it appears to be a way to make this compatible with [00:06:32] + * the textSelection plugin - is this needed? [00:06:32] I agree, let's change that [00:06:53] i'm still sorting out what's going on with the code in the iframe now being broken [00:06:57] it's commented out right now [00:07:40] oooooh [00:07:43] should be -1 [00:07:51] i mean, the instance is being stored 1 too high [00:07:57] I thought so [00:08:05] The push() thing is nice but it increases the instance number [00:08:11] I knew this but I figured it wouldn't matter [00:08:25] And I was very obviously wrong: we're dealing with array indices ehre [00:09:32] ok - just commited a fix to that [00:09:52] but yeah, that push thing turned like 3 lines into 1 [00:10:17] Aye; I assume you were inspired by nimish_g there? [00:11:20] TrevorParscal: Oh BTW did you know that allegedly, 'table.templateInfo' is faster on older browsers? I heard that getElementsByClassName() is slow on those, and that's what jQuery uses if you pass '.templateInfo' [00:11:41] I'll benchmark it in Firefox 3.0 some time to see what the difference is in a modern browser [00:11:49] haha. yeah, don't forget if you do x = something.push(something_else); x--; [00:12:02] Yeah [00:12:44] nimish_g: About that, you seem to be using that in a few cases where it's not necessary. Like, you do x = arr.push( new Foo( 'bar', 'baz' ) ); x--; arr[x].blah='whee'; [00:13:00] So you create an object, insert it into an array, then manipulate it [00:13:18] While your code would be simpler and more readable if you manipulated it before pushing it [00:13:21] right and usually store x somewhere so I know what array element was manipulated, I think [00:14:00] Yeah but 1) you don't always need that info and 2) if you use it immediately after, that's unnecessary and less readable [00:14:09] I did spot cases in your code where you do need it [00:15:50] yeah, I think I did that so I'd remember that I'm accessing indicies and that this should be the 'preferred' way of doing it, but it's not necessary [00:48:43] nimish_g: I'm writing that wrap function, and I'm thinking about what should happen if it's impossible to cleanly wrap something [00:49:03] E.g. if you've got == Header {{screwyou == }} [00:49:38] Then that'll probably be transformed to
== Header {{screwyou ==
}} first [00:50:08] At which point it's impossible to wrap {{screwyou == }} because that would mean misnesting tags, something you can't do with DOM manipulation functions :) [00:50:21] I say the second wrap just fails silently in this case [00:59:54] TrevorParscal: Please read this comment on Yaron's rev and confirm I'm not crazy http://www.mediawiki.org/wiki/Special:Code/MediaWiki/59990#c4793