diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..5162f96e5 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @slavaleleka diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..f73eb9ce3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,254 @@ +name: Bug report +description: Report an issue with filters +labels: ["Unsorted"] +# labels: ["A: Bug", "A: By Design", "A: Cannot reproduce", "A: Closed", "A: In progress", "A: Invalid", "A: Problematic", "A: Rejected", "A: Resolved", "A: Won't fix", "Extra", "Extra (zmc)", "Infrastructure", "N: AdGuard Browser Extension", "N: AdGuard Content Blocker", "N: AdGuard DNS", "N: AdGuard for Android", "N: AdGuard for iOS", "N: AdGuard for Mac", "N: AdGuard for Safari", "N: AdGuard for Windows", "N: Other", "NSFW", "P1: Critical", "P2: High", "P3: Medium", "P4: Low", "T: Ads", "T: Annoyance", "T: Anti Adblock Script", "T: Incorrect Blocking", "T: Popups", "T: Social Widget", "T: Stealth Mode issue", "T: Tracker"] +body: + - type: checkboxes + attributes: + label: Prerequisites + description: | + To avoid invalid reports, please check and confirm following checkboxes. + It is highly recommended to use our [Web Reporting Tool](https://kb.adguard.com/en/technical-support/reporting-tool) instead of opening an issue using GitHub directly. + options: + - label: This site DOES NOT contains sexually explicit material, otherwise use [NSFW-specific form](./new?template=bug_report_NSFW.yml);; + required: true + - label: Filters were updated before reproduced an issue; + required: true + - label: AdGuard product version is up-to-date; + required: true + - label: Browser version is up-to-date; + required: true + - label: If the site or app is broken, disabling AdGuard protection resolves an issue. + required: true + - type: dropdown + id: adguards + attributes: + label: What product do you use? + multiple: true + options: + - AdGuard Browser Extension + - AdGuard Content Blocker + - AdGuard DNS + - AdGuard for Android + - AdGuard for iOS + - AdGuard for Mac + - AdGuard for Safari + - AdGuard for Windows + - Other ad blocker + validations: + required: true + + - type: input + id: version + attributes: + label: AdGuard version + description: What version of our software are you running? + placeholder: for example, 7.7.2, 2.6.1.1060 nightly, 3.6.14 beta + validations: + required: true + + - type: dropdown + id: what-happened + attributes: + label: What type of problem have you encountered? + description: If the problem does not fall under any category that is listed here, please contact our tech support - support@adguard.com + multiple: true + options: + - Missed ads or ad leftovers + - Website or app doesn't work properly + - AdGuard gets detected on a website + - Social media buttons — share, like, tweet, etc. + - Annoyances — pop-ups, cookie warnings, etc. + - Missed analytics or tracker + - Dangerous site + validations: + required: true + + - type: dropdown + id: browsers + attributes: + label: What browsers is used? + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + - Opera + - Yandex Browser + - other(specify in comment below) + - the problem is with app, not a site + validations: + required: true + + - type: dropdown + id: browsers_type + attributes: + label: Which device is used? + multiple: false + options: + - Desktop + - Mobile + validations: + required: true + + - type: input + id: url + attributes: + label: Where did you encounter the problem? + description: Please enter address of the page or download link of the affected app. + placeholder: ex. https://example.com/ + validations: + required: true + + - type: dropdown + id: filters + attributes: + label: What filters do you have enabled? + description: Select enabled filters from the list or enter URLs of any custom filters in comment below. + multiple: true + options: + - ---AdGuard filters--- + - AdGuard Base filter + - AdGuard Mobile Ads filter + - AdGuard Dutch filter + - AdGuard French filter + - AdGuard German filter + - AdGuard Japanese filter + - AdGuard Russian filter + - AdGuard Spanish/Portuguese filter + - AdGuard Turkish filter + - AdGuard Tracking Protection filter + - AdGuard URL Tracking filter + - AdGuard Social Media filter + - AdGuard Annoyances filter + - AdGuard DNS filter + - AdGuard Experimental filter + - Filter unblocking search ads and self-promotion + - ---Third-party filters--- + - EasyList + - ABPindo + - Bulgarian list + - EasyList China + - EasyList Czech and Slovak + - EasyList Dutch + - EasyList Germany + - EasyList Hebrew + - EasyList Italy + - EasyList Lithuania + - Latvian List + - Liste AR + - Liste FR + - ROList + - EasyPrivacy + - Icelandic ABP List + - AdBlockID + - Greek AdBlock Filter + - Fanboy's Annoyances + - Fanboy's Social Blocking List + - Web Annoyances Ultralist + - Thai Ads Filters + - Hungarian filter + - Peter Lowe's Blocklist + - Xfiles + - Adblock Warning Removal List + - Online Malicious URL Blocklist + - Spam404 + - RU AdList - Counters + - ABPVN List + - Fanboy's Enhanced Tracking List + - Official Polish filters for AdBlock, uBlock Origin & AdGuard + - Polish GDPR-Cookies Filters + - Estonian List + - ChinaList+EasyList + - CJX's Annoyances List + - Polish Social Filters + - Adblock-Persian list + - Fanboy's Swedish + - AdGuard Chinese filter + - Fanboy's Anti-Facebook List + - Fanboy's Vietnamese + - List-KR + - xinggsf + - I don't care about cookies + - Fanboy's Spanish\/Portuguese + - EasyList Spanish + - KAD - Anti-Scam + - Adblock List for Finland + - ROLIST2 + - Iranian filter + - road-block + - Polish Annoyances Filters + - Polish Anti Adblock Filters + - Fanboy's Anti-thirdparty Fonts + - BarbBlock + - EasyList Cookie List + - NoCoin Filter List + - Frellwit's Swedish Filter + - YousList + - AlleBlock + - EasyList Polish + - Polish Anti-Annoying Special Supplement + - Dandelion Sprout's Nordic Filters + - Dandelion Sprout's Annoyances List + - Legitimate URL Shortener + validations: + required: true + + - type: dropdown + id: stealth + attributes: + label: What Stealth Mode options do you have enabled? + description: Please mark any of these options if you have them enabled in Stealth Mode + multiple: true + options: + - Hide your search queries + - Send Do-Not-Track header + - Remove X-Client-Data header from HTTP requests + - Self-destruction of first-party cookies + - Self-destruction of third-party cookies + - Disable cache for third-party requests + - Block WebRTC + - Block Push API + - Block Location API + - Hide your Referrer from third-parties (specify in comment below, if used custom value) + - Hide your User-Agent (specify in comment below, if used custom value) + - Hide your IP address (specify in comment below, if used custom value) + + - type: textarea + id: comments + attributes: + label: Add your comment and screenshots + description: | + 1. Please add screenshots of the problem. You can attach images by clicking this area to highlight it and then dragging files in or paste images from clipboard; + Use `
` tag to hide screenshots under the spoiler; + 2. Please describe the issue extensively unless it is absolutely clear from the screenshot what the problem is; + You can also indicate any other information that you think the developers should know. + + Warning: Please remove private info before upload screenshots! + value: | + 1. + 2. Screenshots +
+ + + +
+ + +
+ + + +
+ validations: + required: true + + - type: checkboxes + id: terms + attributes: + label: Privacy + description: By submitting this issue, you agree that report does not contain private info + options: + - label: I agree to follow this condition + required: true diff --git a/.github/ISSUE_TEMPLATE/bug_report_NSFW.yml b/.github/ISSUE_TEMPLATE/bug_report_NSFW.yml new file mode 100644 index 000000000..7949211fe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report_NSFW.yml @@ -0,0 +1,35 @@ +--- + +name: 🧪 Bug report — for MV3 +description: If you found something wrong in the MV3 extension. +labels: [bug, MV3] +body: + - type: markdown + attributes: + value: Thanks for taking the time to fill out this bug report! + - type: checkboxes + attributes: + label: Please answer the following questions for yourself before submitting an issue + options: + - label: Filters were updated before reproducing an issue + required: true + - label: I checked the [knowledge base](https://adguard.com/kb/) and found no answer + required: true + - label: I checked to make sure that this issue has not already been filed + required: true + + - type: textarea + id: how_it_should_be + attributes: + label: Expected Behavior + placeholder: A clear and concise description of what you expected to happen. + validations: + required: false + + - type: textarea + id: additional + attributes: + label: Additional Information + placeholder: Add any other context about the problem here, custom filters, etc. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..195df2a18 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Filters documentation + url: https://kb.adguard.com/general/how-to-create-your-own-ad-filters + about: How to create your own ad filters. + - name: Report an issue using AdGuard + url: https://kb.adguard.com/technical-support/reporting-tool + about: The simplest and right way to report us about missed ads, broken sites etc. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..7c3fd2f3a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,43 @@ +name: Feature request_ +description: Suggest an idea for AdGuard Filters +labels: ["Feature Request"] +body: + - type: checkboxes + attributes: + label: Prerequisites + description: | + Please answer the following questions for yourself before submitting the feature request. + options: + - label: I checked the documentation and found no answer; + required: true + - label: I checked to make sure that this issue has not already been filed; + required: true + - label: This is not a ad/bug report. + + - type: textarea + id: problem + attributes: + label: Problem description + placeholder: | + Is your feature request related to a problem? + Please add a clear and concise description of what the problem is. + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed solution + placeholder: | + Please describe the solution you'd like in a clear and concise manner. + validations: + required: true + + - type: textarea + id: additional + attributes: + label: Additional information + placeholder: | + Add any other context about the problem here. + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE/common_template.md b/.github/PULL_REQUEST_TEMPLATE/common_template.md new file mode 100644 index 000000000..6da2f8575 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/common_template.md @@ -0,0 +1,69 @@ +### Please include a summary of the change and which issue is fixed. +### If the related issue does not exist in our repository, please create it before making pool request. +### It is highly recommended to use our [Web Reporting Tool](https://kb.adguard.com/en/technical-support/reporting-tool) instead of creating an issue on GitHub directly. +### Please note, that we verify every pull request manually, so it may take time to apply it. + +--- + + +### Prerequisites +##### To avoid invalid pull requests, please check and confirm following checkboxes: + + + - [ ] This is not an ad/bug report; + - [ ] My code follows the [guidelines](https://github.com/AdguardTeam/AdguardFilters/blob/master/CONTRIBUTING.md) and [syntax](https://kb.adguard.com/general/how-to-create-your-own-ad-filters) of this project; + - [ ] I have performed a self-review of my own changes; + - [ ] My changes do not break web sites, apps and files structure. + +### What problem does the pull request fix? +##### If the problem does not fall under any category that is listed here, please contact our tech support: `support@adguard.com` + + - [ ] Missed ads or ad leftovers; + - [ ] Website or app doesn't work properly; + - [ ] AdGuard gets detected on a website; + - [ ] Missed analytics or tracker; + - [ ] Social media buttons — share, like, tweet, etc; + - [ ] Annoyances — pop-ups, cookie warnings, etc. + +### What issue is being fixed? +##### Enter the issue address: + +Example: https://github.com/AdguardTeam/AdguardFilters/issues/100000 + +### Add your comment and screenshots +##### If possible, a screenshot of a page or application should not be cropped too much. Otherwise, it is not always clear where the element is located. + +**0.** **DO NOT** upload screenshots with sexually explicit material on GitHub directly. Instead, upload it to a third-party image hosting and post the link to it without preview (!) here. Also, mention if the link leads to NSFW content; + +**1.** Add screenshots of the problem. You can drag and drop images or paste them from clipboard; + +Use `
` tag to hide screenshots under the spoiler; + +**2.** Describe the issue in detail until it is absolutely clear from the screenshot what the problem is; + +You can also indicate any other information that you think the developers should know. + +**Warning:** Please remove personal information before uploading screenshots! + + +**1.** `Write a comment here` + +**2.** Screenshots + +
Screenshot 1: + + + +
+ +
Screenshot N: + + + +
+ + + +### Terms + + - [ ] By submitting this issue, I agree that pull request does not contain private info and all conditions are met. diff --git a/.github/PULL_REQUEST_TEMPLATE/fix_specific_template.md b/.github/PULL_REQUEST_TEMPLATE/fix_specific_template.md new file mode 100644 index 000000000..1a6acac78 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/fix_specific_template.md @@ -0,0 +1,16 @@ + + + + + + + + + + + +## Description + +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes # **(issue)** diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..cef5ab714 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Scriptlets Changelog + +## [Unreleased] + +### Fixed + +- Test [#6]. + +[Unreleased]: https://github.com/slavaleleka/Scriptlets/compare/v1.3.5...HEAD +[#6]: https://github.com/slavaleleka/Scriptlets/issues/6 \ No newline at end of file diff --git a/README.md b/README.md index fb5b109a5..f44e1da2f 100644 --- a/README.md +++ b/README.md @@ -361,7 +361,8 @@ Schema ``` #### Redirects library -``` + +```text dist/redirects.js dist/redirects.yml ``` @@ -393,6 +394,7 @@ const redirect = redirect.getRedirect('noopjs'); ``` ## Browser Compatibility + | Chrome | Edge | Firefox | IE | Opera | Safari | |--|--|--|--|--|--| | 55 | 15 | 52 | 11 | 42 | 10 | diff --git a/scripts/compatibility-table.json b/scripts/compatibility-table.json index 386ad83af..b9ae694d3 100644 --- a/scripts/compatibility-table.json +++ b/scripts/compatibility-table.json @@ -68,8 +68,7 @@ "adg": "log-on-stack-trace" }, { - "adg": "no-floc", - "ubo": "no-floc.js" + "adg": "naver-wcslog" }, { "adg": "noeval" @@ -234,6 +233,9 @@ }, { "ubo": "refresh-defuser.js" + }, + { + "ubo": "no-floc.js" } ], "redirects": [ @@ -269,9 +271,13 @@ "ubo": "click2load.html" }, { - "adg": "fingerprintjs", + "adg": "fingerprintjs2", "ubo": "fingerprint2.js" }, + { + "adg": "fingerprint3js", + "ubo": "fingerprint3.js" + }, { "adg": "google-analytics", "ubo": "google-analytics_analytics.js" @@ -343,6 +349,10 @@ { "adg": "noopvast-3.0" }, + { + "adg": "prebid-ads", + "ubo": "prebid-ads.js" + }, { "adg": "prevent-bab", "ubo": "nobab.js" diff --git a/wiki/about-redirects.md b/wiki/about-redirects.md index 34b4d2c34..b2f957779 100644 --- a/wiki/about-redirects.md +++ b/wiki/about-redirects.md @@ -6,6 +6,7 @@ * [noopframe](#noopframe) * [noopcss](#noopcss) * [noopjs](#noopjs) +* [noopjson](#noopjson) * [nooptext](#nooptext) * [empty](#empty) * [noopvmap-1.0](#noopvmap-1.0) @@ -16,16 +17,22 @@ * [noopmp4-1s](#noopmp4-1s) * [amazon-apstag](#amazon-apstag) * [ati-smarttag](#ati-smarttag) -* [fingerprintjs](#fingerprintjs) +* [didomi-loader](#didomi-loader) +* [fingerprintjs2](#fingerprintjs2) +* [fingerprintjs3](#fingerprintjs3) * [gemius](#gemius) * [google-analytics-ga](#google-analytics-ga) * [google-analytics](#google-analytics) +* [google-ima3](#google-ima3) * [googlesyndication-adsbygoogle](#googlesyndication-adsbygoogle) * [googletagservices-gpt](#googletagservices-gpt) * [matomo](#matomo) * [metrika-yandex-tag](#metrika-yandex-tag) * [metrika-yandex-watch](#metrika-yandex-watch) +* [naver-wcslog](#naver-wcslog) * [noeval](#noeval) +* [prebid-ads](#prebid-ads) +* [prebid](#prebid) * [prevent-bab](#prevent-bab) * [prevent-bab2](#prevent-bab2) * [prevent-fab-3.2.0](#prevent-fab-3.2.0) @@ -90,6 +97,14 @@ [Redirect source](../src/redirects/static-redirects.yml) * * * +### ⚡️ noopjson +**Example** +``` +||example.org/geo/location$xmlhttprequest,redirect=noopjson +``` +[Redirect source](../src/redirects/static-redirects.yml) +* * * + ### ⚡️ nooptext **Example** ``` @@ -192,20 +207,49 @@ https://developers.atinternet-solutions.com/as2-tagging-en/javascript-en/getting [Redirect source](../src/redirects/ati-smarttag.js) * * * -### ⚡️ fingerprintjs +### ⚡️ didomi-loader -Mocks FingerprintJS. +Mocks Didomi's CMP loader script. +https://developers.didomi.io/ + +**Example** +``` +||sdk.privacy-center.org/fbf86806f86e/loader.js$script,redirect=didomi-loader +``` + +[Redirect source](../src/redirects/didomi-loader.js) +* * * + +### ⚡️ fingerprintjs2 + +Mocks FingerprintJS v2 https://github.com/fingerprintjs Related UBO redirect resource: -https://github.com/gorhill/uBlock/commit/33a18c3a1eb101470c43979a41d8adef3e21208d +https://github.com/gorhill/uBlock/blob/master/src/web_accessible_resources/fingerprint2.js **Example** ``` -||the-japan-news.com/modules/js/lib/fgp/fingerprint2.js$script,redirect=fingerprintjs +||the-japan-news.com/modules/js/lib/fgp/fingerprint2.js$script,redirect=fingerprintjs2 ``` -[Redirect source](../src/redirects/fingerprintjs.js) +[Redirect source](../src/redirects/fingerprintjs2.js) +* * * + +### ⚡️ fingerprintjs3 + +Mocks FingerprintJS v3 +https://github.com/fingerprintjs + +Related UBO redirect resource: +https://github.com/gorhill/uBlock/blob/master/src/web_accessible_resources/fingerprint3.js + +**Example** +``` +||sephora.com/js/ufe/isomorphic/thirdparty/fp.min.js$script,redirect=fingerprintjs3 +``` + +[Redirect source](../src/redirects/fingerprintjs3.js) * * * ### ⚡️ gemius @@ -253,6 +297,18 @@ https://github.com/gorhill/uBlock/blob/8cd2a1d263a96421487b39040c1d23eb01169484/ [Redirect source](../src/redirects/google-analytics.js) * * * +### ⚡️ google-ima3 + +Mocks the IMA SDK of Google. + +**Example** +``` +||imasdk.googleapis.com/js/sdkloader/ima3.js$script,redirect=google-ima3 +``` + +[Redirect source](../src/redirects/google-ima3.js) +* * * + ### ⚡️ googlesyndication-adsbygoogle Mocks Google AdSense API. @@ -321,6 +377,18 @@ https://yandex.ru/support/metrica/objects/_method-reference.html [Redirect source](../src/redirects/metrika-yandex-watch.js) * * * +### ⚡️ naver-wcslog + +Mocks wcslog.js of Naver Analytics. + +**Example** +``` +||wcs.naver.net/wcslog.js$script,redirect=naver-wcslog +``` + +[Redirect source](../src/redirects/naver-wcslog.js) +* * * + ### ⚡️ noeval Redirects request to the source which sets static properties to PopAds and popns objects. @@ -342,6 +410,33 @@ https://github.com/gorhill/uBlock/wiki/Resources-Library#noeval-silentjs- [Redirect source](../src/redirects/noeval.js) * * * +### ⚡️ prebid-ads + +Sets predefined constants on a page: +- `canRunAds`: `true` +- `isAdBlockActive`: `false` + +**Example** +``` +||playerdrive.me/assets/js/prebid-ads.js$script,redirect=prebid-ads +``` + +[Redirect source](../src/redirects/prebid-ads.js) +* * * + +### ⚡️ prebid + +Mocks the prebid.js header bidding suit. +https://docs.prebid.org/ + +**Example** +``` +||tmgrup.com.tr/bd/hb/prebid.js$script,redirect=prebid +``` + +[Redirect source](../src/redirects/prebid.js) +* * * + ### ⚡️ prevent-bab Prevents BlockAdblock script from detecting an ad blocker. @@ -440,4 +535,3 @@ https://github.com/gorhill/uBlock/blob/1.31.0/src/web_accessible_resources/click ``` [Redirect source](../src/redirects/blocking-redirects/click2load.html) * * * - diff --git a/wiki/about-scriptlets.md b/wiki/about-scriptlets.md index 572513228..7a5ce81e8 100644 --- a/wiki/about-scriptlets.md +++ b/wiki/about-scriptlets.md @@ -17,16 +17,17 @@ * [log-eval](#log-eval) * [log-on-stack-trace](#log-on-stack-trace) * [log](#log) -* [no-floc](#no-floc) * [noeval](#noeval) * [nowebrtc](#nowebrtc) * [prevent-addEventListener](#prevent-addEventListener) * [prevent-adfly](#prevent-adfly) * [prevent-bab](#prevent-bab) +* [prevent-element-src-loading](#prevent-element-src-loading) * [prevent-eval-if](#prevent-eval-if) * [prevent-fab-3.2.0](#prevent-fab-3.2.0) * [prevent-fetch](#prevent-fetch) * [prevent-popads-net](#prevent-popads-net) +* [prevent-refresh](#prevent-refresh) * [prevent-requestAnimationFrame](#prevent-requestAnimationFrame) * [prevent-setInterval](#prevent-setInterval) * [prevent-setTimeout](#prevent-setTimeout) @@ -500,6 +501,11 @@ e.g. 'ad.*.src' instead of 'ad.0.src ad.1.src ad.2.src ...' example.org#%#//scriptlet('json-prune') ``` +7. Call with only second argument will log the current hostname and matched json payload at the console + ``` + example.org#%#//scriptlet('json-prune', '', '"id":"117458"') + ``` + [Scriptlet source](../src/scriptlets/json-prune.js) * * * @@ -560,21 +566,6 @@ example.org#%#//scriptlet('log', 'arg1', 'arg2') [Scriptlet source](../src/scriptlets/log.js) * * * -### ⚡️ no-floc - -Prevents using Google Chrome tracking feature called Federated Learning of Cohorts (aka "FLoC") - -Related UBO scriptlet: -https://github.com/gorhill/uBlock/wiki/Resources-Library#no-flocjs- - -**Syntax** -``` -example.org#%#//scriptlet('no-floc') -``` - -[Scriptlet source](../src/scriptlets/no-floc.js) -* * * - ### ⚡️ noeval Prevents page to use eval. @@ -680,6 +671,30 @@ example.org#%#//scriptlet('prevent-bab') [Scriptlet source](../src/scriptlets/prevent-bab.js) * * * +### ⚡️ prevent-element-src-loading + +Prevents target element source loading without triggering 'onerror' listeners and not breaking 'onload' ones. + +**Syntax** +``` +example.org#%#//scriptlet('prevent-src', tagName, match) +``` + +- `tagName` - required, case-insensitive target element tagName which `src` property resource loading will be silently prevented; possible values: + - `script` + - `img` + - `iframe` +- `match` - required, string or regular expression for matching the element's URL; + +**Examples** +1. Prevent script source loading: +``` + example.org#%#//scriptlet('prevent-element-src-loading', 'script' ,'adsbygoogle') +``` + +[Scriptlet source](../src/scriptlets/prevent-element-src-loading.js) +* * * + ### ⚡️ prevent-eval-if Prevents page to use eval matching payload. @@ -780,6 +795,34 @@ example.org#%#//scriptlet('prevent-popads-net') [Scriptlet source](../src/scriptlets/prevent-popads-net.js) * * * +### ⚡️ prevent-refresh + +Prevents reloading of a document through a meta "refresh" tag. + +Related UBO scriptlet: +https://github.com/gorhill/uBlock/wiki/Resources-Library#refresh-defuserjs- + +**Syntax** +``` +example.org#%#//scriptlet('prevent-refresh'[, delay]) +``` + +- `delay` - optional, number of seconds for delay that indicates when scriptlet should run. If not set, source tag value will be applied. + +**Examples** +1. Prevent reloading of a document through a meta "refresh" tag. +``` + enrt.eu#%#//scriptlet('prevent-refresh') +``` + +2. Prevent reloading of a document with delay. +``` + cryptodirectories.com#%#//scriptlet('prevent-refresh', 3) +``` + +[Scriptlet source](../src/scriptlets/prevent-refresh.js) +* * * + ### ⚡️ prevent-requestAnimationFrame Prevents a `requestAnimationFrame` call @@ -1120,7 +1163,7 @@ https://github.com/gorhill/uBlock/wiki/Resources-Library#no-xhr-ifjs- **Syntax** ``` -example.org#%#//scriptlet('prevent-xhr'[, propsToMatch]) +example.org#%#//scriptlet('prevent-xhr'[, propsToMatch[, randomize]]) ``` - propsToMatch - optional, string of space-separated properties to match; possible props: @@ -1128,6 +1171,7 @@ example.org#%#//scriptlet('prevent-xhr'[, propsToMatch]) - colon-separated pairs name:value where - name is XMLHttpRequest object property name - value is string or regular expression for matching the value of the option passed to `.open()` call +- randomize - optional, defaults to `false`, boolean to randomize responseText of matched XMLHttpRequest's response, > Usage with no arguments will log XMLHttpRequest objects to browser console; which is useful for debugging but permitted for production filter lists. @@ -1159,6 +1203,11 @@ which is useful for debugging but permitted for production filter lists. example.org#%#//scriptlet('prevent-xhr', 'example.org method:/HEAD|GET/') ``` +6. Prevent XMLHttpRequests for specific url and randomize it's response text + ``` + example.org#%#//scriptlet('prevent-xhr', 'example.org', 'true') + ``` + [Scriptlet source](../src/scriptlets/prevent-xhr.js) * * * @@ -1422,6 +1471,8 @@ example.org#%#//scriptlet('set-constant', property, value[, stack]) - `noopFunc` - function with empty body - `trueFunc` - function returning true - `falseFunc` - function returning false + - `noopPromiseResolve` - function returning Promise object that is resolved with an empty response + - `noopPromiseReject` - function returning Promise.reject() - `''` - empty string - `-1` - number value `-1` - `stack` - optional, string or regular expression that must match the current function call stack trace; @@ -1588,4 +1639,3 @@ example.org#%#//scriptlet('set-session-storage-item', 'exit-intent-marketing', ' [Scriptlet source](../src/scriptlets/set-session-storage-item.js) * * * - diff --git a/wiki/compatibility-table.md b/wiki/compatibility-table.md index 76830ecdf..e8143a0f1 100644 --- a/wiki/compatibility-table.md +++ b/wiki/compatibility-table.md @@ -19,7 +19,7 @@ | [log-addEventListener](../wiki/about-scriptlets.md#log-addEventListener) | addEventListener-logger.js (aell.js) | | | [log-eval](../wiki/about-scriptlets.md#log-eval) | | | | [log-on-stack-trace](../wiki/about-scriptlets.md#log-on-stack-trace) | | | -| [no-floc](../wiki/about-scriptlets.md#no-floc) | no-floc.js | | +| [naver-wcslog](../wiki/about-scriptlets.md#naver-wcslog) | | | | [noeval](../wiki/about-scriptlets.md#noeval) | | | | [nowebrtc](../wiki/about-scriptlets.md#nowebrtc) | nowebrtc.js | | | [prevent-addEventListener](../wiki/about-scriptlets.md#prevent-addEventListener) | addEventListener-defuser.js (aeld.js) | | @@ -70,6 +70,7 @@ | | | abort-on-iframe-property-write | | | abort-current-script.js (acs.js, abort-current-inline-script.js, acis.js) | | | | refresh-defuser.js | | +| | no-floc.js | | # Redirects compatibility table @@ -83,7 +84,8 @@ | [amazon-apstag](../wiki/about-redirects.md#amazon-apstag) | amazon_apstag.js | | | [ati-smarttag](../wiki/about-redirects.md#ati-smarttag) | | | | [click2load.html](../wiki/about-redirects.md#click2load.html) | click2load.html | | -| [fingerprintjs](../wiki/about-redirects.md#fingerprintjs) | fingerprint2.js | | +| [fingerprintjs2](../wiki/about-redirects.md#fingerprintjs2) | fingerprint2.js | | +| [fingerprint3js](../wiki/about-redirects.md#fingerprint3js) | fingerprint3.js | | | [google-analytics](../wiki/about-redirects.md#google-analytics) | google-analytics_analytics.js | | | [google-analytics-ga](../wiki/about-redirects.md#google-analytics-ga) | google-analytics_ga.js | | | [googlesyndication-adsbygoogle](../wiki/about-redirects.md#googlesyndication-adsbygoogle) | googlesyndication_adsbygoogle.js | | @@ -102,6 +104,7 @@ | [noopvmap-1.0](../wiki/about-redirects.md#noopvmap-1.0) | noop-vmap1.0.xml | | | [noopvast-2.0](../wiki/about-redirects.md#noopvast-2.0) | | | | [noopvast-3.0](../wiki/about-redirects.md#noopvast-3.0) | | | +| [prebid-ads](../wiki/about-redirects.md#prebid-ads) | prebid-ads.js | | | [prevent-bab](../wiki/about-redirects.md#prevent-bab) | nobab.js | | | [prevent-bab2](../wiki/about-redirects.md#prevent-bab2) | nobab2.js | | | [prevent-fab-3.2.0](../wiki/about-redirects.md#prevent-fab-3.2.0) | nofab.js | |