Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F2751165
ext.translate.recentgroups.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
675 B
Referenced Files
None
Subscribers
None
ext.translate.recentgroups.js
View Options
(
function
()
{
'use strict'
;
mw
.
translate
=
mw
.
translate
||
{};
/**
* Simple wrapper for storing recent groups for an user.
*
* @internal
* @class mw.translate.recentGroups
* @singleton
* @since 2016.03
*/
mw
.
translate
.
recentGroups
=
{
get
:
function
()
{
return
JSON
.
parse
(
mw
.
storage
.
get
(
'translate-recentgroups'
)
)
||
[];
},
append
:
function
(
value
)
{
var
items
=
this
.
get
();
items
.
unshift
(
value
);
items
=
items
.
filter
(
function
(
item
,
index
,
array
)
{
return
array
.
indexOf
(
item
)
===
index
;
}
);
items
=
items
.
slice
(
0
,
5
);
mw
.
storage
.
set
(
'translate-recentgroups'
,
JSON
.
stringify
(
items
)
);
}
};
}()
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 3, 17:59 (1 d, 47 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8d/7e/337e50c0d1f5e1c42bb72a1b9853
Default Alt Text
ext.translate.recentgroups.js (675 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment