MediaWiki:Common.js: различия между версиями
Нет описания правки |
закрытие уязвимости в нигилизме Метка: отменено |
||
| Строка 2: | Строка 2: | ||
$(function () { | $(function () { | ||
var nihilism = $('#nihilism'); | var nihilism = $('#nihilism'); | ||
if (nihilism[0] | if (!nihilism[0] || document.location.href.match("diff")) { | ||
return; | |||
} | } | ||
var msg = nihilism.text(); | |||
if (!nihilism.hasClass('nihilism-no-white')) { | |||
$('body').css('background-color', 'white'); | |||
} | |||
$('body').empty(); | |||
var divNihilism = $('<div class="mw-parser-output"></div>').text(msg); | |||
if (nihilism.css('top') == '0px') { | |||
$('body').css({'top': '0px', 'left': '0px'}); | |||
} | |||
$('body').append(divNihilism); | |||
$(document).dblclick(function () { | |||
window.location = mw.util.getUrl(null, {'action': 'edit'}); | |||
}); | |||
}); | }); | ||
/* Стирание памяти для [[MIB]] («Людей в чёрном») */ | /* Стирание памяти для [[MIB]] («Людей в чёрном») */ | ||