parent
6c0dd74e63
commit
6d2441e3e5
Binary file not shown.
18
package.json
18
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "interlanguage-checker",
|
||||
"version": "1.10.16",
|
||||
"version": "1.10.17",
|
||||
"description": "Check the consistency of MediaWiki interlanguage links in a simple overview.",
|
||||
"author": "Felix W. Dekker",
|
||||
"browser": "dist/bundle.js",
|
||||
|
@ -16,16 +16,16 @@
|
|||
"deploy": "grunt deploy"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fwdekker/template": "^0.0.20",
|
||||
"@fwdekker/template": "^0.0.21",
|
||||
"fetch-jsonp": "^1.1.3",
|
||||
"fork-awesome": "^1.1.7",
|
||||
"htm": "^3.0.4",
|
||||
"preact": "^10.4.7"
|
||||
"preact": "^10.5.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"css-loader": "^4.2.1",
|
||||
"file-loader": "^6.0.0",
|
||||
"grunt": "^1.2.1",
|
||||
"css-loader": "^5.0.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"grunt": "^1.3.0",
|
||||
"grunt-cli": "^1.3.2",
|
||||
"grunt-contrib-clean": "^2.0.0",
|
||||
"grunt-contrib-copy": "^1.0.0",
|
||||
|
@ -33,8 +33,8 @@
|
|||
"grunt-focus": "^1.0.0",
|
||||
"grunt-text-replace": "^0.4.0",
|
||||
"grunt-webpack": "^4.0.2",
|
||||
"style-loader": "^1.2.1",
|
||||
"webpack": "^4.44.1",
|
||||
"webpack-cli": "^3.3.12"
|
||||
"style-loader": "^2.0.0",
|
||||
"webpack": "^5.4.0",
|
||||
"webpack-cli": "^4.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,6 +53,12 @@
|
|||
For <b>Wikimedia</b> wikis, this is <code>https://<example.org>/w/api.php</code>.
|
||||
For <b>Fandom</b> wikis, this is <code>https://<wiki>.fandom.com/api.php</code>.<br />
|
||||
<br />
|
||||
If the application <b>refuses to connect</b> to the API and you are certain the URL is correct,
|
||||
make sure that you allow scripts to be executed from the API you have entered by checking the
|
||||
configuration of your <b>tracking blockers</b>.
|
||||
These <b>external scripts</b> are necessary to provide support to older wikis that rely on
|
||||
<a href="https://en.wikipedia.org/wiki/JSONP">JSONP requests</a> to interact with the API.<br />
|
||||
<br />
|
||||
If you need <b>help</b>, have a <b>question</b>, or found a <b>bug</b>, please
|
||||
<a href="https://git.fwdekker.com/FWDekker/interlanguage-checker/issues/new">open an issue</a>
|
||||
or <a href="https://fallout.fandom.com/wiki/User_talk:FDekker">leave a talk message</a>.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import fetchJsonp from "fetch-jsonp";
|
||||
import {mergeStates} from "./Shared";
|
||||
import {couldNotConnectMessage, mergeStates} from "./Shared";
|
||||
|
||||
|
||||
/**
|
||||
|
@ -348,7 +348,7 @@ export class MediaWiki {
|
|||
return fetchJsonp(url)
|
||||
.then(it => it.json())
|
||||
.catch(() => {
|
||||
throw new Error("Could not to connect to API. Is the URL correct? See the <b>About</b> section for more information.")
|
||||
throw new Error(couldNotConnectMessage);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ export const discoverNetwork = async function (mwm, title, progressCb) {
|
|||
history.push(next);
|
||||
pages.push(new Page(mwm.getArticlePath(next), next, [], false));
|
||||
if (history.length === 1)
|
||||
throw new Error("Could not to connect to API. Is the URL correct? See the <b>About</b> section for more information.");
|
||||
throw new Error(couldNotConnectMessage);
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/**
|
||||
* The message that is displayed when the application fails to connect to the API.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
export const couldNotConnectMessage =
|
||||
"Could not to connect to API. Is the URL correct? Are you using a script blocker? " +
|
||||
"See the <b>About</b> section for more information."
|
||||
|
||||
/**
|
||||
* Returns the status that has the lowest index in the given list of statuses.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue