Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4112289
watchlistExpiry.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
847 B
Referenced Files
None
Subscribers
None
watchlistExpiry.js
View Options
/*!
* Scripts for WatchlistExpiry on action=edit
*/
'use strict'
;
// Toggle the watchlist-expiry dropdown's disabled state according to the
// selected state of the watchthis checkbox.
$
(
()
=>
{
// The 'wpWatchthis' and 'wpWatchlistExpiry' fields come from EditPage.php.
const
watchThisNode
=
document
.
getElementById
(
'wpWatchthisWidget'
),
expiryNode
=
document
.
getElementById
(
'wpWatchlistExpiryWidget'
);
if
(
watchThisNode
&&
expiryNode
)
{
const
watchThisWidget
=
OO
.
ui
.
infuse
(
watchThisNode
);
const
expiryWidget
=
OO
.
ui
.
infuse
(
expiryNode
);
// Set initial state to match the watchthis checkbox.
expiryWidget
.
setDisabled
(
!
watchThisWidget
.
isSelected
()
);
// Change state on every change of the watchthis checkbox.
watchThisWidget
.
on
(
'change'
,
(
enabled
)
=>
{
expiryWidget
.
setDisabled
(
!
enabled
);
}
);
}
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 18, 22:47 (9 h, 7 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0e/41/51f5e5f6721925663a1f44f78a11
Default Alt Text
watchlistExpiry.js (847 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment