User:Johnduhart/ExtTag.js

(function( mw, $, undefined ){

var extTag = { $tag: undefined, $archive: undefined,

init: function { extTag.$tag = $( mw.util.addPortletLink( 'p-views', '#', 'Tag', '', 'Tag this extension', 'e' ) ); extTag.$tag.click( extTag.tagBox ); extTag.$archive = $( mw.util.addPortletLink( 'p-views', '#', 'Archive', '', 'Arcgive this extension', 'a' ) ); extTag.$archive.click( extTag.archiveBox ); },   tagBox: function { alert('Hi'); },   archiveBox: function { $(' ')           .html(                "\                Reason (Optional): \                 \                "            ) .dialog({               modal: true            }); } };

mw.loader.using( [ 'mediawiki.util', 'jquery.ui.dialog' ], function {

$(document).ready( extTag.init );

} );

})( mediaWiki, jQuery );