Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Викификатор */
function addWikifButton() {
var toolbar = document.getElementById('toolbar')
if (!toolbar) return
var i = document.createElement('img')
i.src = '//upload.wikimedia.org/wikisource/ru/d/d1/Button-wikifikator.png'
i.alt = i.title = 'викификатор'
i.onclick = Wikify
i.style.cursor = 'pointer'
toolbar.appendChild(i)
}
if ((wgAction == 'edit' || wgAction == 'submit') && typeof Wikify === 'undefined') {
importScriptPage('MediaWiki:Wikificator.js', 'ru.pern');
addOnloadHook(addWikifButton)
}
/*Кнопка викификатора рядом с парсером Fngplg */
mw.hook('wikificator.ready').add(function() {
!function( mw, $ ) {
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' )) === -1 ) return;
$( '<button />', {
id: 'my-id-for-wikificator',
class: 'wikify',
style: 'float: right; margin-bottom: 5px;',
text: 'WikiF',
type: 'button'
})
.insertAfter( '.wpSummary_canMinorEdit' );
}( mediaWiki, jQuery );
});
/* Парсер текста написанный участником Kopcap94. Конвертирует ASCII в кириллицу */
!function( mw, $ ) {
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' )) === -1 ) return;
$( '<button />', {
id: 'linkParser',
style: 'float: right; margin-bottom: 5px;',
text: 'Parse',
type: 'button'
})
.insertAfter( '.wpSummary_canMinorEdit' )
.on( 'click', function() {
var text = $( '#wpTextbox1' ).val(),
new_text = text;
$.each( text.match( /(%[A-Za-z0-9]{2}){1,}/g ), function( i, v ) {
try {
new_text = new_text.replace( v, decodeURIComponent( v ) );
} catch( e ) {
console.log( 'There was error ( ' + e + ' ) during attempt to parse this: ' + v );
}
});
$( '#wpTextbox1' ).val( new_text );
});
}( mediaWiki, jQuery );
/* PatrolRC добавляет ссылки патрулирования правок */
importArticles({
type: 'script',
articles: [
'u:dev:PatrolRC/code.js',
]
});