jenkins-bot has submitted this change and it was merged.
Change subject: Make mw.scribunto.edit not try to set undefined mw.scribunto
......................................................................
Make mw.scribunto.edit not try to set undefined mw.scribunto
Not sure how this was missed in I1577dab2.
Bug: T93051
Change-Id: Ie2f2c6f7cbd80bca2ca493f1fe5a4f2ca7d02387
---
M modules/ext.scribunto.edit.js
1 file changed, 43 insertions(+), 49 deletions(-)
Approvals:
BryanDavis: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ext.scribunto.edit.js b/modules/ext.scribunto.edit.js
index 19db3e9..1de63e5 100644
--- a/modules/ext.scribunto.edit.js
+++ b/modules/ext.scribunto.edit.js
@@ -341,58 +341,52 @@
refocus();
}
- mw.scribunto.edit = {
- init: function () {
- var action = mw.config.get( 'wgAction' );
- if ( action === 'edit' || action === 'submit' || action
=== 'editredlink' ) {
- this.initEditPage();
- }
- },
-
- initEditPage: function () {
- var console = document.getElementById(
'mw-scribunto-console' );
- if ( !console ) {
- return;
- }
-
- $( '<fieldset>' )
- .attr( 'class', 'mw-scribunto-console-fieldset'
)
- .append( $( '<legend>' ).text( mw.msg(
'scribunto-console-title' ) ) )
- .append( $( '<div
id="mw-scribunto-output"></div>' ) )
- .append(
- $( '<div>' ).append(
- $( '<textarea>' )
- .attr( {
- id:
'mw-scribunto-input',
- 'class':
'mw-scribunto-input',
- wrap: 'off',
- rows: 1,
- dir: 'ltr',
- lang: 'en'
- } )
- .bind( 'keydown',
inputKeydown )
- .bind( 'focus',
inputFocus )
- )
- )
- .append(
- $( '<div>' ).append(
- $( '<input>' )
- .attr( {
- type: 'button',
- value: mw.msg(
'scribunto-console-clear' )
- } )
- .bind( 'click',
onClearClick )
- )
- )
- .wrap( '<form>' )
- .appendTo( console );
-
- initConsole();
+ function initEditPage() {
+ var console = document.getElementById( 'mw-scribunto-console' );
+ if ( !console ) {
+ return;
}
- };
+
+ $( '<fieldset>' )
+ .attr( 'class', 'mw-scribunto-console-fieldset' )
+ .append( $( '<legend>' ).text( mw.msg(
'scribunto-console-title' ) ) )
+ .append( $( '<div id="mw-scribunto-output"></div>' ) )
+ .append(
+ $( '<div>' ).append(
+ $( '<textarea>' )
+ .attr( {
+ id:
'mw-scribunto-input',
+ 'class':
'mw-scribunto-input',
+ wrap: 'off',
+ rows: 1,
+ dir: 'ltr',
+ lang: 'en'
+ } )
+ .bind( 'keydown', inputKeydown )
+ .bind( 'focus', inputFocus )
+ )
+ )
+ .append(
+ $( '<div>' ).append(
+ $( '<input>' )
+ .attr( {
+ type: 'button',
+ value: mw.msg(
'scribunto-console-clear' )
+ } )
+ .bind( 'click', onClearClick )
+ )
+ )
+ .wrap( '<form>' )
+ .appendTo( console );
+
+ initConsole();
+ }
$( function () {
- mw.scribunto.edit.init();
+ var action = mw.config.get( 'wgAction' );
+ if ( action === 'edit' || action === 'submit' || action ===
'editredlink' ) {
+ initEditPage();
+ }
} );
} )( jQuery, mediaWiki );
--
To view, visit https://gerrit.wikimedia.org/r/197571
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2f2c6f7cbd80bca2ca493f1fe5a4f2ca7d02387
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits