url not supported
void285 opened this issue · 7 comments
Hi, I found urls in following format not supported:
For languages which have several styles and will do convertion between each other, this format is normal. So please try to support it, Thanks!
I just published an update to support other Wikimedia short urls. The issue should be resolved now.
What do you limit the URLs for?
Why not allow any URL there?
@rubo77 Because this script uses the public Wikimedia API endpoint.
I cannot allow any url, because of Cross Origin Policy. The script (the Ajax request) would get blocked for security reasons by your browser. For example read this.
and wikipedia is allowing COP?
I would like to use https://wiki.freifunk.net/
The public API endpoint must allow cross origin access, otherwise it wouldn't be useable as a public API.
Looking at the Freifunk wiki I decided to change the script to allow other top level domains than .ORG to be parsed (all Wikipedias use the .org-TLD, but it doesn't make sense to exclude Wikis hosted on different domains). Do you have an example Freifunk wiki page with a table in it?
Unfortunately the Freifunk Wiki (url structure) is badly configured. More specifically: the official Wikimedia docs recommend NOT to put the Wiki in the root directory. Normally there is a slug between the host and the Wiki page title, like https://wiki.freifunk.net/SLUG/Freifunk_Firmware_Gluon/Hardware
.
This is probably why the API of the Freifunk Wiki is not reachable from the outside via cross-domain-ajax request (the API must accept an origin parameter of "*"), which is executed by this script.
Anyway, I released a new version with some improvements regarding the url parsing, so other Mediawiki projects should be supported now.