Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4090306
dblClickEdit.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
599 B
Referenced Files
None
Subscribers
None
dblClickEdit.js
View Options
/*!
* Enable double-click-to-edit functionality.
*/
(
function
()
{
if
(
Number
(
mw
.
user
.
options
.
get
(
'editondblclick'
)
)
!==
1
)
{
// Support both 1 or "1" (T54542)
return
;
}
if
(
mw
.
config
.
get
(
'wgAction'
)
!==
'view'
)
{
// Only trigger during view action.
return
;
}
$
(
()
=>
{
$
(
'#mw-content-text'
).
on
(
'dblclick'
,
(
e
)
=>
{
// Trigger native HTMLElement click instead of opening URL (T45052)
const
$a
=
$
(
'#ca-edit a'
);
// Not every page has an edit link (T59713)
if
(
$a
.
length
)
{
e
.
preventDefault
();
$a
.
get
(
0
).
click
();
}
}
);
}
);
}()
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 18 2026, 11:01 (5 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
af/b9/18437e9c3c1466a2af3664958edd
Default Alt Text
dblClickEdit.js (599 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment