User:Ultimate Dark Carnage/photosmodule.js

/*   Parts of the Photos Module script are originated from 452's Photos Module script. This script is modified by Ultimate Dark Carnage. (function($, mw, config){   if (mw.config.get('skin') == "oasis" || mw.config.get('skin') == "wikia"){        var count = config.count || 5;        if ($('.WikiaRail').length){ // If the rail is present...            $('.WikiaRail').delegate('*', 'DOMNodeInserted', function(event){ // ...create the Photos module after lazy-loading. if($('.ChatModule').length && !$('.LatestPhotosModule#LatestPhotosModule').length){ // Only add the module once. if (typeof el == "undefined"){ // Only load the photos once. var el = $(' '); el.load("/Special:NewFiles/" + count + " #gallery-", function{                           $('.ChatModule').after(function{ var PhotosModuleHTML = ' Photos ' + '' + '' + 'Add a Photo' + '' + ' ' +                                       '  ' +                                        '  ' +                                    ' ' +                                    '' + ' ' +                                       ' ' +                                    ' ' +                                    'See more &gt;'; return $(' ', {                                   "class": "LatestPhotosModule module",                                    "id": "LatestPhotosModule",                                    html: PhotosModuleHTML                                }); });                           $('#LatestPhotosModule .carousel-container > div').append($('#gallery-', el)); // Create the carousel...                            $('#LatestPhotosModule .wikia-photogallery-add').remove;                        }); // That button is unneccessary, so I'll just remove it... }               }            });        }    } })(this.jQuery, this.mediaWiki, window.module);