You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UserHighlighterSimple/modules/UserHighlighterSimple.js
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,7 @@ export class UserHighlighterSimple {
157
157
returnfalse;
158
158
}
159
159
160
-
consttitle=this.getTitle(url,urlHelper);
160
+
consttitle=this.getTitle(url);
161
161
162
162
// Handle edge cases such as https://web.archive.org/web/20231105033559/https://en.wikipedia.org/wiki/User:SandyGeorgia/SampleIssue, which shows up as isUserPageLink = true but isn't really a user page.
163
163
try{
@@ -200,7 +200,7 @@ export class UserHighlighterSimple {
200
200
*/
201
201
addDomainIfMissing(url){
202
202
if(url.startsWith('/')){
203
-
url=window.location.origin+url;
203
+
url=this.window.location.origin+url;
204
204
}
205
205
returnurl;
206
206
}
@@ -212,7 +212,9 @@ export class UserHighlighterSimple {
212
212
* @param {mw.Uri} urlHelper
213
213
* @return {string}
214
214
*/
215
-
getTitle(url,urlHelper){
215
+
getTitle(url){
216
+
consturlHelper=newthis.mw.Uri(url);
217
+
216
218
// for links in the format /w/index.php?title=Blah
0 commit comments