Bug 246613

Summary: include_globs not supported for content_scripts
Product: WebKit Reporter: Carlos J. <carlosj-webkit-bugzilla>
Component: WebKit ExtensionsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, timothy
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Carlos J. 2022-10-17 04:40:14 PDT
Currently trying to port a web extension over to safari which heavily relies on the include_globs property of content_scripts. There is currently no alternative here.

One of the use cases here is to help collapse permissions.

If you have these two content scripts:
Code Block language
{
      "css": [ "style-a.css" ],
      "matches": [ "https://*.example.com/*" ],
      "include_globs": [ "https://a.example.com/*style=a*" ],
      "run_at": "document_start"
},
{
      "css": [ "style-b.css" ],
      "matches": [ "https://*.example.com/*" ],
      "include_globs": [ "https://b.example.google.com/*style=b*" ],
      "run_at": "document_start"
}


The permissions for these content scripts would merge into *.example.com, and the permission would be a clean host permission.


This issue has previously been reported in the Feedback Assistant and the Forum:
https://feedbackassistant.apple.com/feedback/9612462
https://developer.apple.com/forums/thread/662114
Comment 1 Alexey Proskuryakov 2022-10-17 10:37:39 PDT
Thank you for the report. This will continue to be tracked by Apple internally as a Safari issue, not a webKit one.

rdar://57375730
Comment 2 Timothy Hatcher 2022-10-24 13:22:54 PDT
We are tracking bugs in WebKit for Web Extensions now as we move extensions support from Safari to WebKit.

But this is a dupe of bug 246492.

*** This bug has been marked as a duplicate of bug 246492 ***