Werbung:
MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus TagTraum
Kiba (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Kiba (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
| Zeile 25: | Zeile 25: | ||
var qm = $('.qm'); | var qm = $('.qm'); | ||
$(qm).click(function() { | |||
$(qm).click(function( | |||
$(this).find('.tooltip').css('display', 'block'); | $(this).find('.tooltip').css('display', 'block'); | ||
}); | }); | ||
$(document).click(function(event) { | |||
if(!$(event.target).closest('.tooltip').length) { | |||
$('.tooltip').hide(); | |||
} | |||
}); | |||
/* ------- */ | /* ------- */ | ||
Version vom 1. März 2023, 23:35 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */
var makeIframe = document.createElement("iframe");
makeIframe.setAttribute("src", "https://discord.com/widget?id=718907647465881671&theme=dark");
makeIframe.setAttribute("scrolling", "no");
makeIframe.style.width = "197px";
makeIframe.style.height = "500px";
makeIframe.style.border = "0";
var makediv = document.createElement("div");
makediv.className = 'discorddiv';
makediv.style.height = "500px";
makediv.style.width = "197px";
makediv.style.position = "relative";
makediv.style.overflow = "hidden";
makediv.appendChild(makeIframe);
var getRef = document.getElementById("page-tools");
var parentDiv = getRef.parentNode;
parentDiv.insertBefore(makediv, getRef);
/* ------- */
/* --- Tooltips ---- */
var qm = $('.qm');
$(qm).click(function() {
$(this).find('.tooltip').css('display', 'block');
});
$(document).click(function(event) {
if(!$(event.target).closest('.tooltip').length) {
$('.tooltip').hide();
}
});
/* ------- */

