mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Revert "DEV: Add param that allows service worker to be removed."
This reverts commit cb12f462a2.
This commit is contained in:
@@ -7,17 +7,10 @@ export default {
|
|||||||
location.hostname === "localhost";
|
location.hostname === "localhost";
|
||||||
|
|
||||||
const isSupported = isSecured && "serviceWorker" in navigator;
|
const isSupported = isSecured && "serviceWorker" in navigator;
|
||||||
|
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
||||||
|
|
||||||
if (isSupported) {
|
if (isSupported) {
|
||||||
const isSafari = /^((?!chrome|android).)*safari/i.test(
|
if (Discourse.ServiceWorkerURL && !isSafari) {
|
||||||
navigator.userAgent
|
|
||||||
);
|
|
||||||
|
|
||||||
const disableServiceWorker = window.location.search.includes(
|
|
||||||
"disable_service_worker"
|
|
||||||
);
|
|
||||||
|
|
||||||
if (Discourse.ServiceWorkerURL && !isSafari && !disableServiceWorker) {
|
|
||||||
navigator.serviceWorker.getRegistrations().then(registrations => {
|
navigator.serviceWorker.getRegistrations().then(registrations => {
|
||||||
for (let registration of registrations) {
|
for (let registration of registrations) {
|
||||||
if (
|
if (
|
||||||
|
|||||||
Reference in New Issue
Block a user