<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://ml.sayahna.org/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-dropdown-menus.js</id>
	<title>MediaWiki:Gadget-dropdown-menus.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://ml.sayahna.org/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-dropdown-menus.js"/>
	<link rel="alternate" type="text/html" href="http://ml.sayahna.org/index.php?title=MediaWiki:Gadget-dropdown-menus.js&amp;action=history"/>
	<updated>2026-04-30T22:17:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.5</generator>
	<entry>
		<id>http://ml.sayahna.org/index.php?title=MediaWiki:Gadget-dropdown-menus.js&amp;diff=8045&amp;oldid=prev</id>
		<title>Cvr: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://ml.sayahna.org/index.php?title=MediaWiki:Gadget-dropdown-menus.js&amp;diff=8045&amp;oldid=prev"/>
		<updated>2014-05-01T11:39:05Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 11:39, 1 May 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Cvr</name></author>
		
	</entry>
	<entry>
		<id>http://ml.sayahna.org/index.php?title=MediaWiki:Gadget-dropdown-menus.js&amp;diff=8044&amp;oldid=prev</id>
		<title>Callanecc: Replaced 'jQuery(document).ready' with 'jQuery(document).ready' per edit request</title>
		<link rel="alternate" type="text/html" href="http://ml.sayahna.org/index.php?title=MediaWiki:Gadget-dropdown-menus.js&amp;diff=8044&amp;oldid=prev"/>
		<updated>2014-04-09T11:02:02Z</updated>

		<summary type="html">&lt;p&gt;Replaced &amp;#039;jQuery(document).ready&amp;#039; with &amp;#039;jQuery(document).ready&amp;#039; per edit request&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/*********************************************************************&lt;br /&gt;
**                ***WARNING: GLOBAL GADGET FILE***                 **&lt;br /&gt;
**         any changes to this file will affect many users          **&lt;br /&gt;
**          please discuss changes on the talk page or at           **&lt;br /&gt;
**             [[Wikipedia talk:Gadget]] before editing             **&lt;br /&gt;
**     (consider dropping the script author a note as well...)      **&lt;br /&gt;
**                                                                  **&lt;br /&gt;
**********************************************************************&lt;br /&gt;
**             Script:        Drop-down menus                       **&lt;br /&gt;
**            Version:        4.51g                                 **&lt;br /&gt;
**             Author:        Haza-w                                **&lt;br /&gt;
**      Documentation:        [[User:Haza-w/Drop-down menus]]       **&lt;br /&gt;
**                                                                  **&lt;br /&gt;
*********************************************************************/&lt;br /&gt;
&lt;br /&gt;
// &amp;quot;Fail gracefully&amp;quot; if skin not supported&lt;br /&gt;
switch (skin) {&lt;br /&gt;
    case 'modern': case 'monobook': case 'vector':&lt;br /&gt;
&lt;br /&gt;
    // Global variables&lt;br /&gt;
    var _cactions = {&lt;br /&gt;
        admin: wgUserGroups.join().indexOf('sysop') &amp;gt; -1 ? true : false,&lt;br /&gt;
        areqs: [],&lt;br /&gt;
        hovms: skin == 'vector' ? 50 : 400,&lt;br /&gt;
        menus: [],&lt;br /&gt;
        mouse: null,&lt;br /&gt;
        pname: encodeURIComponent(wgPageName),&lt;br /&gt;
        timer: [],&lt;br /&gt;
        vectr: skin == 'vector' ? true : false&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Process XMLHttpRequests&lt;br /&gt;
    function xhr(request,url,orsc) {&lt;br /&gt;
        with (request) {&lt;br /&gt;
            open('GET',url,true);&lt;br /&gt;
            onreadystatechange = orsc;&lt;br /&gt;
            send(null);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Find absolute position of element&lt;br /&gt;
    function findPos(eid,offset) {&lt;br /&gt;
        var obj = document.getElementById(eid), pos = [0,0];&lt;br /&gt;
        do with (obj) {&lt;br /&gt;
            pos[0] += offsetLeft;&lt;br /&gt;
            pos[1] += offsetTop;&lt;br /&gt;
        } while (obj = obj.offsetParent);&lt;br /&gt;
        pos[0] += offset[0]; pos[1] += offset[1];&lt;br /&gt;
        return pos;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Create menu div element&lt;br /&gt;
    function createMenu(mid,vectorise,html) {&lt;br /&gt;
        var menu = document.createElement('div');&lt;br /&gt;
        with (menu) {&lt;br /&gt;
            id = 'opt-' + mid;&lt;br /&gt;
            className = 'ca-menu';&lt;br /&gt;
            style.display = 'none';&lt;br /&gt;
        }&lt;br /&gt;
        menu.onmouseover = function () {showMenu('opt-'+mid)};&lt;br /&gt;
        menu.onmouseout = function () {hideMenu('opt-'+mid)};&lt;br /&gt;
&lt;br /&gt;
        var elements = {&lt;br /&gt;
            ul: document.createElement('ul'),&lt;br /&gt;
            li: null,&lt;br /&gt;
            a: null,&lt;br /&gt;
            txt: null&lt;br /&gt;
        };&lt;br /&gt;
        with (elements) {&lt;br /&gt;
            for (var i = 0; i &amp;lt; html.length; i++) if (html[i].length) {&lt;br /&gt;
                li = document.createElement('li'); li.id = html[i][0];&lt;br /&gt;
                a = document.createElement('a'); a.href = html[i][2];&lt;br /&gt;
                txt = document.createTextNode(html[i][1]);&lt;br /&gt;
                a.appendChild(txt); li.appendChild(a); ul.appendChild(li);&lt;br /&gt;
            }&lt;br /&gt;
            menu.appendChild(ul);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        document.body.appendChild(menu);&lt;br /&gt;
        if (vectorise) createTab(mid);&lt;br /&gt;
&lt;br /&gt;
        return 'opt-' + mid;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Create cactions LI tab&lt;br /&gt;
    function createTab(mid) {&lt;br /&gt;
        var mtitle = mid.charAt(0).toUpperCase() + mid.substr(1);&lt;br /&gt;
&lt;br /&gt;
        if (_cactions.vectr) {&lt;br /&gt;
            var cid = 'p-' + mid;&lt;br /&gt;
            var elements = {&lt;br /&gt;
                div: document.createElement('div'),&lt;br /&gt;
                h3: document.createElement('h3'),&lt;br /&gt;
                span: document.createElement('span'),&lt;br /&gt;
                a: document.createElement('a'),&lt;br /&gt;
                txt: null&lt;br /&gt;
            };&lt;br /&gt;
            with (elements) {&lt;br /&gt;
                div.id = cid;&lt;br /&gt;
                div.className = 'vectorMenu extraMenu';&lt;br /&gt;
&lt;br /&gt;
                txt = document.createTextNode(mtitle);&lt;br /&gt;
                span.appendChild(txt); h3.appendChild(span);&lt;br /&gt;
&lt;br /&gt;
                a.href = '#';&lt;br /&gt;
                a.onmouseover = function () {showMenu('opt-'+mid,findPos(cid,[0,40]))};&lt;br /&gt;
                a.onmouseout = function () {hideMenu('opt-'+mid)};&lt;br /&gt;
&lt;br /&gt;
                span = document.createElement('span');&lt;br /&gt;
                txt = document.createTextNode(mtitle);&lt;br /&gt;
                span.appendChild(txt); a.appendChild(span); h3.appendChild(a);&lt;br /&gt;
&lt;br /&gt;
                div.appendChild(h3);&lt;br /&gt;
                document.getElementById('right-navigation').insertBefore(div,document.getElementById('p-search'));&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        else {&lt;br /&gt;
            var cid = 'ca-' + mid;&lt;br /&gt;
            var elements = {&lt;br /&gt;
                li: document.createElement('li'),&lt;br /&gt;
                a: document.createElement('a'),&lt;br /&gt;
                txt: document.createTextNode(mtitle)&lt;br /&gt;
            };&lt;br /&gt;
            with (elements) {&lt;br /&gt;
                li.id = cid;&lt;br /&gt;
                a.href = '#';&lt;br /&gt;
                a.onmouseover = function () {showMenu('opt-'+mid,findPos(cid,[-10,20]))};&lt;br /&gt;
                a.onmouseout = function () {hideMenu('opt-'+mid)};&lt;br /&gt;
                a.appendChild(txt); li.appendChild(a);&lt;br /&gt;
&lt;br /&gt;
                document.getElementById('p-cactions').getElementsByTagName('div')[0].getElementsByTagName('ul')[0].appendChild(li);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // CSS hide elements&lt;br /&gt;
    function hideElements(elements,conditionals) {&lt;br /&gt;
        if (typeof(conditionals) == 'undefined') {&lt;br /&gt;
            for (var i = 0; i &amp;lt; elements.length; i++) if (document.getElementById(elements[i])) document.getElementById(elements[i]).style.display = 'none';&lt;br /&gt;
        }&lt;br /&gt;
        else for (var i = 0; i &amp;lt; elements.length; i++) if (document.getElementById(elements[i])) {&lt;br /&gt;
            document.getElementById(elements[i]).style.display = 'none';&lt;br /&gt;
            if (conditionals[i]) document.getElementById(conditionals[i]).style.display = 'none';&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Show/hide menu functions&lt;br /&gt;
    function showMenu(mid,pos) {&lt;br /&gt;
        with (_cactions) {&lt;br /&gt;
            mouse = mid;&lt;br /&gt;
            if (pos) for (var i = 0; i &amp;lt; menus.length; i++) {&lt;br /&gt;
                if (timer[menus[i]]) {&lt;br /&gt;
                    clearTimeout(timer[menus[i]]);&lt;br /&gt;
                    timer[menus[i]] = null;&lt;br /&gt;
                }&lt;br /&gt;
                if (mid.replace(/-[^-]+$/,'') == menus[i]) continue;&lt;br /&gt;
                document.getElementById(menus[i]).style.display = 'none';&lt;br /&gt;
            }&lt;br /&gt;
            if (!timer[mid]) with (document.getElementById(mid).style) {&lt;br /&gt;
                display = '';&lt;br /&gt;
                if (pos) {&lt;br /&gt;
                    left = pos[0]+'px';&lt;br /&gt;
                    top = pos[1]+'px';&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            else {&lt;br /&gt;
                clearTimeout(timer[mid]);&lt;br /&gt;
                timer[mid] = null;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    function hideMenu(mid) {&lt;br /&gt;
        with (_cactions) {&lt;br /&gt;
            if (mid == mouse.replace(/-[^-]+$/,'')) timer[mid] = null;&lt;br /&gt;
&lt;br /&gt;
            if (timer[mid]) {&lt;br /&gt;
                timer[mid] = null;&lt;br /&gt;
                document.getElementById(mid).style.display = 'none';&lt;br /&gt;
                if (mid == mouse &amp;amp;&amp;amp; mid.search(/opt-.*-/) != -1) document.getElementById(mid.replace(/-[^-]+$/,'')).style.display = 'none';&lt;br /&gt;
            }&lt;br /&gt;
            else timer[mid] = setTimeout('hideMenu(\''+mid+'\');',hovms);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Delink element&lt;br /&gt;
    function removeLink(eid) {&lt;br /&gt;
        var element = document.getElementById(eid);&lt;br /&gt;
        if (!element.getElementsByTagName('a').length) return false;&lt;br /&gt;
&lt;br /&gt;
        var a = element.getElementsByTagName('a')[0];&lt;br /&gt;
        element.appendChild(a.removeChild(a.firstChild));&lt;br /&gt;
        element.removeChild(a);&lt;br /&gt;
&lt;br /&gt;
        element.className = 'ca-disabled';&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // User options hook&lt;br /&gt;
   jQuery(document).ready(function () {&lt;br /&gt;
        switch (wgNamespaceNumber) {&lt;br /&gt;
            case 2: case 3: _cactions['uname'] = encodeURIComponent(wgTitle.split('/')[0].replace(/ /g,'_'));&lt;br /&gt;
        }&lt;br /&gt;
        if (wgCanonicalSpecialPageName == 'Contributions') for (var i = 0, hl; hl = document.getElementById('contentSub').getElementsByTagName('a')[i]; i++) {&lt;br /&gt;
            if (hl.href.indexOf('user=') &amp;gt; -1) {&lt;br /&gt;
                _cactions['uname'] = hl.href.split('user=')[1].split('&amp;amp;amp;')[0];&lt;br /&gt;
                break;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (_cactions.uname) {&lt;br /&gt;
            with (_cactions) {&lt;br /&gt;
                menus[menus.length] = createMenu('user',true,Array(&lt;br /&gt;
                    ['c-u-logs',        'User logs &amp;gt;',      '#']                                                                                                            ,&lt;br /&gt;
                    ['c-u-rfx',         'Links to RfX &amp;gt;',   '#']                                                                                                            ,&lt;br /&gt;
                    ['c-u-blocks',      'Blocks &amp;gt;',         '#']                                                                                                            ,&lt;br /&gt;
                    ['c-u-contribs',    'Contributions',    wgScript+'?title=Special:Contributions/'+uname+'&amp;amp;action=view']                                                  ,&lt;br /&gt;
                    ['c-u-editcount',   'Edit count',       '//tools.wmflabs.org/supercount/index.php?project=en.wikipedia&amp;amp;user='+uname.replace(/_/g,'+')]         ,&lt;br /&gt;
                    ['c-u-editsum',     'Edit summaries',   '//tools.wmflabs.org/xtools/editsummary/index.php?lang=en&amp;amp;wiki=wikipedia&amp;amp;name='+uname.replace(/_/g,'+')]   ,&lt;br /&gt;
                    ['c-u-wcuser',      'Edit analysis',    'http://en.wikichecker.com/user/?l=all&amp;amp;t='+uname]                                                               ,&lt;br /&gt;
                    ['c-u-sul',         'SUL status',       '//toolserver.org/~vvv/sulutil.php?user='+uname]                                                           ,&lt;br /&gt;
                    ['c-u-subpages',    'Userspace',        wgScript+'?title=Special:PrefixIndex/User:'+uname+'/&amp;amp;action=view']                                              ,&lt;br /&gt;
                    ['c-u-email',       'Email user',      wgScript+'?title=Special:EmailUser/'+uname+'&amp;amp;action=view']                                                      ,&lt;br /&gt;
                    ['c-u-groups',      'User groups',      wgScript+'?title=Special:ListUsers&amp;amp;action=view&amp;amp;limit=1&amp;amp;username='+uname]                                        ,&lt;br /&gt;
                    ['c-u-rightslog',   'Rights changes',   wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=rights&amp;amp;page=User:'+uname]&lt;br /&gt;
                ));&lt;br /&gt;
&lt;br /&gt;
                menus[menus.length] = createMenu('user-logs',false,Array(&lt;br /&gt;
                    ['c-ul-logs',       'All user logs',    wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;user='+uname]              ,&lt;br /&gt;
                    ['c-ul-blocks',     'Blocks',           wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=block&amp;amp;user='+uname]   ,&lt;br /&gt;
                    ['c-ul-deletes',    'Deletions',        wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=delete&amp;amp;user='+uname]  ,&lt;br /&gt;
                    ['c-ul-moves',      'Moves',            wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=move&amp;amp;user='+uname]    ,&lt;br /&gt;
                    ['c-ul-patrols',    'Patrols',          wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=patrol&amp;amp;user='+uname]  ,&lt;br /&gt;
                    ['c-ul-protects',   'Protections',      wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=protect&amp;amp;user='+uname] ,&lt;br /&gt;
                    ['c-ul-uploads',    'Uploads',          wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=upload&amp;amp;user='+uname]  ,&lt;br /&gt;
                    ['c-ul-rights',     'User rights',      wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=rights&amp;amp;user='+uname]&lt;br /&gt;
                ));&lt;br /&gt;
&lt;br /&gt;
                menus[menus.length] = createMenu('user-rfx',false,Array(&lt;br /&gt;
                    ['c-ux-rfa',        'RfAs',             wgScript+'?title=Special:PrefixIndex/Wikipedia:Requests_for_adminship/'+uname+'&amp;amp;action=view']       ,&lt;br /&gt;
                    ['c-ux-rfb',        'RfBs',             wgScript+'?title=Special:PrefixIndex/Wikipedia:Requests_for_bureaucratship/'+uname+'&amp;amp;action=view']  ,&lt;br /&gt;
                    ['c-ux-rfar',       'RfAr',             wgScript+'?title=Wikipedia:Requests_for_arbitration/'+uname+'&amp;amp;action=view']                         ,&lt;br /&gt;
                    ['c-ux-rfc',        'RfC',              wgScript+'?title=Wikipedia:Requests_for_comment/'+uname+'&amp;amp;action=view']                             ,&lt;br /&gt;
                    ['c-ux-rfcu',       'RfCU',             wgScript+'?title=Wikipedia:Requests_for_checkuser/Case/'+uname+'&amp;amp;action=view']                      ,&lt;br /&gt;
                    ['c-ux-spi',        'SPI',              wgScript+'?title=Wikipedia:Sockpuppet_investigations/'+uname+'&amp;amp;action=view']&lt;br /&gt;
                ));&lt;br /&gt;
&lt;br /&gt;
                menus[menus.length] = createMenu('user-blocks',false,Array(&lt;br /&gt;
                    admin?          ['c-ub-block',          'Block user',       wgScript+'?title=Special:BlockIP/'+uname+'&amp;amp;action=view']            :[] ,&lt;br /&gt;
                    admin?          ['c-ub-unblock',        'Unblock user',     wgScript+'?title=Special:IPBlockList&amp;amp;action=unblock&amp;amp;ip='+uname]     :[] ,&lt;br /&gt;
                                    ['c-ub-ipblock',        'View block',       wgScript+'?title=Special:IPBlockList&amp;amp;action=view&amp;amp;ip='+uname]            ,&lt;br /&gt;
                                    ['c-ub-blocklog',       'Block log',        wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=block&amp;amp;page=User:'+uname]&lt;br /&gt;
                ));&lt;br /&gt;
&lt;br /&gt;
                if (sajax_init_object() &amp;amp;&amp;amp; wgEnableAPI) {&lt;br /&gt;
                    if (uname.search(/(?:\d{1,3}\.){3}\d{1,3}/) == 0) {&lt;br /&gt;
                        areqs['ip'] = new sajax_init_object();&lt;br /&gt;
                        xhr(areqs['ip'],wgScriptPath+'/api.php?format=json&amp;amp;action=query&amp;amp;list=blocks&amp;amp;bkusers='+uname+'&amp;amp;bkprop=id&amp;amp;xhr='+Math.random(),function () {&lt;br /&gt;
                            with (areqs['ip']) if (readyState == 4 &amp;amp;&amp;amp; status == 200) {&lt;br /&gt;
                                var api = eval('('+responseText+')');&lt;br /&gt;
                                if (api.query.blocks.length) {&lt;br /&gt;
                                    hideElements(['c-ub-block']);&lt;br /&gt;
                                    document.getElementById('c-ub-ipblock').getElementsByTagName('a')[0].style.color = '#EE1111';&lt;br /&gt;
                                }&lt;br /&gt;
                                else {&lt;br /&gt;
                                    hideElements(['c-ub-unblock']);&lt;br /&gt;
                                    removeLink('c-ub-ipblock');&lt;br /&gt;
                                }&lt;br /&gt;
                            }&lt;br /&gt;
                        } );&lt;br /&gt;
                    }&lt;br /&gt;
                    else {&lt;br /&gt;
                        areqs['user'] = new sajax_init_object();&lt;br /&gt;
                        xhr(areqs['user'],wgScriptPath+'/api.php?format=json&amp;amp;action=query&amp;amp;list=users&amp;amp;ususers='+uname+'&amp;amp;usprop=blockinfo|groups&amp;amp;xhr='+Math.random(),function () {&lt;br /&gt;
                            with (areqs['user']) if (readyState == 4 &amp;amp;&amp;amp; status == 200) {&lt;br /&gt;
                                var api = eval('('+responseText+')');&lt;br /&gt;
                                with (api.query.users[0]) {&lt;br /&gt;
                                    if (typeof(missing) != 'undefined') hideElements(['ca-user']);&lt;br /&gt;
                                    else {&lt;br /&gt;
                                        if (typeof(blockedby) != 'undefined') {&lt;br /&gt;
                                            hideElements(['c-ub-block']);&lt;br /&gt;
                                            document.getElementById('c-ub-ipblock').getElementsByTagName('a')[0].style.color = '#EE1111';&lt;br /&gt;
                                        }&lt;br /&gt;
                                        else {&lt;br /&gt;
                                            hideElements(['c-ub-unblock']);&lt;br /&gt;
                                            removeLink('c-ub-ipblock');&lt;br /&gt;
                                        }&lt;br /&gt;
&lt;br /&gt;
                                        if (typeof(groups) == 'undefined' || groups.join().indexOf('sysop') == -1) hideElements(['c-ul-blocks','c-ul-deletes','c-ul-protects','c-ul-rights']);&lt;br /&gt;
                                    }&lt;br /&gt;
                                }&lt;br /&gt;
                            }&lt;br /&gt;
                        } );&lt;br /&gt;
&lt;br /&gt;
                        areqs['rfa'] = new sajax_init_object();&lt;br /&gt;
                        xhr(areqs['rfa'],wgScriptPath+'/api.php?format=json&amp;amp;action=query&amp;amp;list=allpages&amp;amp;apprefix=Requests_for_adminship%2F'+uname+'&amp;amp;apnamespace=4&amp;amp;aplimit=1&amp;amp;xhr='+Math.random(),function () {&lt;br /&gt;
                            with (areqs['rfa']) if (readyState == 4 &amp;amp;&amp;amp; status == 200) {&lt;br /&gt;
                                var api = eval('('+responseText+')');&lt;br /&gt;
                                if (!api.query.allpages.length) removeLink('c-ux-rfa');&lt;br /&gt;
                            }&lt;br /&gt;
                        } );&lt;br /&gt;
&lt;br /&gt;
                        areqs['rfb'] = new sajax_init_object();&lt;br /&gt;
                        xhr(areqs['rfb'],wgScriptPath+'/api.php?format=json&amp;amp;action=query&amp;amp;list=allpages&amp;amp;apprefix=Requests_for_bureaucratship%2F'+uname+'&amp;amp;apnamespace=4&amp;amp;aplimit=1&amp;amp;xhr='+Math.random(),function () {&lt;br /&gt;
                            with (areqs['rfb']) if (readyState == 4 &amp;amp;&amp;amp; status == 200) {&lt;br /&gt;
                                var api = eval('('+responseText+')');&lt;br /&gt;
                                if (!api.query.allpages.length) removeLink('c-ux-rfb');&lt;br /&gt;
                            }&lt;br /&gt;
                        } );&lt;br /&gt;
&lt;br /&gt;
                        areqs['uspace'] = new sajax_init_object();&lt;br /&gt;
                        xhr(areqs['uspace'],wgScriptPath+'/api.php?format=json&amp;amp;action=query&amp;amp;list=allpages&amp;amp;apprefix='+uname+'%2F&amp;amp;apnamespace=2&amp;amp;aplimit=1&amp;amp;xhr='+Math.random(),function () {&lt;br /&gt;
                            with (areqs['uspace']) if (readyState == 4 &amp;amp;&amp;amp; status == 200) {&lt;br /&gt;
                                var api = eval('('+responseText+')');&lt;br /&gt;
                                if (!api.query.allpages.length) removeLink('c-u-subpages');&lt;br /&gt;
                            }&lt;br /&gt;
                        } );&lt;br /&gt;
                    }&lt;br /&gt;
&lt;br /&gt;
                    areqs['rfx'] = new sajax_init_object();&lt;br /&gt;
                    xhr(areqs['rfx'],wgScriptPath+'/api.php?format=json&amp;amp;action=query&amp;amp;titles=Wikipedia:Requests_for_arbitration/'+uname+'|Wikipedia:Requests_for_comment/'+uname+'|Wikipedia:Requests_for_checkuser/Case/'+uname+'|Wikipedia:Sockpuppet_investigations/'+uname+'&amp;amp;letype=block&amp;amp;letitle=User:'+uname+'&amp;amp;prop=info&amp;amp;xhr='+Math.random(),function () {&lt;br /&gt;
                        with (areqs['rfx']) if (readyState == 4 &amp;amp;&amp;amp; status == 200) {&lt;br /&gt;
                            var api = eval('('+responseText+')');&lt;br /&gt;
                            for (i in api.query.pages) switch (api.query.pages[i].title.split('/')[0]) {&lt;br /&gt;
                                case 'Wikipedia:Requests for arbitration': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-rfar'); break;&lt;br /&gt;
                                case 'Wikipedia:Requests for comment': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-rfc'); break;&lt;br /&gt;
                                case 'Wikipedia:Requests for checkuser': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-rfcu'); break;&lt;br /&gt;
                                case 'Wikipedia:Sockpuppet investigations': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-spi'); break;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                    } );&lt;br /&gt;
&lt;br /&gt;
                    areqs['ublocks'] = new sajax_init_object();&lt;br /&gt;
                    xhr(areqs['ublocks'],wgScriptPath+'/api.php?format=json&amp;amp;action=query&amp;amp;list=logevents&amp;amp;letype=block&amp;amp;letitle=User:'+uname+'&amp;amp;lelimit=1&amp;amp;xhr='+Math.random(),function () {&lt;br /&gt;
                        with (areqs['ublocks']) if (readyState == 4 &amp;amp;&amp;amp; status == 200) {&lt;br /&gt;
                            var api = eval('('+responseText+')');&lt;br /&gt;
                            if (!api.query.logevents.length) removeLink('c-ub-blocklog');&lt;br /&gt;
                        }&lt;br /&gt;
                    } );&lt;br /&gt;
                }&lt;br /&gt;
                else hideElements(['c-ub-ipblock','c-ul-blocks','c-ul-deletes','c-ul-protects','c-ul-rights']);&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            hideElements(['t-contributions','t-log','t-emailuser']);&lt;br /&gt;
&lt;br /&gt;
            document.getElementById('c-u-logs').onmouseover = function () {showMenu('opt-user-logs',findPos('c-u-logs',[40,0]))};&lt;br /&gt;
            document.getElementById('c-u-logs').onmouseout = function () {hideMenu('opt-user-logs')};&lt;br /&gt;
            document.getElementById('c-u-logs').style.fontWeight = 'bold';&lt;br /&gt;
&lt;br /&gt;
            document.getElementById('c-u-rfx').onmouseover = function () {showMenu('opt-user-rfx',findPos('c-u-rfx',[40,0]))};&lt;br /&gt;
            document.getElementById('c-u-rfx').onmouseout = function () {hideMenu('opt-user-rfx')};&lt;br /&gt;
            document.getElementById('c-u-rfx').style.fontWeight = 'bold';&lt;br /&gt;
            document.getElementById('opt-user-rfx').style.width = '50px';&lt;br /&gt;
&lt;br /&gt;
            document.getElementById('c-u-blocks').onmouseover = function () {showMenu('opt-user-blocks',findPos('c-u-blocks',[40,0]))};&lt;br /&gt;
            document.getElementById('c-u-blocks').onmouseout = function () {hideMenu('opt-user-blocks')};&lt;br /&gt;
            document.getElementById('c-u-blocks').style.fontWeight = 'bold';&lt;br /&gt;
&lt;br /&gt;
            if (_cactions.uname.search(/(?:\d{1,3}\.){3}\d{1,3}/) == 0) hideElements(['c-u-logs','c-ux-rfa','c-ux-rfb','c-u-editcount','c-u-editsum','c-u-wcuser','c-u-subpages','c-u-email','c-u-groups','c-u-rightslog']);&lt;br /&gt;
        }&lt;br /&gt;
    } );&lt;br /&gt;
&lt;br /&gt;
    // Page options hook&lt;br /&gt;
    jQuery(document).ready(function () {&lt;br /&gt;
        if (!wgCanonicalSpecialPageName) {&lt;br /&gt;
            with (_cactions) {&lt;br /&gt;
                menus[menus.length] = createMenu('page',true,Array(&lt;br /&gt;
                                    ['c-p-logs',        'Page logs &amp;gt;',      '#'],&lt;br /&gt;
                    wgArticleId?    ['c-p-history',     'History',          wgScript+'?title='+pname+'&amp;amp;action=history']                     :[] ,&lt;br /&gt;
                    wgArticleId?    ['c-p-move',        'Move page',        wgScript+'?title=Special:Movepage/'+pname+'&amp;amp;action=view']       :[] ,&lt;br /&gt;
                    !vectr?         ['c-p-watch',       'Watch page',       wgScript+'?title='+pname+'&amp;amp;action=watch']                       :[] ,&lt;br /&gt;
                    !vectr?         ['c-p-unwatch',     'Unwatch page',     wgScript+'?title='+pname+'&amp;amp;action=unwatch']                     :[] ,&lt;br /&gt;
                    admin?          ['c-p-protect',     'Protect page',     wgScript+'?title='+pname+'&amp;amp;action=protect']                     :[] ,&lt;br /&gt;
                    admin?          ['c-p-unprotect',   'Unprotect page',   wgScript+'?title='+pname+'&amp;amp;action=unprotect']                   :[] ,&lt;br /&gt;
                    admin?          ['c-p-delete',      'Delete page',      wgScript+'?title='+pname+'&amp;amp;action=delete']                      :[] ,&lt;br /&gt;
                    admin?          ['c-p-undelete',    'Undelete page',    wgScript+'?title=Special:Undelete/'+pname+'&amp;amp;action=view']       :[] ,&lt;br /&gt;
                    wgArticleId?    ['c-p-diff',        'Latest diff',      wgScript+'?title='+pname+'&amp;amp;action=view&amp;amp;diff='+wgCurRevisionId]  :[] ,&lt;br /&gt;
                    wgArticleId?    ['c-p-editzero',    'Edit intro',       wgScript+'?title='+pname+'&amp;amp;action=edit&amp;amp;section=0']              :[] ,&lt;br /&gt;
                    wgArticleId?    ['c-p-wcpage',      'Page analysis',    'http://en.wikichecker.com/article/?a='+pname]                  :[] ,&lt;br /&gt;
                                    ['c-p-purge',       'Purge cache',      wgScript+'?title='+pname+'&amp;amp;action=purge']&lt;br /&gt;
                ));&lt;br /&gt;
&lt;br /&gt;
                menus[menus.length] = createMenu('page-logs',false,Array(&lt;br /&gt;
                                                ['c-pl-logs',       'All page logs',    wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;page='+pname]                  ,&lt;br /&gt;
                                                ['c-pl-deletes',    'Deletion log',     wgScript+'?title=Special:Log&amp;amp;type=delete&amp;amp;page='+pname]                  ,&lt;br /&gt;
                                                ['c-pl-moves',      'Move log',         wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=move&amp;amp;page='+pname]        ,&lt;br /&gt;
                    wgArticleId?                ['c-pl-patrols',    'Patrol log',       wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=patrol&amp;amp;page='+pname]  :[] ,&lt;br /&gt;
                                                ['c-pl-protects',   'Protection log',   wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=protect&amp;amp;page='+pname]     ,&lt;br /&gt;
                    wgNamespaceNumber == 6?     ['c-pl-uploads',    'Upload log',       wgScript+'?title=Special:Log&amp;amp;action=view&amp;amp;type=upload&amp;amp;page='+pname]  :[]&lt;br /&gt;
                ));&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            hideElements(['ca-protect','ca-unprotect','ca-delete','ca-undelete','ca-history','ca-move'],['c-p-unprotect','c-p-protect','c-p-undelete','p-c-delete']);&lt;br /&gt;
            if (!_cactions.vectr) hideElements(['ca-watch','ca-unwatch'],['c-p-unwatch','c-p-watch']);&lt;br /&gt;
&lt;br /&gt;
            document.getElementById('c-p-logs').onmouseover = function () {showMenu('opt-page-logs',findPos('c-p-logs',[40,0]))};&lt;br /&gt;
            document.getElementById('c-p-logs').onmouseout = function () {hideMenu('opt-page-logs')};&lt;br /&gt;
            document.getElementById('c-p-logs').style.fontWeight = 'bold';&lt;br /&gt;
        }&lt;br /&gt;
    } );&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Callanecc</name></author>
		
	</entry>
</feed>