Open Universal-Omega opened 1 year ago
Service workers need a scope and that scope is defined by their URL (see the following link). For the purpose of this extension, we want a service worker to apply to the whole wiki regardless if the page is requested using $wgArticlePath
or using index.php
(which is often used when accessing edition, history, etc.)
This is why it is request using index.php
, because index.php
is always at at the root of the wiki.
Can you give me a sample of some URLs on your wiki ? For editing, for special pages, for history, etc.
Service workers need a scope and that scope is defined by their URL (see the following link). For the purpose of this extension, we want a service worker to apply to the whole wiki regardless if the page is requested using
$wgArticlePath
or usingindex.php
(which is often used when accessing edition, history, etc.)This is why it is request using
index.php
, becauseindex.php
is always at at the root of the wiki.Can you give me a sample of some URLs on your wiki ? For editing, for special pages, for history, etc.
Would an option to generate the URLs using $wgArticlePath
work ?
Would an option to generate the URLs using
$wgArticlePath
work ?
Yeah, that should work. Thanks!
Ok, I'll make a branch and let you know when it's ready for testing. Should not be too hard. If you are willing to fork and do a pull request that would be very helpful as well and would expedite things a great deal.
So you don't have to use /index.php, but the
$wgArticlePath/MediaWiki:PWA-main-ServiceWorker.js?params
method also. As it can't be redirected, I redirect /index.php URLs to the article path method, which results in an error that the service worker can not be redirected. Also the same thing for the manifest should be supported probably.