User:Najevi/global.js

function idAnon // use IP address to identify "Anonymous user" comments {         $("div.comment div.detail span[title]:contains('Anonymous user')").each( function {        var ipaddr = $(this).attr('title');        $(this).text("Anon " + ipaddr + " user");    }); } addOnloadHook(idAnon);

/* == WIP above this line == */

/* == Modify certain element's inline styles at widget dashboard to resemble MyHome column layout == enabler for a Wikia-wide myLZ $( function {   $('.widget_dashboard #sidebar_3').css({'min-width':'330px','width':'65%'});    $('.widget_dashboard #sidebar_4').css({'min-width':'250px','width':'33%'});    //$('.widget_dashboard #sidebar_5').css({'width':'206px'}); // i.e. no change });

/* Hide any WikiPage widgets that cannot be found at the current wiki community. See also: w:c:messaging:MediaWiki:Widgetwikipagemissing

$( function {    $('.WidgetWikiPage .widget-error-wikipage-missing').closest('dd').parent('dl').hide; }); //  uses the new class });

$( function {   $('.WidgetWikiPage i:contains("failed to load")').closest('dd').parent('dl').hide; //  == PERFECT == BEST == works at Dashboard also });

/*  Custom edit buttons -- http://www.wikia.com/wiki/Help:Custom_edit_buttons -- if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/central/images/1/12/Button_gallery.png", "speedTip": "Gallery of images", "tagOpen": "\n", "sampleText": "File:ExampleA.jpg|Caption1\nImage:ExampleB.jpg|Caption2" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/2/23/Button_code.png", "speedTip": "fixed width font", "tagOpen": ' ', "sampleText": "insert code" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/central/images/3/3c/Button_pre.png", "speedTip": "pre-formatted text", "tagOpen": ' ', "tagClose": ' ', "sampleText": "insert pre-formatted text block" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png", "speedTip": "Footnote reference", "tagOpen": " ", "sampleText": "Insert footnote text" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/7f/Button_link_to_Wikipedia.png", "speedTip": "Wikipedia link", "tagOpen": "Wikipedia:",       "tagClose": "", "sampleText": "insert pagename" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/central/images/4/4a/Button_table.png", "speedTip": "Wiki table", "tagOpen": '{| class="wikitable"\n|', "tagClose": "\n|}", "sampleText": "-\n! header 1\n! header 2\n! header 3\n|-\n| row 1, cell 1\n| row 1, cell 2\n| row 1, cell 3\n|-\n| row 2, cell 1\n| row 2, cell 2\n| row 2, cell 3" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/central/images/e/e3/WikiTable.PNG", "speedTip": "Collapsible content", "tagOpen": ' ', "tagClose": " ", "sampleText": "insert collapsible content" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/fd/Button_underline.png", "speedTip": "Underline", "tagOpen": ' ', "tagClose": ' ', "sampleText": "insert text" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png", "speedTip": "Strike-through", "tagOpen": " ", "tagClose": " ", "sampleText": "insert text" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/8/80/Button_upper_letter.png", "speedTip": "Superscript", "tagOpen": " ", "tagClose": " ", "sampleText": "insert text" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/7/70/Button_lower_letter.png", "speedTip": "Subscript", "tagOpen": " ", "tagClose": " ", "sampleText": "insert text" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/5/58/Button_small.png", "speedTip": "Small", "tagOpen": " ", "tagClose": " ", "sampleText": "insert text" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/central/images/5/56/Button_big.png", "speedTip": "Big", "tagOpen": " ", "tagClose": " ", "sampleText": "insert text" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png", "speedTip": "Line break", "tagOpen": " ", "tagClose": "", "sampleText": "" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/central/images/f/f6/Button_html_comment.png", "speedTip": "HTML Comment", "tagOpen": "", "sampleText": "insert comment" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/f/fd/Button_blockquote.png", "speedTip": "Quotation-block", "tagOpen": " \n", "tagClose": "\n ", "sampleText": "insert text" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/central/images/3/31/HighlightButton.png", "speedTip": "Highlight text", "tagOpen": ' ', "tagClose": ' ', "sampleText": "insert text" };   mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images2.wikia.nocookie.net/central/images/e/e1/Button_Quotesbutton.png", "speedTip": "Quote another user", "tagOpen": ':Quoting paste username here :\n \n', "tagClose": "\n ", "sampleText": "paste quoted WikiText here" }; }

/* end custom edit buttons */