Thread:User talk:Kephir/Template:catfix gadget improvements

I've been trying to find which JavaScript controls this, but I couldn't find it so maybe you can help.

Currently, the gadget doesn't work right for many pages. It should only apply its changes to pages that are either in the main namespace or, if in the Appendix namespace, have a name beginning with the language name plus /. Furthermore, it doesn't work at all with non-Latin scripts, because the text that has detection applied to it is simply &amp;nbsp;, which of course only contains Latin characters. I'm not sure if there is a way around this. Ideally, the script would be detected for each individual entry in the category, but I don't know how feasible that is.