From 727aa17e12a2fdf69aa6947ba92d9b2d0aa74b1b Mon Sep 17 00:00:00 2001 From: Jelle Z Date: Thu, 4 Jan 2018 19:37:40 +0100 Subject: [PATCH 1/2] Added noscript page and redirect --- webapp/titanembeds/templates/embed.html.j2 | 7 +++- webapp/titanembeds/templates/noscript.html | 43 ++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 webapp/titanembeds/templates/noscript.html diff --git a/webapp/titanembeds/templates/embed.html.j2 b/webapp/titanembeds/templates/embed.html.j2 index e8fba49..94a28b5 100644 --- a/webapp/titanembeds/templates/embed.html.j2 +++ b/webapp/titanembeds/templates/embed.html.j2 @@ -8,6 +8,11 @@ + + + @@ -381,4 +386,4 @@ } - \ No newline at end of file + diff --git a/webapp/titanembeds/templates/noscript.html b/webapp/titanembeds/templates/noscript.html new file mode 100644 index 0000000..275d422 --- /dev/null +++ b/webapp/titanembeds/templates/noscript.html @@ -0,0 +1,43 @@ + + + + + + + + Error - Titan Embeds for Discord + + + + + + + + +
+
+
+
+

Uh oh!

+
+
+
+

It seems like you don't have JavaScript enabled. Titan Embeds needs JavaScript in order to function. It could be that your browser doesn't support JavaScript, but it's more likely you have it disabled.

+

 

+

In case you don't know how to enable JavaScript, detailed instructions for most major browsers can be found here.

+

 

+

Please enable JavaScript or use a browser that supports JavaScript and try again.

+
+
+
+ Titan Embeds logo +
+
+
+ + + From 03aa5f33a75c5075cbaba72cadbca71f34ef2d8b Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Thu, 4 Jan 2018 23:27:05 +0000 Subject: [PATCH 2/2] Add noscript page to the embed blueprint --- webapp/titanembeds/blueprints/embed/embed.py | 4 ++++ webapp/titanembeds/templates/embed.html.j2 | 2 +- .../titanembeds/templates/{noscript.html => noscript.html.j2} | 0 3 files changed, 5 insertions(+), 1 deletion(-) rename webapp/titanembeds/templates/{noscript.html => noscript.html.j2} (100%) diff --git a/webapp/titanembeds/blueprints/embed/embed.py b/webapp/titanembeds/blueprints/embed/embed.py index ca61a9d..b828dde 100644 --- a/webapp/titanembeds/blueprints/embed/embed.py +++ b/webapp/titanembeds/blueprints/embed/embed.py @@ -87,3 +87,7 @@ def signin_complete(): @embed.route("/login_discord") def login_discord(): return redirect(url_for("user.login_authenticated", redirect=url_for("embed.signin_complete", _external=True))) + +@embed.route("/noscript") +def noscript(): + return render_template("noscript.html.j2") \ No newline at end of file diff --git a/webapp/titanembeds/templates/embed.html.j2 b/webapp/titanembeds/templates/embed.html.j2 index 94a28b5..f688042 100644 --- a/webapp/titanembeds/templates/embed.html.j2 +++ b/webapp/titanembeds/templates/embed.html.j2 @@ -11,7 +11,7 @@ diff --git a/webapp/titanembeds/templates/noscript.html b/webapp/titanembeds/templates/noscript.html.j2 similarity index 100% rename from webapp/titanembeds/templates/noscript.html rename to webapp/titanembeds/templates/noscript.html.j2