From e81e85cf9aa40119a13a4192adcf82b41feb8dfc Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Tue, 17 Jan 2023 05:44:45 +0100 Subject: [PATCH] Remove capabilities feature --- app/javascript/application.ts | 2 -- .../retrospring/features/capabilities/index.ts | 13 ------------- 2 files changed, 15 deletions(-) delete mode 100644 app/javascript/retrospring/features/capabilities/index.ts diff --git a/app/javascript/application.ts b/app/javascript/application.ts index c9624a78..e1f3d3c3 100644 --- a/app/javascript/application.ts +++ b/app/javascript/application.ts @@ -1,6 +1,5 @@ import start from 'retrospring/common'; import initAnswerbox from 'retrospring/features/answerbox/index'; -import initCapabilities from 'retrospring/features/capabilities'; import initInbox from 'retrospring/features/inbox/index'; import initUser from 'retrospring/features/user'; import initSettings from 'retrospring/features/settings/index'; @@ -14,7 +13,6 @@ import initWebpush from 'retrospring/features/webpush'; import initWebpushSettingsButtons from 'retrospring/features/webpush/settingsButtons'; start(); -document.addEventListener('turbo:load', initCapabilities); document.addEventListener('DOMContentLoaded', initAnswerbox); document.addEventListener('DOMContentLoaded', initInbox); document.addEventListener('DOMContentLoaded', initUser); diff --git a/app/javascript/retrospring/features/capabilities/index.ts b/app/javascript/retrospring/features/capabilities/index.ts deleted file mode 100644 index bc0c29f8..00000000 --- a/app/javascript/retrospring/features/capabilities/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default (): void => { - if ('share' in navigator) { - document.body.classList.add('cap-web-share'); - } - - if ('serviceWorker' in navigator) { - document.body.classList.add('cap-service-worker'); - } - - if ('Notification' in window) { - document.body.classList.add('cap-notification'); - } -}