MediaWiki talk:MwEmbed.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Not working in Opera[edit]

The javascript from MediaWiki:MwEmbed.js for the subtitles does not work in Opera for File:FelixTheCat-1919-FelineFollies silent.ogv. It works for files that have Timed Text from earlier, so I suspected a caching problem. But a few days later the Felix video still displays only the first caption. See Commons:Village pump#Video files and subtitles. -84user (talk) 13:28, 4 April 2011 (UTC)[reply]

no response from prototype.wikimedia.org[edit]

This tries to run

 importScriptURI( 'http://prototype.wikimedia.org/mwe-gadget/mwEmbed/remotes/mediaWiki.js?uselang=' + wgUserLanguage );

but there's no more http://prototype.wikimedia.org ?? -- S Page (WMF) (talk) 07:21, 26 October 2013 (UTC)[reply]

change url[edit]

{{Editprotected}}

Could this be changed to:

importScriptURI( '//tools.wmflabs.org/sequencer/mwEmbedStandAlone/remotes/mediaWiki.js?uselang=' + mw.config.get( 'wgUserLanguage' ) );

So that sequence namespace things sort of work again (I say sort of because the code is bit rotted, and buggy. But if you use http (not https) it does sort of work). At the very least it will work more than when it tried to fetch from the no longer existing prototype.wikimedia.org Bawolff (talk) 04:23, 10 June 2014 (UTC)[reply]

Thank you but performing a search in MW and user namespace, it appears that this isn't in use by anything anymore. Can you confirm? -- Rillke(q?) 21:29, 17 June 2014 (UTC)[reply]
@Rillke: Its used by things in the Sequence namespace (e.g. Sequence:Cats), in theory, sort of. The code is a bit bit rotted, and quite buggy. The only reason I was playing with it was I wanted to see if it still worked at all (Which it does). Bawolff (talk) 21:20, 25 June 2014 (UTC)[reply]
@Bawolff: Please embed it in the script resources here on Commons. Loading it from Tool Labs only makes it slower (extra http request) and insecure as the owner of that tool now effectively has full account access to all readers and users (including sysops) of Wikimedia wikis (not just Commons, since they auto-login here). I've commented it out for now.
If this is only one file (it doesn't seem to have a reference to itself), you can probably just copy/paste that one file to here. –Krinkletalk 16:07, 1 July 2014 (UTC)[reply]
I agree we should see if we can deprecate this in favour of something else (if there isn't a replacement already). This code is dated. –Krinkletalk 17:00, 1 July 2014 (UTC)[reply]
i was mostly just curious if it still worked, and the dead links made me sad. I agree its seriously dated and bitrotted. I personally have no interest in redoing it. Im not sure the security implications are quite that bad - this page is not automatically loaded for anyone, still js on toolserver is not what i would consider good (about as bad as js on prototype). nevermind - an attacker obviously just has to get the victim to load a page with a specific url parameter which is pretty easy Bawolff (talk) 22:58, 5 July 2014 (UTC)[reply]
p.s. this is significantly more than one file. Bawolff (talk) 23:00, 5 July 2014 (UTC)[reply]