From 2562584b785b36e517a6310a861a6081b4056d31 Mon Sep 17 00:00:00 2001 From: Martin Scharm Date: Fri, 24 Nov 2017 13:01:03 +0100 Subject: [PATCH] added handlind of status 400 [see #6] --- webextension/background.js | 5 +++++ webextension/manifest.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/webextension/background.js b/webextension/background.js index 580f418..a4dc205 100644 --- a/webextension/background.js +++ b/webextension/background.js @@ -172,6 +172,11 @@ function YOURLS(settings, options, expected) { err.supp.links.push ("extension's settings"); break; + case 400: + err.supp.text = "Is that a proper URL? YOURLS won't shorten URLs such as 'about:addons' etc. If you think this is an error please report the issue at https://github.com/binfalse/YOURLS-FirefoxExtension/issues and explain what you did."; + err.supp.links.push ("https://github.com/binfalse/YOURLS-FirefoxExtension/issues"); + break; + case 0: err.supp.text = "Experienced a general connection issue... Maybe your SSL certificate is not valid? Your server is down? You provided an illegal Server URL? Please verify your extension's settings and make sure that you can access the admin interface at " + apiURLwSlash + "admin. If you need further help open a new ticket at https://github.com/binfalse/YOURLS-FirefoxExtension/issues and explain what you did."; err.supp.links.push (apiURLwSlash + "admin"); diff --git a/webextension/manifest.json b/webextension/manifest.json index 95232b4..5d38036 100644 --- a/webextension/manifest.json +++ b/webextension/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "YOURLS WebExtension", - "version": "2.3.2", + "version": "2.3.3", "description": "Shorten URLs with your own YOURLS instance", "homepage_url": "https://s.binfalse.de/2f", "applications": {