Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7421216
ve.ui.MWWikitextWarningCommand.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ve.ui.MWWikitextWarningCommand.js
View Options
/*!
* VisualEditor UserInterface MediaWiki WikitextWarningCommand class.
*
* @copyright See AUTHORS.txt
*/
/**
* Wikitext warning command.
*
* @class
* @extends ve.ui.Command
*
* @constructor
*/
ve
.
ui
.
MWWikitextWarningCommand
=
function
VeUiMWWikitextWarningCommand
()
{
// Parent constructor
ve
.
ui
.
MWWikitextWarningCommand
.
super
.
call
(
this
,
'mwWikitextWarning'
);
this
.
warning
=
null
;
};
/* Inheritance */
OO
.
inheritClass
(
ve
.
ui
.
MWWikitextWarningCommand
,
ve
.
ui
.
Command
);
/* Methods */
/**
* @inheritdoc
*/
ve
.
ui
.
MWWikitextWarningCommand
.
prototype
.
execute
=
function
()
{
if
(
this
.
warning
&&
this
.
warning
.
isOpen
)
{
return
false
;
}
// eslint-disable-next-line no-jquery/no-html
const
$message
=
$
(
'<div>'
).
html
(
ve
.
init
.
platform
.
getParsedMessage
(
'visualeditor-wikitext-warning'
)
);
ve
.
targetLinksToNewWindow
(
$message
[
0
]
);
ve
.
init
.
platform
.
notify
(
$message
.
contents
(),
ve
.
msg
(
'visualeditor-wikitext-warning-title'
),
{
tag
:
'visualeditor-wikitext-warning'
}
).
then
(
(
message
)
=>
{
this
.
warning
=
message
;
}
);
return
true
;
};
/* Registration */
ve
.
ui
.
commandRegistry
.
register
(
new
ve
.
ui
.
MWWikitextWarningCommand
()
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 05:20 (1 d, 3 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
70/0f/acddb0e1db6cfbe5d4be7cf84d0f
Default Alt Text
ve.ui.MWWikitextWarningCommand.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment