MediaWiki:Common.js: Unterschied zwischen den Versionen
imported>TimmyQuivy (Restoring now have confirmed CSS/JS is to blame for bug.) |
imported>Cid Highwind ("Articletype positioning" von MA/en kopiert) |
||
Zeile 6: | Zeile 6: | ||
}); | }); | ||
})(jQuery); | })(jQuery); | ||
+ | |||
+ | /******************************************************************************* | ||
+ | ** "Articletype positioning" script; by [[:en:User:Bp]] | ||
+ | ** Für einen Test von [[Benutzer:D47h0r]], bitte erst nach Rücksprache | ||
+ | ** mit ihm entfernen. | ||
+ | *******************************************************************************/ | ||
+ | |||
+ | function moveArticletypeDiv() { | ||
+ | var fooel = document.getElementById('ma-article-type'); | ||
+ | if (fooel!=null) { | ||
+ | var artel = document.getElementById('article'); | ||
+ | var wphel = document.getElementById('WikiaPageHeader'); | ||
+ | var titel = document.getElementById('top'); | ||
+ | fooel = fooel.parentNode.removeChild(fooel); | ||
+ | if (artel!=null) { | ||
+ | artel.parentNode.insertBefore(fooel,artel); | ||
+ | } else if (wphel!=null) { | ||
+ | wphel.parentNode.insertBefore(fooel,wphel); | ||
+ | } else { | ||
+ | //fall back to a position before H1 - useful for monobook skin | ||
+ | titel.parentNode.insertBefore(fooel,titel); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | hookEvent("load", moveArticletypeDiv); |
Version vom 1. Dezember 2013, 22:19 Uhr
(function ($) {
$(function() {
var sidebarjs = $('<script type="text/javascript" />');
sidebarjs.attr('src', 'http://de.memory-alpha.org/wiki/MediaWiki:Fusion/scripts/Sidebar.js?action=raw&ctype=text/javascript');
$('head').append(sidebarjs);
});
})(jQuery);
/*******************************************************************************
** "Articletype positioning" script; by [[:en:User:Bp]]
** Für einen Test von [[Benutzer:D47h0r]], bitte erst nach Rücksprache
** mit ihm entfernen.
*******************************************************************************/
function moveArticletypeDiv() {
var fooel = document.getElementById('ma-article-type');
if (fooel!=null) {
var artel = document.getElementById('article');
var wphel = document.getElementById('WikiaPageHeader');
var titel = document.getElementById('top');
fooel = fooel.parentNode.removeChild(fooel);
if (artel!=null) {
artel.parentNode.insertBefore(fooel,artel);
} else if (wphel!=null) {
wphel.parentNode.insertBefore(fooel,wphel);
} else {
//fall back to a position before H1 - useful for monobook skin
titel.parentNode.insertBefore(fooel,titel);
}
}
}
hookEvent("load", moveArticletypeDiv);