Content deleted Content added
0.9.145 pre testing |
Maintenance: Remove use of deprecated wgEnableAPI (always true) - mw:RL/MGU |
||
(2 intermediate revisions by one other user not shown) | |||
Line 40:
var WED;
var WikEdDiff;
//
Line 2,040 ⟶ 2,039:
// parse global-context (MediaWiki) variables into hash (for Greasemonkey)
var globalNames = ['skin', 'wgServer', 'wgTitle', 'wgCanonicalNamespace', 'wgArticlePath', 'wgScript', 'wgScriptPath', 'wgUserName', 'wgCurRevisionId', 'wgContentLanguage', 'wgUserLanguage
if (wikEd.greasemonkey === true) {
globalNames.push('wikEdConfig', 'wikEdText');
Line 3,497 ⟶ 3,496:
if (wikEd.fixRegExTypo !== null) {
wikEd.fixRegExTypo.style.display = 'none';
}
Line 8,548 ⟶ 8,539:
// check for named references defined outside edited section
if (
true
) {
Line 8,635 ⟶ 8,625:
// API request
if (
// get summary
Line 8,819 ⟶ 8,809:
// collapsible divs (common.js on ru)
if (typeof window.collapsibleDivs === 'function' ) {
window.collapsibleDivs();
}
// collapsible tables (common.js on ru)
if (typeof window.collapsibleTables === 'function' ) {
window.collapsibleTables();
}
Line 8,830 ⟶ 8,820:
if ( wikEd.loader === true ) {
if ( $( '.tex' ).length > 0 && window.mw.user.options.get( 'math' ) === '6' ) {
window.mw.loader.using( 'ext.math.mathjax.enabler', function () {
$( '#wikiPreview' ).renderTex();
} );
}
}
/*
// load media player modules and activate media elements
if ( wikEd.loader === true ) {
window.mw.loader.using( ['mw.MwEmbedSupport', 'mw.EmbedPlayer'], function() {
// activate media elements, from mw.PopUpMediaTransform.js, see https://bugzilla.wikimedia.org/show_bug.cgi?id=72675
Line 8,849 ⟶ 8,837:
var thisref = this;
window.mw.loader.using( 'mw.MwEmbedSupport', function () {
var $videoContainer = $( $( thisref ).parent().attr( 'videopayload' ) );
window.mw.addDialog( {
'width' : 'auto',
'height' : 'auto',
'title' : window.mw.html.escape( $videoContainer.find('video,audio').attr('data-mwtitle') ),
'content' : $videoContainer,
'close' : function() {
Line 8,875 ⟶ 8,863:
}
else if ( parent.attr( 'data-videopayload' ) ) {
var link = $( this ).attr( 'href' ), title = window.mw.Title.newFromImg( { src: link } );
if ( title && title.getPrefixedDb() !== window.mw.config.get( 'wgPageName' ) ) {
$( this ).attr( 'href', title.getUrl() );
}
}
} );
} );
}
*/
// fire mediawiki hook to apply changes to preview content: <categorytree>, <math>
if ( window.mw !== undefined && window.mw.hook !== undefined && window.mw.hook( 'wikipage.content' ).fire !== undefined ) {
Line 10,879 ⟶ 10,867:
// check if api is enabled
if
return;
}
|