MediaWiki talk:Common.js

Shared Anime-Common js
Since Wikia has updated to MW1.19 now, shouldn't we now be using ? I know it won't make a big difference as such but why not?—
 * No. This stuff isn't available through modules. And for absolute urls there isn't much advantage. ~ Daniel Friesen (DanTMan, Nadir Seen Fire) (Local Talk &#8285; Animanga Talk) 08:21, November 4, 2012 (UTC)
 * importScriptURI is part of the mediawiki.legacy.wikibits module, as implied by the "legacy" part, that's going to disappear eventually. mw.loader is part of the mediawiki module so it isn't going anywhere.
 * You could use $.getScript instead as well.—


 * It actually sounds more like importScriptURI may stay around longer than wikibits. In any case wikibits will stay around longer than js wg globals will. And importScriptPage style functions don't exist in any other form. ~ Daniel Friesen (DanTMan, Nadir Seen Fire) (Local Talk &#8285; Animanga Talk) 06:48, November 5, 2012 (UTC)
 * O.o
 * importScriptPage is Wikia specific. That's being replaced by importArticles. importScript currently has no replacement since the MW devs seem to be stuck in a "perfect solution is just over the hill" mindset that prevents them from actually fixing ResourceLoader, but importScriptURI is already replaced by mw.loader.load so that may go away even though importScript probably won't for a while. (importScript/importScriptPage are very simple functions, modifying them to use mw.loader internally would be easy and would completely remove the need for importScriptURI)

wikibits actually has a control flag on the server (mw:Manual:$wgIncludeLegacyJavaScript) which can be switched off to remove it. It will probably be a few years before it's off by default then a bit more before Wikia turn it off as well though. Deprecations list is here: ResourceLoader/JavaScript Deprecations.—

Bump.—
 * I don't really get coding, but if you want a reply from Dantman, I think you'll have better luck if you contact him directly, either through his talk page or through the email user feature. Omnibender - Talk - Contributions 20:37, November 14, 2012 (UTC)

How else do you think he was replying to the above messages ;)? ~ Ultimate  Supreme  03:39, January 1, 2013 (UTC)

Broken jquery
It should be noted that the jquery to make the "Add a Photo" button go to Special:Upload, instead of a popup, does not work any longer. I have no idea why it's not working, but just thought it should be brought to the attention of someone who can solve this. --SuperSajuuk Talk Page 21:23, August 12, 2014 (UTC)
 * Even though Brandon said a while back that it was completely fine; I don't see why the wikia devs seem to be determined to make it difficult for us...--~Ultimate Supreme  13:22, August 13, 2014 (UTC)
 * Haha, it's annoying when things break for no reason at all :/ --SuperSajuuk Talk Page 13:49, August 13, 2014 (UTC)

'Add a photo' override
This part was recently brought to our attention, and I have had to remove this section from the JS, as this goes against our Term of Use (for blocking Wikia functionality). We are improving how image uploading is dealt with in the new VisualEditor - for example, the VE media tool includes a customizable section to provide a notice to users, and we are continuing to work on it further. For now, however, this code remains outside our rules - sorry. Do feel free to send us feedback or concerns via Special:Contact.

Regards, Kirkburn (talk) 19:45, September 10, 2014 (UTC)


 * The wikia has never had any problems with this particular code snippet in the past and removing it is only going to cause us problems with uploads to this wiki, considering the wiki's nature. This isn't blocking any Wikia functionality, as your popup uploader ignores the wiki's localised uploader script changes and allows users to violate our Image policy very easily.
 * As clearly stated above, Brandon Rhea had no issues with the code snippet so he obviously assumes this isn't breaking any of your policies.
 * Also, the button doesn't affect your visualeditor either, it just affects a button on the side rail on articles, so I don't even know why this is a problem. --Sajuuk Talk Page 14:01, September 25, 2014 (UTC)
 * I don't recall ever saying that (and would like to know where I did). If I did, I was incorrect. The override is a violation of our Terms of Use. Proper Wikia functionality allows for the "Add a Photo" option, and overriding it disrupts that functionality. This is a stance we have maintained on multiple wikias when this issue has come up. I understand your concerns regarding your local policies, and Kirkburn did say that we are improving image uploading to factor in local licensing policies, but this is a stance that we won't be changing. I would encourage you to factor that into your policy enforcement. - Brandon Rhea (talk) 14:02, September 25, 2014 (UTC)
 * @Brandon: When the previous version of the code that Kirkburn was removed, I queried it above this topic and UltimateSupreme states there that you were fine with it (I would assume he talked about it via S:C first before implementing). There has never been an issue with this code snippet in quite a while, only when the code gets broken by updates. --Sajuuk Talk Page 14:05, September 25, 2014 (UTC)
 * When we say it disrupts functionality, we're not saying it causes a technical problem. It doesn't create a bug. It blocks part of the interface, i.e. the "Add a Photo" button, from working as intended. That's what we mean when we say functionality. - Brandon Rhea (talk) 14:10, September 25, 2014 (UTC)


 * Right, it was an S:C request (Request #60156). The exact response was:
 * "We do not consider this a violation of the Terms of Use, though we don't encourage it either. I would encourage you to keep the functionality of the in-editor pop up."
 * and then after asking for a confirmation:
 * "As I said, while it is not a TOU violation, I encourage you to keep the functionality of the in-editor pop up."
 * And as SuperSajuuk said, our Image Policy requires images to be tagged (well, not just the fairuse but also some smw attributes (Character in image and Jutsu in image) so it would be easier to search for images and some other goodness...)
 * So, I guess we would have to make some workarounds like all the major wikis around.--~Ultimate Supreme  18:02, September 26, 2014 (UTC)
 * Hopefully Wikia will relent now you've provided proof that the code violates no policies at all. ;) --Sajuuk Talk Page 12:45, September 29, 2014 (UTC)