From 95841af60bc90e16230ae1e158290c8721027731 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 22 Mar 2019 02:53:14 -0700 Subject: [PATCH] Add message alerting Chrome extension users to disable chrome://flags/#network-service --- src/platform/$.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platform/$.coffee b/src/platform/$.coffee index 78697a9db..d7116472f 100644 --- a/src/platform/$.coffee +++ b/src/platform/$.coffee @@ -73,6 +73,12 @@ $.ajax = do -> $.extend r.upload, upCallbacks # connection error or content blocker $.on r, 'error', -> (c.error "4chan X failed to load: #{url}" unless r.status) + <% if (type === 'crx') { %> + $.on r, 'load', -> + return unless r.readyState is 4 and r.status is 200 and r.statusText is '' and r.response is null and !$.ajaxWarningShown + new Notice 'warning', "Error loading #{url}; try going to chrome://flags/#network-service and disabling the network service flag." + $.ajaxWarningShown = true + <% } %> r.send form catch err # XXX Some content blockers in Firefox (e.g. Adblock Plus and NoScript) throw an exception instead of simulating a connection error.