Implement changes according to feedback: (41f67bbe) · Commits · repos / commtech / AutosuggestSitelink · GitLab
Admin message
How to register an account on GitLab
. Due to spam, new accounts are locked until approved by an admin or
the approver bot
. Your GitLab account gets automatically approved within one hour if you are a member of
Trusted Contributors in Gerrit
, or a member of the
Trusted-Contributors group in Phabricator
and
linked your Developer account ("LDAP") to your Phabricator account
. If none of these apply,
file an unlock request
to expedite access.
Only if you are WMF staff
: Create your GitLab account,
have "Wmf" group membership
in
IDM
link your Developer account ("LDAP") to your Phabricator account
, and get automatically approved.
Admin message
Support:
mw:GitLab
how to host a project on GitLab
#wikimedia-gitlab
on libera.chat,
#GitLab
on Phabricator.
Commit
41f67bbe
authored
Dec 14, 2022
by
HMonroy
Browse files
parent
a46aafc9
Loading
Loading
Loading
Loading
Original line number
Diff line number
Diff line
@@ -52,7 +52,8 @@ class AutoSuggestSiteLink {
format
json
action
query
list
srsearch
this
page
srsearch
this
page
srprop
size|wordcount|timestamp|snippet|titlesnippet
};
this
api
get
params
).
done
data
=>
if
data
query
@@ -82,7 +83,7 @@ class AutoSuggestSiteLink {
var
$addButton

text
addwikidata
attr
id
item-add-link-
item
title
at
item
item
title
at
tr
data-
item
item
title
on
click
=>
preventDefault
();
var
selectedItem
target
@@ -102,7 +103,7 @@ class AutoSuggestSiteLink {
text
item
title
),

text
this
page
),
text
item
titlesnippet
),

).
text
),

@@ -119,7 +120,8 @@ class AutoSuggestSiteLink {
mw
notify
$siteLinkList
tag
wikidata-link
id
wikidata-autosuggest
autoHideSeconds
long
autoHide
false
title
Title
);
);
@@ -520,13 +522,13 @@ function init() {
var
namespaceNumber
mw
config
get
wgNamespaceNumber
);
var
namespace
mw
config
get
wgFormattedNamespaces
)[
namespaceNumber
if
namespace
===
User
if
mw
config
get
wgNamespaceNumber
!==
return
Promise
all
// Resource loader modules
mw
loader
using
mediawiki.action.view.postEdit
mediawiki.
pi
mediawiki.Title
),
mw
loader
using
mediawiki.action.view.postEdit
mediawiki.
ForeignA
pi
mediawiki.Title
),
).
then
()
=>
mw
config
get
wgFormattedNamespaces
)[
namespace
new
AutoSuggestSiteLink
();
);
Loading