Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5968128
initOnLoad.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
935 B
Referenced Files
None
Subscribers
None
initOnLoad.js
View Options
const
ipReveal
=
require
(
'./ipReveal.js'
);
const
ipRevealUtils
=
require
(
'./ipRevealUtils.js'
);
/**
* Run code when the page loads.
*
* @param {string|*} documentRoot A Document or selector to use as the root of the
* search for elements
*/
module
.
exports
=
function
(
documentRoot
)
{
if
(
!
documentRoot
)
{
documentRoot
=
document
;
}
ipReveal
.
addButton
(
$
(
'#bodyContent'
,
documentRoot
)
);
ipReveal
.
enableMultiReveal
(
$
(
documentRoot
)
);
// Check which users have been revealed recently, and reveal them on load.
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
);
}
}
);
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 12:51 (2 d, 12 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3d/7d/3e03c59a00a5437593550ff0c97f
Default Alt Text
initOnLoad.js (935 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment