|
@@ -437,9 +437,9 @@ function fandom_check_wiki(lang, msg, title, wiki, cmd, reaction, spoiler = '',
|
|
|
if ( project ) {
|
|
|
let regex = ( iw.host + iw.pathname ).match( new RegExp( '^' + project.regex + '(?:' + project.articlePath + '|/?$)' ) );
|
|
|
if ( regex ) {
|
|
|
- let iwtitle = decodeURIComponent( iw.pathname.replace( regex[0], '' ) ).replace( /_/g, ' ' );
|
|
|
+ let iwtitle = decodeURIComponent( ( iw.host + iw.pathname ).replace( regex[0], '' ) ).replace( /_/g, ' ' );
|
|
|
cmd = '!!' + regex[1] + ' ';
|
|
|
- return this.gamepedia(lang, msg, iwtitle, new Wiki(iw.origin + project.scriptPath), cmd, reaction, spoiler, iw.searchParams, fragment, iw.href, selfcall);
|
|
|
+ return this.gamepedia(lang, msg, iwtitle, new Wiki('https://' + regex[1] + project.scriptPath), cmd, reaction, spoiler, iw.searchParams, fragment, iw.href, selfcall);
|
|
|
}
|
|
|
}
|
|
|
}
|