Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4150915
watchlistexpiry.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
909 B
Referenced Files
None
Subscribers
None
watchlistexpiry.js
View Options
(
function
()
{
/**
* On touch devices, make it possible to click on the watchlist expiry clock icon
* and get a text display of the remaining days or hours for that watchlist item.
*
* @private
* @param {Event} event The click event.
*/
function
addDaysLeftMessages
(
event
)
{
const
$clock
=
$
(
event
.
target
);
const
timeLeft
=
$clock
.
data
(
'days-left'
);
if
(
timeLeft
===
undefined
)
{
// Give up if there's no data attribute (e.g. in the watchlist legend).
return
;
}
const
msg
=
timeLeft
>
0
?
mw
.
msg
(
'watchlist-expiry-days-left'
,
timeLeft
)
:
mw
.
msg
(
'watchlist-expiry-hours-left'
);
$clock
.
after
(
$
(
'<span>'
)
.
addClass
(
'mw-watchlistexpiry-msg'
)
.
text
(
mw
.
msg
(
'parentheses'
,
msg
)
)
);
}
$
(
()
=>
{
if
(
'ontouchstart'
in
document
.
documentElement
)
{
$
(
'.mw-changesList-watchlistExpiry'
).
one
(
'click'
,
addDaysLeftMessages
);
}
}
);
}()
);
File Metadata
Details
Attached
Mime Type
text/x-asm
Expires
Aug 19 2026, 19:46 (7 w, 12 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b6/9c/3c52ab07879f7f752c61e8886e01
Default Alt Text
watchlistexpiry.js (909 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment