MediaWiki:Common.js
Внешний вид
Замечание: Возможно, после публикации вам придётся очистить кэш своего браузера, чтобы увидеть изменения.
- Firefox / Safari: Удерживая клавишу Shift, нажмите на панели инструментов Обновить либо нажмите Ctrl+F5 или Ctrl+R (⌘+R на Mac)
- Google Chrome: Нажмите Ctrl+Shift+R (⌘+Shift+R на Mac)
- Edge: Удерживая Ctrl, нажмите Обновить либо нажмите Ctrl+F5
- Opera: Нажмите Ctrl+F5.
/* Размещённый здесь код JavaScript будет загружаться пользователям при обращении к каждой странице */
function showHideFootnote(){document.body.classList.toggle("hide-footnotes");}
document.body.innerHTML = document.body.innerHTML.replace(/\[#(\s)?(\w+)\]/g, '<sup class="footnote">[#$2]</sup>');
document.body.innerHTML = document.body.innerHTML+
`<a id="footnotes-visibility-trigger" onclick="showHideFootnote()" href="javascript:void(0)">PN</a>
<style>
sup.footnote{color: #3eaf7c !important; cursor: pointer}
.hide-footnotes sup.footnote{display:none}
#footnotes-visibility-trigger {
border-radius: 50px;
width: 35px;
height: 35px;
display: block;
line-height: 33px;
text-align: center;
text-decoration: none;
border: 2px solid #5cb53f;
position: fixed;
right: 20px;
bottom: 60px;
color: #5cb53f;
background-color: #fff;
font-weight: 700;
transition: all 0.1s ease-in-out;
}
.hide-footnotes #footnotes-visibility-trigger {
color: #e96c6c;
border-color: #e96c6c;
}
#footnotes-visibility-trigger:hover{
opacity: 0.8
}
</style>
`;