Find Jobs
Hire Freelancers

Web Extension: Scriptlet Injection Project

€30-250 EUR

Closed
Posted almost 3 years ago

€30-250 EUR

Paid on delivery
Develop a content (ad) blocker Web Extension for Safari in JavaScript. There are multiple ways of blocking content in a browser. Within this project, we only need to focus on one of them: using scriptlets. A scriplet is a simple script intended to perform a particular task like aborting an inline script, setting a constant, prunning JSON, and so on. Many existing popular content blockers like AdGuard and uBlock Origin are already using scriptlets to block ads that are difficult to block using standard declarative API. For example, here’s how an extension can block YouTube ads using three rules with scriptlets: youtube.com##+js(json-prune, [].[login to view URL] [].[login to view URL] [login to view URL] [login to view URL] adPlacements playerAds) youtube.com##+js(set, [login to view URL], undefined) youtube.com##+js(set, [login to view URL], undefined) Another example of a rule that blocks a popup asking users to turn off their ad blocker: brutal.io##+js(set, hasAdblock, false) More on scriptlet injection: [login to view URL] There are existing Scriptlet libraries that are huge and contain lots of functions: [login to view URL] [login to view URL] Our web extension should support these scriptlets (MVP): "set-constant" - [login to view URL] "json-prune" - [login to view URL] "abort-current-inline-script" - [login to view URL] "abort-on-property-read" - [login to view URL] "abort-on-property-write" - [login to view URL] uBlock Origin and AdGuard are open-source on GitHub: [login to view URL] [login to view URL] It’s recommended to check their code to see how they integrated their support of blocking content using rules with scriptlets. Perhaps, there were some weird edge-cases that uBlock Origin and AdGuard founded and worked around. No need to re-invent the wheel here. Here’s an example filters file that contain rules with scriptlets: [login to view URL] Our web extension will have a similar txt file with rules having scriptlets. We only target one browser: Safari v14+. The extension will have no interface. It only embeds into all webpages a script file that adds support for scriptlets and blocks content (ads) according to a txt file with rules. The developer should have strong JavaScript skills and experience developing web extensions for browsers. Experience creating uBlock Origin filters is a plus. Thank you.
Project ID: 30624670

About the project

2 proposals
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of NETHERLANDS
Amsterdam, Netherlands
0.0
0
Member since Jun 21, 2021

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.