From 9f68f2632f54b4525d547ad6045193ee9e3fd06a Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sat, 12 Nov 2022 18:45:17 -0600 Subject: [PATCH] Removed docker badge from README --- README.md | 2 -- src/main/resources/public/js/main.js | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c70cbea..2c227e6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![Docker Pulls](https://img.shields.io/docker/pulls/sintan1729/simply-shorten?style=for-the-badge)](https://hub.docker.com/r/sintan1729/simply-shorten) - # ![Logo](src/main/resources/public/assets/favicon-32.png) Simply Shorten # What is it? diff --git a/src/main/resources/public/js/main.js b/src/main/resources/public/js/main.js index 621b734..e4ea812 100644 --- a/src/main/resources/public/js/main.js +++ b/src/main/resources/public/js/main.js @@ -26,7 +26,9 @@ const refreshData = async () => { const displayData = async (data) => { let site = await getSiteUrl(); - site = site.replace(/(^\w+:|^)\/\//, ''); + if (window.isSecureContext) { + site = site.replace(/(^\w+:|^)\/\//, ''); + } table_box = document.querySelector(".pure-table"); if (data.length == 0) { table_box.style.visibility = "hidden"; @@ -97,7 +99,7 @@ const addProtocol = (input) => { const A_LONG = (s) => `${s}`; const A_SHORT = (s, t) => `${t}/${s}`; -const A_SHORT_INSECURE = (s, t) => `${t}/${s}`; +const A_SHORT_INSECURE = (s, t) => `${t}/${s}`; const deleteButton = (shortUrl) => { const td = document.createElement("td");