Widget:costumeSwitcher: Difference between revisions
Jump to navigation
Jump to search
Pianoforte (talk | contribs) mNo edit summary |
Pianoforte (talk | contribs) No edit summary |
||
Line 23: | Line 23: | ||
// As we change the link, we have to update the Thumb-Cache of the Media Viewer | // As we change the link, we have to update the Thumb-Cache of the Media Viewer | ||
// Clear up the thumbs cache | // Clear up the thumbs cache | ||
mw.mmv.bootstrap.thumbs = []; | if (typeof mv !== "undefined" && typeof mv.mmv !== "undefined" && typeof mv.mmv.bootstrap !== "undefined" && typeof mv.mmv.bootstrap.viewer !== "undefined") { | ||
mw.mmv.bootstrap.thumbs = []; | |||
// Search for all thumbs | |||
mw.mmv.bootstrap.processThumbs($("#content")); | |||
// Re-Init the viewer with the new thumbs | |||
} | mw.mmv.bootstrap.viewer.initWithThumbs(mw.mmv.bootstrap.thumbs); | ||
}} | |||
RLQ.push(function () { | RLQ.push(function () { |