Revision as of 15:13, 5 April 2015 view sourceEdokter (talk | contribs)Extended confirmed users55,830 edits remove topicon; no longer exists← Previous edit |
Latest revision as of 20:03, 11 March 2021 view source Jon (WMF) (talk | contribs)Extended confirmed users1,203 edits maintenance: more info ReferenceError: mwCustomEditButtons is not defined |
(8 intermediate revisions by 5 users not shown) |
Line 8: |
Line 8: |
|
* Maintainers: ], ] |
|
* Maintainers: ], ] |
|
*/ |
|
*/ |
|
// Not in IE6, only when editing/previewing a page |
|
// Only when editing/previewing a page |
|
if ( ( navigator.userAgent.indexOf( 'MSIE 6' ) == -1 ) && (mw.config.get( 'wgAction' ) == 'submit' || mw.config.get( 'wgAction' ) == 'view' ) ) { |
|
if ( mw.config.get( 'wgAction' ) == 'submit' || mw.config.get( 'wgAction' ) == 'view' ) { |
|
jQuery( function( $ ) { |
|
$( function() { |
|
⚫ |
// If there is a dismissible sitenotice or an (expanded) centralnotice |
|
⚫ |
if ( $( '#mw-dismissible-notice' ).length || $( '#centralNotice' ).hasClass('expanded') ) { |
|
⚫ |
mw.util.addCSS( '#bodyContent { position: relative; } #coordinates { position: absolute; top: 1px !important; }' ); |
|
|
} |
|
⚫ |
} ); |
|
⚫ |
} |
|
|
|
|
|
|
// Add support for legacy methods still being used by logged in users in their user scripts so these do not log as errors |
|
var $cNote = $( '#centralNotice' ); |
|
|
|
// Please talk to ] before removing. |
⚫ |
// If there is no dismissible sitenotice and no expanded centralnotice: |
|
⚫ |
if ( !$( '#mw-dismissible-notice' ).length && !( $cNote.length && $cNote.hasClass('expanded') ) ) { |
|
|
return; |
|
⚫ |
} |
|
|
// Otherwise: |
|
⚫ |
mw.util.addCSS( '#bodyContent { position: relative; } #coordinates { position: absolute; top: 1px !important; }' ); |
|
|
|
|
|
|
|
function stubMissingFunctionError( method, rtnValue ) { |
⚫ |
} ); |
|
|
|
if(window) return; |
|
|
window = function () { |
|
|
mw.log.error('Monobook.js says - A user script or gadget you have loaded is using a deprecated method:' + method); |
|
|
return rtnValue; |
|
|
}; |
|
|
} |
|
|
stubMissingFunctionError('getElementsByClassName', ); |
|
|
stubMissingFunctionError('sajax_init_object'); |
|
|
stubMissingFunctionError('appendCSS'); |
|
|
stubMissingFunctionError('akeytt'); |
|
|
stubMissingFunctionError('attachEvent'); |
|
|
if (typeof InstaView === 'undefined') { |
|
|
window.InstaView = {}; // seeing various Uncaught ReferenceError: InstaView is not defined errors. Can be removed when addressed in https://global-search.toolforge.org/?q=InstaView%5C.®ex=1&namespaces=&title=.*%2Fmonobook%5C.js |
|
} |
|
} |
|
|
// Avoid issue in old Monobook scripts: ReferenceError: mwCustomEditButtons is not defined |
|
|
if(typeof mwCustomEditButtons !== 'undefined') window.mwCustomEditButtons = ; |