Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6073116
editwatchlist.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
editwatchlist.js
View Options
/*!
* JavaScript for Special:EditWatchlist
*/
(
function
()
{
$
(
()
=>
{
let
checkAllChangeOngoing
=
false
;
let
multiselectChangeOngoing
=
false
;
const
checkAllCheckboxes
=
$
(
'.mw-watchlistedit-checkall .oo-ui-checkboxInputWidget'
)
.
toArray
()
.
map
(
(
element
)
=>
OO
.
ui
.
infuse
(
element
)
);
const
multiselects
=
$
(
'.mw-watchlistedit-check .oo-ui-checkboxMultiselectInputWidget'
)
.
toArray
()
.
map
(
(
element
)
=>
OO
.
ui
.
infuse
(
element
).
checkboxMultiselectWidget
);
checkAllCheckboxes
.
forEach
(
(
checkbox
,
index
)
=>
{
checkbox
.
on
(
'change'
,
(
isChecked
)
=>
{
if
(
multiselectChangeOngoing
)
{
return
;
}
checkAllChangeOngoing
=
true
;
// Select or de-select all the title checkboxes for this namespace
const
multiselect
=
multiselects
[
index
];
multiselect
.
selectItems
(
isChecked
?
multiselect
.
items
:
[]
);
checkAllChangeOngoing
=
false
;
}
);
}
);
multiselects
.
forEach
(
(
multiselect
,
index
)
=>
{
multiselect
.
on
(
'change'
,
()
=>
{
if
(
checkAllChangeOngoing
)
{
return
;
}
multiselectChangeOngoing
=
true
;
// Update the state of the check-all checkbox for this namespace
const
checkAllCheckbox
=
checkAllCheckboxes
[
index
];
const
numSelectedItems
=
multiselect
.
findSelectedItems
().
length
;
if
(
numSelectedItems
===
multiselect
.
items
.
length
)
{
checkAllCheckbox
.
setSelected
(
true
);
checkAllCheckbox
.
setIndeterminate
(
false
);
}
else
if
(
numSelectedItems
===
0
)
{
checkAllCheckbox
.
setSelected
(
false
);
checkAllCheckbox
.
setIndeterminate
(
false
);
}
else
{
checkAllCheckbox
.
setIndeterminate
(
true
);
}
multiselectChangeOngoing
=
false
;
}
);
}
);
}
);
}()
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 5 2026, 07:57 (6 w, 22 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
27/90/de878cfa9196ed351a9e83f799c6
Default Alt Text
editwatchlist.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment