Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4056783
ext.dismissableSiteNotice.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
927 B
Referenced Files
None
Subscribers
None
ext.dismissableSiteNotice.js
View Options
(
function
()
{
const
cookieName
=
'dismissSiteNotice'
,
siteNoticeId
=
mw
.
config
.
get
(
'wgSiteNoticeId'
);
// If no siteNoticeId is set, exit.
if
(
!
siteNoticeId
)
{
return
;
}
// If the user has the notice dismissal cookie set, exit.
if
(
$
.
cookie
(
cookieName
)
===
siteNoticeId
)
{
return
;
}
// Otherwise, show the notice ...
mw
.
util
.
addCSS
(
'.client-js .mw-dismissable-notice { display: block; }'
);
// ... and enable the dismiss button.
$
(
()
=>
{
// eslint-disable-next-line no-jquery/no-global-selector
$
(
'.mw-dismissable-notice-close'
)
.
css
(
'visibility'
,
'visible'
)
.
find
(
'a'
)
.
on
(
'click keypress'
,
function
(
e
)
{
if
(
e
.
type
===
'click'
||
e
.
type
===
'keypress'
&&
e
.
which
===
13
)
{
$
(
this
).
closest
(
'.mw-dismissable-notice'
).
hide
();
$
.
cookie
(
cookieName
,
siteNoticeId
,
{
expires
:
30
,
path
:
'/'
}
);
}
}
);
}
);
}()
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 16 2026, 03:38 (12 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
54/b4/00f12a6580bbdc0d5c1c99780856
Default Alt Text
ext.dismissableSiteNotice.js (927 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment