Участник:Jack who built the house/common.js: различия между версиями

Содержимое удалено Содержимое добавлено
Нет описания правки
Нет описания правки
Строка 5:
// mw.loader.load('https://ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-referenceTooltips.css&action=raw&ctype=text/css', 'text/css');
 
if (mw.config.get('wgPageName') === 'Участник:Jack_who_built_the_house/песочница8') {
$('<div>')
.attr('id', 'mainpage-search')
.attr('role', 'search')
.append($('<form>')
.attr('action', '/w/index.php')
.append($('<div>')
.attr('id', 'simpleSearch')
.append(
'<input type="search" name="search" placeholder="Искать в Википедии" title="Искать в Википедии" autocomplete="off" class="mw-searchInput">',
'<input type="hidden" value="Служебная:Поиск" name="title">',
'<input type="submit" name="go" value="Перейти" title="Перейти к странице, имеющей в точности такое название" id="searchButton" class="searchButton">'
)
)
)
.appendTo($('#mw-content-text'));
 
//importScript('Участник:Iniquity/cd-formatButtons.js');
//importScript('Участник:Iniquity/cd-charinsertButtons.js');
var cdAllowEditOthersMsgs = true;
var cdAllowEditOthersComments = true;
Строка 30 ⟶ 10 :
importScript('Участник:Jack who built the house/convenientDiscussions.js');
mw.hook('cd.msgsReady').add(function () {
importScript('Участник:АлександрJack who built the Дмитриевhouse/comments in local time ru.js');
});
 
importScript('MediaWiki:Gadget-ShowJavascriptErrors.js', 'en');
 
var hash = navigator.userAgent.indexOf( 'Firefox' ) === -1 ?
location.hash :
decodeURIComponent( location.hash );
if ( hash.indexOf( ' ' ) !== -1 ) {
Строка 45 ⟶ 26 :
console.log(typeof history);
if ( typeof history !== 'undefined' ) {
console.log( history.replaceState + '' );
history.replaceState( {}, '', '#' + restoredFragment );
}
Строка 53 ⟶ 34 :
}
}
 
$( 'a#top' ).after( $( '<a>', { id: '.D0.9F.D1.80.D0.B5.D0.B0.D0.BC.D0.B1.D1.83.D0.BB.D0.B0' } ) );
 
var atpCodeStyler = true;
Строка 94 ⟶ 73 :
 
// if ($('#mw-fr-reviewform').length && (!$('#wpaccuracy:checked').length && !($('#mw-fr-submit-accept:disabled').length && $('#mw-fr-submit-unaccept:disabled').length)))
if ($('#mw-fr-reviewform').length && $('#mw-fr-reviewformlegend').text() != 'Перепроверить эту версию') {
$('#mw-fr-reviewform').show();
 
mw.loader.using('mediawiki.util', function() {
Строка 124 ⟶ 104 :
$('.ace_editor').css('font-size', '13px');
$('.ace_editor').css('line-height', '1.2em');
var printMargin = 100;
function setPrintMargin() {
$('.ace_print-margin').css('left', 4 + printMargin * 7.147725 + 'px');
}
setTimeout(setPrintMargin, 600);
setTimeout(setPrintMargin, 2000);
}, 2000);
});
Строка 149 ⟶ 122 :
 
// Старая панель редактирования
// if ( [ 'edit', 'submit' ].includes( mw.config.get( 'wgAction' ) ) ) {
// importScript( 'MediaWiki:Gadget-LegacyToolbar2006.js' );
// }
// mw.hook( 'legacy.toolbar.ready' ).add( function () {
// mw.toolbar.addButtons({
// imageFile: "//upload.wikimedia.org/wikipedia/commons/5/5e/Button_non.png",
{
// speedTip: 'Зачёркнутый текст',
imageFile: "//upload.wikimedia.org/wikipedia/commons/5/5e/Button_non.png",
// tagOpen: "<s>",
speedTip: 'Зачёркнутый текст',
// tagOpentagClose: "</s>",
// sampleText: 'Зачёркнутый текст',
tagClose: "</s>",
// imageId: "mw-editbutton-strike"
sampleText: 'Зачёркнутый текст',
// });
imageId: "mw-editbutton-strike"
// } );
}
);
} );
 
//importScript('Участник:Serhio Magpie/enhanceWikitextEditor.js');