Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4077903
ext.scribunto.errors.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ext.scribunto.errors.js
View Options
(
()
=>
{
mw
.
hook
(
'wikipage.content'
).
add
(
()
=>
{
const
regex
=
/\bmw-scribunto-error-(\w+)\b/
;
let
popup
;
$
(
'.scribunto-error'
).
each
(
(
index
,
span
)
=>
{
let
matches
=
regex
.
exec
(
span
.
className
);
if
(
matches
===
null
)
{
// T375539: backward-compatibility with old cached HTML
matches
=
regex
.
exec
(
span
.
id
);
}
if
(
matches
===
null
)
{
mw
.
log
(
'mw.scribunto.errors: regex mismatch!'
);
return
;
}
const
$span
=
$
(
span
);
$span
.
on
(
'click'
,
()
=>
{
const
error
=
mw
.
config
.
get
(
'ScribuntoErrors-'
+
matches
[
1
]
);
if
(
typeof
error
!==
'string'
)
{
mw
.
log
(
'mw.scribunto.errors: error '
+
matches
[
1
]
+
' not found.'
);
return
;
}
if
(
!
popup
)
{
popup
=
new
OO
.
ui
.
PopupWidget
(
{
padded
:
true
,
head
:
true
,
label
:
$
(
'<div>'
)
.
text
(
mw
.
msg
(
'scribunto-parser-dialog-title'
)
)
.
addClass
(
'scribunto-error-label'
)
}
);
OO
.
ui
.
getDefaultOverlay
().
append
(
popup
.
$element
);
}
popup
.
$body
.
html
(
error
);
popup
.
setFloatableContainer
(
$span
);
popup
.
toggle
(
true
);
}
);
}
);
}
);
}
)();
File Metadata
Details
Attached
Mime Type
text/x-asm
Expires
Aug 18 2026, 03:41 (9 w, 21 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b7/9d/927199003de56a044cfbd99e69d0
Default Alt Text
ext.scribunto.errors.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment