Page MenuHomePhabricator

Create a config option to alter URL path for wikis not using index.php
Open, Needs TriagePublicFeature

Description

I use PopUps in translatewiki.net. However and because they do not use index.php?... but i.php?... in their diff URLs (e.g. diff link) the script crashes:

Browser Console Log (using PopUps in translatewiki.net)
19:05:16.145 Uncaught TypeError: this.value is null
    namespaceId https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:49
    isInStrippableNamespace https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:53
    getPrintFunction https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:127
    html https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:123
    navlinkStringToHTML https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:123
    popupTopLinks https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:23
    popupTopLinks https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:23
    fillEmptySpans https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:64
    simplePopupContent https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:6
    mouseOverWikiLink2 https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:6
    mouseOverWikiLink https://en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups:4
load.php:49:946
19:05:16.154 XHRPOSThttps://translatewiki.net/w/webfiles/jserror.php
[HTTP/2 200 OK 69ms]

This doesn't happen for page popups as they use the same URL path structure the WMF uses.

I was wondering if the gadget could be modified to add a custom option for this, so we can benefit from PopUps on that wiki that wiki or others whose index.php paths are not the ones we use.

Thank you.