Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7419338
initOnHook.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
774 B
Referenced Files
None
Subscribers
None
initOnHook.js
View Options
const
ipReveal
=
require
(
'./ipReveal.js'
);
/**
* Add IP reveal functionality to a page that automatically updates.
*
* This is very similar to initOnLoad, except:
* - Multi-reveal functionality is enabled once, on page load.
* - New buttons and new revealed IPs are potentially added each time the page updates.
*
* @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
)
=>
{
const
$ipRevealButtons
=
ipReveal
.
addIpRevealButtons
(
$content
);
ipReveal
.
automaticallyRevealUsers
(
$ipRevealButtons
);
}
);
ipReveal
.
enableMultiReveal
(
$
(
documentRoot
)
);
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 04:24 (1 d, 6 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
36/c8/e2dae442c042a331e48ed818a4d7
Default Alt Text
initOnHook.js (774 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment