diff --git a/components/ScoreCard.vue b/components/ScoreCard.vue index d3966399d..ab1cd9a54 100644 --- a/components/ScoreCard.vue +++ b/components/ScoreCard.vue @@ -612,7 +612,8 @@ export default class extends Vue { this.$emit("serviceWorkerTestDone", { score: this.swScore }); } } else { - const response = await fetch(`${apiUrl}=${this.url}`); + var cleanUrl = this.trimSuffixChar(this.url, '.'); + const response = await fetch(`${apiUrl}=${cleanUrl}`); const data = await response.json(); if (data.swURL) { @@ -683,6 +684,13 @@ export default class extends Vue { } } } + + private trimSuffixChar(string, charToRemove) { + while(string.charAt(string.length-1) === charToRemove) { + string = string.substring(0, string.length-1); + } + return string; + } } diff --git a/pages/_lang/feature/_detail.vue b/pages/_lang/feature/_detail.vue index b216e5ea2..3d381a485 100644 --- a/pages/_lang/feature/_detail.vue +++ b/pages/_lang/feature/_detail.vue @@ -86,22 +86,14 @@ export default class extends Vue { realName: "share", mappedName: "Create Share" }, - { - realName: "geolocation", - mappedName: "Use Geolocation" - }, - { - realName: "clipboard", - mappedName: "Copy to Clipboard" - }, - { - realName: "adaptiveCards", - mappedName: "Adaptive Cards" - }, { realName: "installButton", mappedName: "Install your PWA" }, + { + realName: "authButton", + mappedName: "Sign In with Microsoft, Google, Facebook" + }, { realName: "midi", mappedName: "Web MIDI" @@ -272,7 +264,9 @@ export default class extends Vue { } copyToClipboard(str) { - if (document) { + if (navigator.clipboard) { + navigator.clipboard.writeText(str); + } else if (document) { const el = document.createElement("textarea"); // Create a