We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06f390e commit c284d9cCopy full SHA for c284d9c
ReFillLink.js
@@ -1,5 +1,7 @@
1
// Thanks to [[User:Qcne]] for the idea. Please uninstall any old ReFill scripts to avoid double links!
2
-if ( mw.config.get( 'wgNamespaceNumber' ) >= 0 ) {
+const pageExists = mw.config.get('wgArticleId') > 0;
3
+const notSpecialOrFileNamespace = mw.config.get( 'wgNamespaceNumber' ) >= 0;
4
+if ( pageExists && notSpecialOrFileNamespace ) {
5
mw.util.addPortletLink(
6
'p-cactions',
7
'https://refill.toolforge.org/ng/result.php?page=' + encodeURIComponent( mw.config.get( 'wgPageName' ) ) + '&defaults=y&nowatch=y&wiki=en',
0 commit comments