WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
281416
Allow 3rd Party Apps to Customize Restriction Text of WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=281416
Summary
Allow 3rd Party Apps to Customize Restriction Text of WKWebViews
Frederik Riedel
Reported
2024-10-14 02:23:21 PDT
Created
attachment 472930
[details]
Screenshot of a blocked website in Safari (macrumors.com) which just says: "You cannot browse this page at "macrumors.com" because it is restricted." Hello WebKit Team! I am building an app called “one sec“ that helps to spend less time on social media and other distracting apps and websites. To improve my blocking functionality, I have recently added the ability to block websites across all web browsers on iOS using `ManagedSettingsStore`’s `.webContent.blockedByFilter` functionality. This works cross-browser (Safari obviously, but also Chrome, FireFox, etc.), so I assume this is a WebKit / WKWebView component. However, if this is the wrong feedback channel for this feature, please let me know! Please find a screenshot attached how the result looks like during a block session in my app. My enhancement request: Let 3rd party apps modify the content of the blocking shield. How it is displayed right now, the user doesn’t get context why this website is blocked. It would be great if we could add a SwiftUI view on top the blocked website which explains what’s going on (e.g. "Ongoing Block Session, 2h34min remaining…") alongside some actions (e.g. "Stop Block Session" or "Close Website"). Thanks a lot for considering my feedback and have a great day! – Frederik
Attachments
Screenshot of a blocked website in Safari (macrumors.com) which just says: "You cannot browse this page at "macrumors.com" because it is restricted."
(326.92 KB, image/jpeg)
2024-10-14 02:23 PDT
,
Frederik Riedel
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2024-10-15 08:52:42 PDT
I believe that this functionality is implemented outside WebKit, you can see this text in several places like /System/Library/Frameworks/NetworkExtension.framework/Versions/A/Resources/blockpage.html, /System/Library/PrivateFrameworks/WebContentAnalysis.framework/Versions/A/Resources/en.lproj/blockpage.html, and /System/Library/PrivateFrameworks/WebContentAnalysis.framework/Versions/A/Resources/en.lproj/blockpage-nooverride.html. I've CC'ed people who may be aware of this technology enough to provide some suggestions, but as the primary course of action, please file this via Feedback Assistant, and post the report ID here.
Frederik Riedel
Comment 2
2024-10-15 09:00:52 PDT
Thanks for the quick feedback, Alexey! I’ve filed a feedback request as well now: FB15500501 – Frederik
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug