MediaWiki:Common.js: Difference between revisions

From RevSpace
Jump to navigation Jump to search
(No summary for hidden page)
(No summary for hidden page)
Line 12: Line 12:


$(function () {  
$(function () {  
     console.log("debug: ", $("#editform #wpSummary"));
     if (! $("#firstHeading).text().match(/Hidden:/)) return;
 
     $("#editform #wpSummary")
     $("#editform #wpSummary")
     .val(nosummary)
     .val(nosummary)

Revision as of 23:18, 14 October 2016

/* Any JavaScript here will be loaded for all users on every page load. */
$.getScript("/status/mqtt-status.js", function () {
    $("<div id=spacestatus>?</div>").appendTo($("#p-logo"));
    $("#spacestatus")
       .revspace()
       .on("closing", function () { $(this).stop().animate({zoom: 4}, function () { $(this).delay(500).animate({zoom:1}) } ); })
       .on("opening", function () { $(this).stop().animate({zoom: 4}, function () { $(this).delay(500).animate({zoom:1}) } ); })
    ;
});

var nosummary = "No summary for hidden page";

$(function () { 
    if (! $("#firstHeading).text().match(/Hidden:/)) return;

    $("#editform #wpSummary")
    .val(nosummary)
    .change(function () { $(this).val(nosummary); })
    .hide();
});