Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4126697
inline.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
851 B
Referenced Files
None
Subscribers
None
inline.js
View Options
/*
* Citizen
*
* Inline script used in includes/Hooks/SkinHooks.php
*/
/**
* Backported from MW 1.42
* Modified to use localStorage only
*/
window
.
clientPrefs
=
()
=>
{
let
className
=
document
.
documentElement
.
className
;
let
storage
;
try
{
// mw.storage is not available in this context
// eslint-disable-next-line mediawiki/no-storage
storage
=
localStorage
.
getItem
(
'mwclientpreferences'
);
}
catch
(
e
)
{
// localStorage is not available, ignore
}
if
(
storage
)
{
// TODO: Just use array for localStorage
storage
.
split
(
','
).
forEach
(
(
pref
)
=>
{
className
=
className
.
replace
(
new
RegExp
(
'(^| )'
+
pref
.
replace
(
/-clientpref-\w+$|[^\w-]+/g
,
''
)
+
'-clientpref-\\w+( |$)'
),
'$1'
+
pref
+
'$2'
);
}
);
document
.
documentElement
.
className
=
className
;
}
};
(
()
=>
{
window
.
clientPrefs
();
}
)();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 19, 08:13 (2 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0d/da/499e55dccd7ef56da9a196377f2a
Default Alt Text
inline.js (851 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment