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