MediaWiki:Gadget-DarkToggle.js: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
 
Line 47: Line 47:


if (mw.config.get('skin') == 'nimbus') {
if (mw.config.get('skin') == 'nimbus') {
$('#wiki-login').prepend('<div id="toggleContainer" style="float:left"><a id="toggleLink" href="javascript:;" title="Toggle night theme"><img id="toggleImage" src="https://wiki.gallery/images/dark/moon/' + (isDark ? 'yellow' : 'white') + '.png"/></a></div>');
$('#wiki-login').prepend('<div id="toggleContainer" style="float:left"><a id="toggleLink" href="javascript:;" title="Toggle night theme"><img id="toggleImage" src="https://wiki.gallery/images/dark/moon.png"/></a></div>');
} else if (mw.config.get('skin') == 'minerva')
} else if (mw.config.get('skin') == 'minerva')
$('#footer-places').after('<ul id="toggleContainer" class="minerva-toggle hlist"><li><a id="toggleLink" href="javascript:;">Toggle night theme</a></li></ul>');
$('#footer-places').after('<ul id="toggleContainer" class="minerva-toggle hlist"><li><a id="toggleLink" href="javascript:;">Toggle night theme</a></li></ul>');
Line 53: Line 53:
$('#footer-places').append('<li id="toggleContainer"><a id="toggleLink" href="javascript:;">' + toggleText + '</a></li>');
$('#footer-places').append('<li id="toggleContainer"><a id="toggleLink" href="javascript:;">' + toggleText + '</a></li>');
else {
else {
$('#p-personal ul').prepend('<li id="toggleContainer" class="mw-list-item"><a id="toggleLink" style="background:none" href="javascript:;" title="Toggle night theme"><img id="toggleImage" src="https://wiki.gallery/images/dark/moon/' + (isDark ? 'yellow' : 'white') + '.png"/></a></li>');
$('#p-personal ul').prepend('<li id="toggleContainer" class="mw-list-item"><a id="toggleLink" style="background:none" href="javascript:;" title="Toggle night theme"><img id="toggleImage" src="https://wiki.gallery/images/dark/moon.png"/></a></li>');
}
}