MediaWiki: Common.js: Unterschied zwischen den Versionen
Aus Joachim Camerarius (1500-1574)
Noeth (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Noeth (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
| Zeile 14: | Zeile 14: | ||
$.getJSON("http://kallimachos.de/camerarius/api.php?action=query&list=recentchanges&rcnamespace=1&rcprop=title%7Ctimestamp%7Cuser&rclimit=100&format=json", function( json ) { | $.getJSON("http://kallimachos.de/camerarius/api.php?action=query&list=recentchanges&rcnamespace=1&rcprop=title%7Ctimestamp%7Cuser&rclimit=100&format=json", function( json ) { | ||
json.query.recentchanges.forEach(function (arrayItem) { | json.query.recentchanges.forEach(function (arrayItem) { | ||
$('#discussion').append('<tr><td><a href="/camerarius/index.php/' + arrayItem.title + '">' + arrayItem.title.replace("Diskussion:", "") + '</a></td><td>' + arrayItem.user + '</td><td>' + arrayItem.timestamp.str.replace(T|Z,''); + '</td></tr>'); | $('#discussion').append('<tr><td><a href="/camerarius/index.php/' + arrayItem.title + '">' + arrayItem.title.replace("Diskussion:", "") + '</a></td><td>' + arrayItem.user + '</td><td>' + arrayItem.timestamp.str.replace(/T|Z/g,''); + '</td></tr>'); | ||
}); | }); | ||
}); | }); | ||
Version vom 3. Juni 2019, 20:47 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */
$(document).ready(function() {
if(mw.config.get('wgCanonicalNamespace') === 'Talk' && mw.config.get('wgIsArticle') === true && mw.config.get('skin') === 'tweeki' && mw.config.get('wgUserName') !== 'null'){
document.body.innerHTML += '<html><a href="/camerarius/index.php?title=' + wgPageName + '&action=edit" ><div id="sidebutton"><button class="feedback">Bearbeiten</div></div></a></html>';
}
});
$(document).ready(function() {
if(mw.config.get('wgCanonicalNamespace') !== 'Talk' && mw.config.get('wgIsArticle') === true && mw.config.get('skin') === 'tweeki' && mw.config.get('wgPageName') !== "Einführung" && mw.config.get('wgCanonicalNamespace') !== "Category"){
document.body.innerHTML += '<html><a href="/camerarius/index.php/Talk:' + wgPageName + '"><div id="sidebutton"><button class="feedback">Feedback</div></div></a></html>';
}
});
if ( $( "#discussion" ).length ) {
$.getJSON("http://kallimachos.de/camerarius/api.php?action=query&list=recentchanges&rcnamespace=1&rcprop=title%7Ctimestamp%7Cuser&rclimit=100&format=json", function( json ) {
json.query.recentchanges.forEach(function (arrayItem) {
$('#discussion').append('<tr><td><a href="/camerarius/index.php/' + arrayItem.title + '">' + arrayItem.title.replace("Diskussion:", "") + '</a></td><td>' + arrayItem.user + '</td><td>' + arrayItem.timestamp.str.replace(/T|Z/g,''); + '</td></tr>');
});
});
}
$(document).ready(function() {
$(".nav li.disabled a").click(function() {
return false;
});
});
function loadFrame(url){
$( "#result" ).empty().load(url + ' #frameContent,#frameContentInner');
$( "#linkResult" ).empty().prepend('<div class="container"><div class="col-md-4"></div><div class="col-md-4"> <a href=' + url + ' class="btn btn-sm drilldown-btn-test victoria-two">Seite besuchen</a></div><div class="col-md-4"></div></div>');
}
function onReady(callback) {
var intervalID = window.setInterval(checkReady, 1000);
function checkReady() {
if (document.getElementsByTagName('body')[0] !== undefined) {
window.clearInterval(intervalID);
callback.call(this);
}
}
}
function show(id, value) {
document.getElementById(id).style.display = value ? 'block' : 'none';
}
onReady(function () {
show('page', true);
show('loading', false);
});