Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 22: | Line 22: | ||
.hide(); | .hide(); | ||
}); | }); | ||
+ | |||
+ | if ($("#kiejes").length) { | ||
+ | $.get("/kiekjes/latest?amount=8", function (data) { | ||
+ | var photos = $("<div/>"); | ||
+ | for (var i in data.latest) { | ||
+ | var item = data.latest[i]; | ||
+ | |||
+ | photos.append( | ||
+ | $("<a>").attr({ href: item.url }).append( | ||
+ | $("<img>").attr({ src: item.thumbnail }).css({ width: '12.5%' }) | ||
+ | ) | ||
+ | ); | ||
+ | } | ||
+ | $("#kiekjes").html(photos); | ||
+ | }); | ||
+ | } |
Revision as of 07:36, 16 May 2018
/* 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();
$("#wpSummaryLabel")
.hide();
});
if ($("#kiejes").length) {
$.get("/kiekjes/latest?amount=8", function (data) {
var photos = $("<div/>");
for (var i in data.latest) {
var item = data.latest[i];
photos.append(
$("<a>").attr({ href: item.url }).append(
$("<img>").attr({ src: item.thumbnail }).css({ width: '12.5%' })
)
);
}
$("#kiekjes").html(photos);
});
}