Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1426018
util.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
util.js
View Options
const
util
=
{
/**
* Get the message for the given block flag
*
* @param {string} flag
* @return {string}
*/
getBlockFlagMessage
:
function
(
flag
)
{
// Potential messages:
// * block-log-flags-anononly
// * block-log-flags-nocreate
// * block-log-flags-noautoblock
// * block-log-flags-noemail
// * block-log-flags-nousertalk
// * block-log-flags-angry-autoblock
// * block-log-flags-hiddenname
return
mw
.
message
(
'block-log-flags-'
+
flag
).
text
();
},
/**
* Format a timestamp
*
* @param {string} timestamp
* @param {string} duration
* @return {string}
*/
formatTimestamp
:
function
(
timestamp
,
duration
)
{
if
(
mw
.
util
.
isInfinity
(
duration
)
)
{
return
mw
.
msg
(
'infiniteblock'
);
}
return
new
Date
(
timestamp
).
toLocaleString
();
},
/**
* Get the message for a given block action
*
* @param {string} action
* @return {string}
*/
getBlockActionMessage
:
function
(
action
)
{
// Potential messages:
// * log-action-filter-block-block
// * log-action-filter-block-reblock
// * log-action-filter-block-unblock
return
mw
.
message
(
'log-action-filter-block-'
+
action
).
text
();
}
};
module
.
exports
=
util
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 12:26 (1 d, 4 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b5/11/766eceabee4357c06f54195777a5
Default Alt Text
util.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment