diff --git a/package-lock.json b/package-lock.json
index e037e6e..f6e4fab 100644
Binary files a/package-lock.json and b/package-lock.json differ
diff --git a/package.json b/package.json
index 4665595..ec4fa3b 100644
--- a/package.json
+++ b/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"
}
}
diff --git a/src/main/index.html b/src/main/index.html
index adb0320..9cca54f 100644
--- a/src/main/index.html
+++ b/src/main/index.html
@@ -53,6 +53,12 @@
For Wikimedia wikis, this is https://<example.org>/w/api.php
.
For Fandom wikis, this is https://<wiki>.fandom.com/api.php
.
+ If the application refuses to connect 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 tracking blockers.
+ These external scripts are necessary to provide support to older wikis that rely on
+ JSONP requests to interact with the API.
+
If you need help, have a question, or found a bug, please
open an issue
or leave a talk message.
diff --git a/src/main/js/MediaWiki.js b/src/main/js/MediaWiki.js
index 54f9d34..e9ee944 100644
--- a/src/main/js/MediaWiki.js
+++ b/src/main/js/MediaWiki.js
@@ -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 About 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 About section for more information.");
+ throw new Error(couldNotConnectMessage);
else
continue;
}
diff --git a/src/main/js/Shared.js b/src/main/js/Shared.js
index 855d118..2a68d3d 100644
--- a/src/main/js/Shared.js
+++ b/src/main/js/Shared.js
@@ -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 About section for more information."
+
/**
* Returns the status that has the lowest index in the given list of statuses.
*