TabbedLanguages rewrite

[[γ]] is broken because it is miscategorized. Letters of a script are supposed to have "Category:X script characters", not "Category:X script". Apparently all the Greek characters are similarly miscategorized. This isn't related to the rewrite; those entries were having their categories misplaced before as well.

Regarding AJAX preview: I've fixed the issue that was causing the language tab buttons to malfunction. I haven't noticed any other issues.

I've actually used MutationObservers before, but I didn't know that they could be used to detect when new elements are loaded onto the page. Fascinating. I've changed the script to use those instead. Thanks.

I notice that you changed MediaWiki:Gadgets-definition so that TL isn't loaded from the top, with the summary "seems to cause problems". Which problems specifically are you referring to? As you probably gathered, having the script run before/while the content loads was the entire point of the rewrite, so fixing the issues blocking top-position deployment are high priority for this script.

Yair rand (talk)20:38, 1 July 2014

"TypeError: bodyContent is undefined". I think you might have already fixed it, though.

As for categories… I looked at the script and I cannot gather why sortCats() is supposed to work in the first place. Can you explain the intent behind it to me?

The miscategorisation was done by {{Greek character info}} and ultimately {{character info}}, of which I just edited the former; I could also "fix" it by replacing it with {{character info/new}} which currently does not apply any categories at all. Not sure what should be done about it, really.

Keφr21:02, 1 July 2014

I'm not sure what you mean by the intent regarding sortCats... The function goes through the categories placing them into language sections, moving on to the next language section if the category name begins with the name of the next section's language, except if the category also matches /letter\snames$|script\scharacters$|mythology$/, which, afaik, covers all the exception categories that start with language names without being related to the language. (Example: "Category:Greek script characters" begins with "Greek" but doesn't indicate the start of a Greek section.)

Yair rand (talk)21:48, 1 July 2014

…and the categories are guaranteed to be in the order in which they are rendered on the page? In that case, I need no further explanation.

Keφr21:55, 1 July 2014
 

I fixed one bug that was causing a "TypeError: bodyContent is undefined" within ten minutes of the original deployment. Is it possible that this was the bug you saw? If so, any objections to re-adding [top]?

Yair rand (talk)00:13, 2 July 2014

No, I think we can re-enable it now.

Keφr03:35, 2 July 2014

Hmm, there still seem to be some funky interactions between this rewrite and live preview. It looks like the JavaScript does not even run sometimes.

I suggest you better revert to the old version, develop the rewrite in WT:JSSAND (install w:User:Kephir/gadgets/jssand.js beforehand) or as a browser user script, test it thoroughly and then deploy.

Keφr10:35, 2 July 2014

I seem to be getting a lot of script timeouts now. Could this be related?

CodeCat13:43, 2 July 2014

I thought for a while that it is either this or my OrangeLinks rewrite, but now I suspect that this is MediaWiki acting up. We have had an update recently, and I vaguely remember similar problems on previous update… they might have downgraded libraries to alleviate that. Or something like that. I cannot really recall the details.

Keφr17:13, 2 July 2014