User:AFigureOfBlue/DZ.js

//FIXME: Going to assume that jQuery UI isn't loaded. May tweak this at some point in the future to try detecting if it is already present or not. mw.loader.load("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"); importStylesheetURI("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/smoothness/jquery-ui.css"); var Dazzle = {};

(function($){

Dazzle.dialog = function (title, txt, buttons) { if (!$("#dazzle-dialog")) { $("body").append(" "); $("#dazzle-dialog").dialog({autoOpen: false}); } $("#dazzle-dialog").dialog("option", "title", title).dialog("option", "buttons", buttons).html(txt).dialog("open"); };

//FIXME: Currently only runs in vector $("#p-search").before(" DZ!  DZ!  ");

mw.util.addPortletLink("p-dazzle", "#", "DI", "dz-di", "Image for pseudo-speedy deletion");

})(jQuery);