# iOS 应用 1.5.0 不再允许内容拦截器？

**URL:** <https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489>\
**Category:** Feature\
**Created:** [2019年五月12日 00:25 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489 "2019-05-12T00:25:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gingerbeardman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gingerbeardman/32/540824_2.png) [@gingerbeardman](https://meta.discourse.org/u/gingerbeardman)\
**Post date:** [2019年五月12日 00:25 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/1 "2019-05-12T00:25:35Z")

</div>

我使用内容拦截器来提升网页浏览体验，包括隐藏页面元素和图片，以及阻止部分样式和脚本。

在 Discourse Hub 应用中，这原本运行良好，直到最近的 1.5.0 版本更新（即引入新 SSO 流程的版本）。

关于内容拦截器，有哪些变化？

能否再次允许使用内容拦截器？

谢谢！

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [2019年五月12日 00:29 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/2 "2019-05-12T00:29:54Z")

</div>

Interesting, we switched to a webview in the latest app update and I guess it isn’t aware of content blockers. And it probably can’t be made aware of them.

---

<div class="post-metadata">

**Author:** ![gingerbeardman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gingerbeardman/32/540824_2.png) [@gingerbeardman](https://meta.discourse.org/u/gingerbeardman)\
**Post date:** [2019年五月12日 00:45 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/3 "2019-05-12T00:45:38Z")

</div>

Content Blockers can/do work with WKWebView if that’s what you’re using?

Also guess/probably doesn’t fill me with confidence.

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [2019年五月12日 00:47 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/4 "2019-05-12T00:47:38Z")

</div>

Yes that’s what we are using.

---

<div class="post-metadata">

**Author:** ![gingerbeardman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gingerbeardman/32/540824_2.png) [@gingerbeardman](https://meta.discourse.org/u/gingerbeardman)\
**Post date:** [2019年五月12日 00:48 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/5 "2019-05-12T00:48:14Z")

</div>

I’ll see if I can dig up any info on whether there’s anything special needed

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年五月12日 00:51 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/6 "2019-05-12T00:51:52Z")

</div>

hmmm but all non Discourse sites are still opened in Safari.

So this would be just about blocking ads on Discourse sites you are passionate about?

---

<div class="post-metadata">

**Author:** ![gingerbeardman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gingerbeardman/32/540824_2.png) [@gingerbeardman](https://meta.discourse.org/u/gingerbeardman)\
**Post date:** [2019年五月12日 00:54 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/7 "2019-05-12T00:54:12Z")

</div>

Not ads, no. Other things like buttons and menus I’d rather not see.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年五月12日 00:55 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/8 "2019-05-12T00:55:07Z")

</div>

Can you expand on this with a few before / after pics, very curious to see what you are doing?

Is this on a site you control or do not control?

---

<div class="post-metadata">

**Author:** ![gingerbeardman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gingerbeardman/32/540824_2.png) [@gingerbeardman](https://meta.discourse.org/u/gingerbeardman)\
**Post date:** [2019年五月12日 01:02 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/9 "2019-05-12T01:02:15Z")

</div>

Sure thing.

Here’s an example where I block an image/button that has been placed in a way that breaks the page layout - urgh. I don’t control this discourse site.

Safari

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/6/26715261b6c5e73c0ed240d55a193aea8060cb59.png)

Discourse 1.5.0

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/3/a38fc4b2bf7b9d71fa5202d1e21b9a971464c6e5.png)

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年五月12日 01:09 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/10 "2019-05-12T01:09:14Z")

</div>

That’s annoying, have you opened a “site feedback” topic _on that Discourse site_ to discuss better placement of that button on mobile?

---

<div class="post-metadata">

**Author:** ![gingerbeardman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gingerbeardman/32/540824_2.png) [@gingerbeardman](https://meta.discourse.org/u/gingerbeardman)\
**Post date:** [2019年五月12日 01:10 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/11 "2019-05-12T01:10:33Z")

</div>

Of course. No dice.

So I just fix things like this myself. It’s easier.

Until now! 😂

This is just one example; my blocker setup does so many I’ve lost count.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年五月12日 01:48 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/13 "2019-05-12T01:48:21Z")

</div>

> [@gingerbeardman](#):
>
> Of course. No dice.

It’d be better as an overlay maybe at the bottom left or something? Then it would not permanently consume screen space..

---

<div class="post-metadata">

**Author:** ![gingerbeardman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gingerbeardman/32/540824_2.png) [@gingerbeardman](https://meta.discourse.org/u/gingerbeardman)\
**Post date:** [2019年五月12日 01:56 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/14 "2019-05-12T01:56:20Z")

</div>

If it was my site, sure. But trying to persuade non-technical forum admins… 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年五月12日 02:09 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/15 "2019-05-12T02:09:21Z")

</div>

What about if you lobbied to remove it once a user donates? Should be very easy in a theme component

---

<div class="post-metadata">

**Author:** ![gingerbeardman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gingerbeardman/32/540824_2.png) [@gingerbeardman](https://meta.discourse.org/u/gingerbeardman)\
**Post date:** [2019年五月12日 02:11 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/16 "2019-05-12T02:11:42Z")

</div>

This is just one example. I can’t lobby for all of the blocker changes I have set up.

Plus, they were working before 1.5.0

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [2019年五月12日 02:15 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/17 "2019-05-12T02:15:41Z")

</div>

The app doesn’t specifically disable content blockers, and if there is a way to have them work in WKWebView, I’d love to hear it.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年五月12日 02:22 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/18 "2019-05-12T02:22:29Z")

</div>

I think there is an interface that accepts the same json safari does, but I am not sure if we can query it for the current list

That said I feel this is a mega advanced ninja feature I do not think we have that much bandwidth to work on it

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年五月12日 02:48 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/19 "2019-05-12T02:48:56Z")

</div>

It’s also better to fix it for everyone (e.g. deal with the source) rather than “fixing” it for advanced ninjas only.

---

<div class="post-metadata">

**Author:** ![gingerbeardman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gingerbeardman/32/540824_2.png) [@gingerbeardman](https://meta.discourse.org/u/gingerbeardman)\
**Post date:** [2019年五月12日 11:55 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/20 "2019-05-12T11:55:07Z")

</div>

> [@sam](#):
>
> I think there is an interface that accepts the same json safari does, but I am not sure if we can query it for the current list

This is correct, I did the same reading.

In terms of the different web view types honouring iOS Safari Content Blockers:

Ignores Content Blockers:

- UIWebView
- WKWebView

Honours Content Blockers:

- SFSafariViewController

There are a bunch of apps on the App Store that let you try them all [here’s one](https://itunes.apple.com/gb/app/webview-wkwebview-and-uiwebview-rendering/id928647773?mt=8)

So it looks like I’m sadly out of luck on this with the new direction the app has taken. 😭

Thanks all for your input.

Nice work on the new app though @pmusaraj @sam

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年五月12日 23:28 UTC](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489/21 "2019-05-12T23:28:12Z")

</div>

According to [150479 – Expose public APIs for content filters](https://bugs.webkit.org/show_bug.cgi?id=150479) Firefox have an API they consume.

Can you test if your content blocking works as expected on Firefox / Chrome iOS? If so I am not against having a quick look at this next major app release.

We do not have the bandwidth to look at this for a while though.

[下一頁](https://meta.discourse.org/t/ios-app-1-5-0-no-longer-allowing-content-blockers/117489.md?page=2)
