Bug 246613 - include_globs not supported for content_scripts
Summary: include_globs not supported for content_scripts
Status: RESOLVED DUPLICATE of bug 246492
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Extensions (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-17 04:40 PDT by Carlos J.
Modified: 2022-10-24 13:22 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***