MediaWiki:Common.js: различия между версиями

>Rappy 4187
Fixing JS error. Removing Terms of Use violations and Monobook-only code.
м замена absurdopedia.wikia.com на absurdopedia.wiki, сравнение с null по !==; TODO: проверить код и удалить лишнее
Строка 41: Строка 41:
         $('body').html("<div id='nihilism_message'" + (nhl.style.top == "0px" ? " style='top: 0px; left: 0px;'" : "") + ">" + msg + "</div>");
         $('body').html("<div id='nihilism_message'" + (nhl.style.top == "0px" ? " style='top: 0px; left: 0px;'" : "") + ">" + msg + "</div>");
         $(document).dblclick(function() {
         $(document).dblclick(function() {
             window.location = 'http://absurdopedia.wikia.com/index.php?title=' + encodeURIComponent(wgPageName) + '&action=edit';
             window.location = 'http://absurdopedia.wiki/w/index.php?title=' + encodeURIComponent(wgPageName) + '&action=edit';
         });
         });
     }
     }
Строка 48: Строка 48:
/* Обеспечиваем стирание памяти для «Людёй в чёрном» */
/* Обеспечиваем стирание памяти для «Людёй в чёрном» */
$(function() {
$(function() {
     if ($('#erase_memory')[0]) setTimeout("$('#erase_memory').hide()", 20000);
     if ($('#erase_memory')[0])
    setTimeout(function() {$('#erase_memory').hide();}, 20000);
});
});


Строка 86: Строка 87:
/* Вставка юзернейма с помощью <span class="insertusername"></span> */
/* Вставка юзернейма с помощью <span class="insertusername"></span> */
$(function() {
$(function() {
     if ((typeof(disableUsernameReplace) == 'undefined' || !disableUsernameReplace) && wgUserName != null)
     if ((typeof(disableUsernameReplace) == 'undefined' || !disableUsernameReplace) && wgUserName !== null)
         $('span.insertusername').html(wgUserName);
         $('span.insertusername').html(wgUserName);
});
});