From: ScottDowne Date: Wed, 13 Oct 2010 16:04:10 +0000 (-0400) Subject: fixed wiki command coming from universal subtitles X-Git-Tag: v0.1~23 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=3980d815927a5368289ebdd7f021d040b79f68f9;p=popcorn-js.git fixed wiki command coming from universal subtitles --- diff --git a/popcorn.js b/popcorn.js index 1e10d18..3eb16f0 100644 --- a/popcorn.js +++ b/popcorn.js @@ -807,12 +807,6 @@ Popcorn.WikiCommand = function(name, params, text, videoManager) { Popcorn.VideoCommand.call(this, name, params, text, videoManager); - //L10n - var src = this.params.src; - var lang = this.params.lang; - if (typeof lang === "undefined") { lang="en"; } - //end L10n - // All data from Universal Subtitles comes from the text attribute // so the data from that needs to enter the appropriate fields if (typeof text === "string" && text !== "") { @@ -820,8 +814,13 @@ // Universal Subtitles has no target attribute, so we create a default this.params.target = "wikidiv"; } - - var length = this.params.numberOfWords || 200; + + //L10n + var src = this.params.src; + var lang = this.params.lang; + if (typeof lang === 'undefined') {lang="en";} + //end L10n + var length = this.params.numberOfWords; // Setup a default, hidden div to hold the images var target = document.createElement('div'); target.setAttribute('id', this.id); @@ -846,7 +845,7 @@ target.appendChild(link); target.appendChild(desc); } - }); + }); this.target = target; this.onIn = function() { @@ -1021,7 +1020,7 @@ return new Popcorn.WikiCommand(name, params, text, videoManager); } }, - lastfm: { + lastfm: { create: function(name, params, text, videoManager) { return new Popcorn.LastfmCommand(name, params, text, videoManager); }