Skip to content

Commit

Permalink
Update versionwarning.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jobisoft committed Jul 3, 2021
1 parent 509224c commit 771c447
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions _extensions/versionwarning/_static/js/versionwarning.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ function checkVersion(config) {
};

$.ajax({
url: config.meta.api_url + "version/",
//config.meta.api_url + "version/",
// Access of API is broken by CORS, so request from same site.
url: "https://webextension-api.thunderbird.net/en/latest/_static/versions.json",
// Used when working locally for development
// crossDomain: true,
// xhrFields: {
Expand All @@ -97,13 +99,8 @@ function checkVersion(config) {
success: function (versions) {
// TODO: fetch more versions if there are more pages (next)
highest_version = getHighestVersion(versions["results"]);
if (true
// semver.valid(semver.coerce(running_version.slug)) && semver.valid(semver.coerce(highest_version.slug)) &&
// semver.lt(semver.coerce(running_version.slug), semver.coerce(highest_version.slug))
) {
console.debug("Highest version: " + highest_version.slug);
injectVersionWarningBanner(running_version, highest_version, config, versions["results"]);
}
console.debug("Highest version: " + highest_version.slug);
injectVersionWarningBanner(running_version, highest_version, config, versions["results"]);
},
error: function () {
console.error("Error loading Read the Docs active versions.");
Expand Down

0 comments on commit 771c447

Please sign in to comment.