Mtumiaji:Spacebirdy/monobook.js
Elewa - Baada ya kuhifadhi, itakubidi uzungushe kivinjali kache chako ili kuona mabadiliko.
- Firefox / Safari: Shikiria Shift wakati unabonyeza Reload, au aidha bonyeza Ctrl-F5 au Ctrl-R (⌘-R kwa Mac);
- Google Chrome: Bonyeza Ctrl-Shift-R (⌘-Shift-R kwa Mac)
- Konqueror: Bonyeza Reload au bonyeza F5;
- Opera: Futa kache kwenye Tools → Preferences;
- Internet Explorer: Shikiria Ctrl wakati unabonyeza Refresh, au bonyeza Ctrl-F5.
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Spacebirdy/altækt.js&action=raw&ctype=text/javascript');
/**
* getElementsByClass : searches the elements of the page by "class" parameter
*/
function getElementsByClass(searchClass, node, tag) {
if (node == null) node = document;
if (tag == null) tag = '*';
return getElementsByClassName(node, tag, searchClass);
}
/**
* Title icons
*
* Looks for title icons (class="icon") and
* Shifts them to the right of the title on the page.
*/
function titleicons() {
var h1 = document.getElementsByTagName("h1")[0];
var icons = getElementsByClass( "icon", document, "div" );
for( var j = icons.length; j > 0; --j ){
icons[j-1].style.display = "block"; /* cancels "display: none" by default */
icons[j-1].style.marginLeft = "0.35em";
if( skin == "modern" ){
icons[j-1].style.marginTop = "0.2em";
}
h1.parentNode.insertBefore(icons[j-1], h1); /* shift of the element */
}
}
$(titleicons);