Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5981602
ipRevealUtils.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
996 B
Referenced Files
None
Subscribers
None
ipRevealUtils.js
View Options
/**
* Gets the cookie key for a user.
*
* @param {string} user The username of the temporary account.
* @returns {string}
*/
function
getCookieKey
(
user
)
{
return
'mw-checkuser-temp-'
+
user
;
}
/**
* Gets the revealed status of a user.
*
* @param {string} user The username of the temporary account to check.
* @returns {null|true} The revealed status of the user (null if not revealed, true if revealed).
*/
function
getRevealedStatus
(
user
)
{
return
mw
.
storage
.
get
(
getCookieKey
(
user
)
);
}
/**
* Update the revealed status of a user to indicate that the user has been revealed.
*
* @param {string} user The username of the temporary account that has had its IPs revealed.
*/
function
setRevealedStatus
(
user
)
{
if
(
!
getRevealedStatus
(
getCookieKey
(
user
)
)
)
{
mw
.
storage
.
set
(
getCookieKey
(
user
),
true
,
mw
.
config
.
get
(
'wgCheckUserTemporaryAccountMaxAge'
)
);
}
}
module
.
exports
=
{
getRevealedStatus
:
getRevealedStatus
,
setRevealedStatus
:
setRevealedStatus
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 21:58 (1 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
85/c9/b82bf2c0fbfcc3d07d155cb9df5c
Default Alt Text
ipRevealUtils.js (996 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment