Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4157140
initOnHook.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
initOnHook.js
View Options
const
ipReveal
=
require
(
'./ipReveal.js'
);
const
ipRevealUtils
=
require
(
'./ipRevealUtils.js'
);
/**
* Checks which users have been revealed recently, and reveals those users on load.
*
* @param {string|JQuery|*} documentRoot A DOM Element, Document, jQuery or selector
* to use as the root for searches.
*/
function
checkRecentlyRevealedUsers
(
documentRoot
)
{
const
recentUsers
=
[];
$
(
'.mw-tempuserlink'
,
documentRoot
).
each
(
function
()
{
const
target
=
$
(
this
).
text
();
// Trigger a lookup for one of each revealed user
if
(
ipRevealUtils
.
getRevealedStatus
(
target
)
&&
recentUsers
.
indexOf
(
target
)
<
0
)
{
$
(
this
).
next
(
'.ext-checkuser-tempaccount-reveal-ip-button'
).
trigger
(
'revealIp'
);
recentUsers
.
push
(
target
);
}
}
);
}
/**
* Code to run when the page loads.
*
* @param {string|JQuery|*} documentRoot A DOM Element, Document, jQuery or selector
* to use as context
*/
module
.
exports
=
function
(
documentRoot
)
{
if
(
!
documentRoot
)
{
documentRoot
=
document
;
}
mw
.
hook
(
'wikipage.content'
).
add
(
(
$content
)
=>
{
ipReveal
.
addButton
(
$content
);
checkRecentlyRevealedUsers
(
documentRoot
);
}
);
ipReveal
.
enableMultiReveal
(
$
(
documentRoot
)
);
checkRecentlyRevealedUsers
(
documentRoot
);
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 19 2026, 22:40 (8 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d6/56/3ff25619b61d3a2675addafc122f
Default Alt Text
initOnHook.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment