Thread:Bananazilla the Telepath/@comment-33804292-20180801214715/@comment-34652576-20180801215344

Alright, so if my assumptions are corectand the whole page is made up of all the code you want to use, you would need to copy this:

require(['jquery', 'mw'], function ($, mw) {    var storageKey = 'ls-wikianotifications';     function log(error) {         console.log('WikiaNotifications error: ' + error);     }     function getNotificationData {         return (new mw.Api).get({ action: 'parse', disablepp: '', page: 'MediaWiki:Custom-WikiaNotifications', format: 'json' }).then(function (res) { var dfd = $.Deferred; if (res.error) { return dfd.rejectWith(this, [res.error.info]); }            var text = res.parse.text['*'].trim; text = (text || ).replace(/ [\s\S]*?<\/script>/igm, ).replace(/<!\-\-[\s\S]*?\-\->/igm, ''); if (!text.length || !text.trim.length) { return dfd.rejectWith(this, ['empty content']); }            return dfd.resolveWith(this, [{                 version: res.parse.revid,                 contents: text             }]); });    }     function showNotificationIfNotViewed(notification) {         var notifsData = JSON.parse(window.localStorage.getItem(storageKey)) || {},             hasSeen = (notifsData[mw.config.get('wgCityId')] === notification.version),             $notificationArea = $('#WikiaNotifications'),             hasNotifications = $notificationArea.length ? 1 : 0;         if (hasSeen) {             return;         }         var $notif = $('')             .attr('class', 'custom')             .append( $(' ')                .attr('data-type', '2') .html(notification.contents) .append(                    $('')                     .addClass('sprite close-notification')                 ) );            if (hasNotifications) {                 $notificationArea.append($notif);             }              else {                 $('body').addClass('notifications')                     .append($('') .append($notif));            }         $('.sprite.close-notification').on('click', function  { $notif.hide; notifsData[mw.config.get('wgCityId')] = notification.version; window.localStorage.setItem(storageKey, JSON.stringify(notifsData)); });    }     mw.loader.using('mediawiki.api', function { if (mw.config.get('wgUserName')) { $(function {                getNotificationData.then(showNotificationIfNotViewed).fail(log);             }); }    }); });

into [|this MediaWiki page] of your wiki. You'll need to submit it for review, since it's JavaScript, and then, the feature should be up, running, and working! Do you have any other questions, or is there anything that didn't make sense to you on here?

Also, I'd like to ask what this feature does, because I was wondering if it could be good for Fun Fandom.