Page MenuHomeWickedGov Phorge

inline.js
No OneTemporary

Size
851 B
Referenced Files
None
Subscribers
None

inline.js

/*
* 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

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)

Event Timeline