User:Morfeuz/monobook.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin can be added at User:Morfeuz/monobook.css. |
// en:User:Lupin/popups.js - please include this line
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
popupDelay = 0.5; // задержка на полторы секунды перед всплытием окна <br />
popupStructure = 'fancy'; // улучшенная структура всплывающего окна <br />
imagePopupsForImages = false; // не всплывают картинки <br />
popupMaxWidth = 400; // расширена ширина всплывающего окна <br />
popupMaxPreviewSentences = 10; // больше предложений в окне <br />
popupMaxPreviewCharacters = 666; // больше символов в окне <br />
popupPreviewFirstParOnly = false; // цитируется не только первый абзац <br />
popupPreviewKillTemplates = false; // шаблоны показывать, пусть и сырыми <br />
/* Требуется для разных функций */
function addlilink(tabs, url, name, id, title, key)
{
var na = document.createElement('a');
na.href = url;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.appendChild(na);
tabs.appendChild(li);
if(id)
{
if(key && title)
{
ta[id] = [key, title];
}
else if(key)
{
ta[id] = [key, ''];
}
else if(title)
{
ta[id] = ['', title];
}
}
akeytt();
return li;
}
/* Требуется для разных функций */
function addTab(url, name, id, title, key)
{
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
return addlilink(tabs, url, name, id, title, key);
}
/* Добавление ссылки в панель навигации (над панелью поиска) */
function addToolboxLink(url, name, id)
{
var tb = document.getElementById('p-navigation').getElementsByTagName('ul')[0];
addlilink(tb, url, name, id);
}
/* Добавляем нужные ссылки */
function addMyTools()
{
addToolboxLink('http://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Newpages', 'Новые статьи', 0);
}
//document.write('<script type="text/javascript" src="'
// + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
// + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
// Add a "Kate" link to your monobook "personal menu" list at the very
// top of the page.
//
// Indicate where you would like "Kate" to appear:
// pt-userpage, pt-mytalk, pt-preferences,
// pt-watchlist, pt-mycontris, pt-logout
//
gsKateInsertBefore = 'pt-mycontris'; // leave blank to append after "logout"
//
function KateLink()
{
// var user = document.getElementById( 'pt-userpage' ).firstChild.firstChild.data;
var user = document.getElementById('ca-edit').getElementsByTagName('a')[0].href;
user = user.substring(user.indexOf('title=') + 6, user.lastIndexOf('&action=edit'));
user = user.substring(user.indexOf(':') + 1);
var li = document.createElement( 'li' );
li.id = 'pt-kate';
var a = document.createElement( 'a' );
a.appendChild( document.createTextNode( 'счётчик' ) ); // eh, the css makes the text lowercase
// a.href = 'http://tools.wikimedia.de/~kate/cgi-bin/count_edits?dbname=ruwiki_p&user=' + user;
a.href = 'http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=ruwiki_p&user=' + user;
li.appendChild( a );
if ( ! gsKateInsertBefore ) // append to end (right) of list
{ document.getElementById( 'pt-logout' ).parentNode.appendChild( li );
}
else
{ var before = document.getElementById( gsKateInsertBefore );
before.appendChild( li, before );
}
}
if (window.addEventListener)
window.addEventListener('load', KateLink, false);
else
if (window.attachEvent)
window.attachEvent('onload', KateLink);
addOnloadHook(addMyTools);