Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow resources surrogates #4394

Merged
merged 9 commits into from
Oct 30, 2024

Conversation

seia-soto
Copy link
Member

@seia-soto seia-soto requested a review from remusao as a code owner October 26, 2024 20:05
@seia-soto seia-soto self-assigned this Oct 26, 2024
@seia-soto seia-soto added the PR: Bug Fix 🐛 Increment patch version when merged label Oct 26, 2024
@seia-soto seia-soto marked this pull request as draft October 26, 2024 20:06
@seia-soto seia-soto added the WIP label Oct 27, 2024
refs https://github.com/gorhill/uBlock/wiki/Resources-Library
refs ghostery#4392
fixes ghostery#4393

test: allow scriptlets being used as resources

fix: allow redirect resources surrogates

test: drop outdated tests

fix: always query with file extension

chore: strictly check content type

test: resources surrogate

test: drop outdated
@seia-soto seia-soto force-pushed the allow-scriptlet-resources branch from 7c60ded to 0119d6a Compare October 28, 2024 13:15
@seia-soto seia-soto changed the title fix: allow scriptlets being used as resources fix: allow resources surrogates Oct 28, 2024
@seia-soto seia-soto marked this pull request as ready for review October 28, 2024 13:16
@seia-soto seia-soto requested a review from chrmod October 28, 2024 13:16
@seia-soto seia-soto removed the WIP label Oct 28, 2024
@@ -272,6 +280,12 @@ describe('#Resources', function () {
it('includes setup for scritplet globals', function () {
expect(resources.getScriptlet('a')).to.include('var scriptletGlobals = {};');
});

it('allows resources surrogate', function () {
expect(resources.getScriptlet('surrogate'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are those things always called without .js ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, resources surrogates are always called without suffix or file extension. Also, uBo gradually plan to drop calling scriptlets with suffix or file extension in the future.

@seia-soto seia-soto requested a review from chrmod October 30, 2024 01:29
@chrmod chrmod merged commit a01ed88 into ghostery:master Oct 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Bug Fix 🐛 Increment patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow resources surrogates
2 participants