Skip to content

Commit

Permalink
Merge pull request #94 in ADGUARD-FILTERS/scriptlets from fix/AG-815 …
Browse files Browse the repository at this point in the history
…to master

* commit 'eeb28cf021fa35bd796cdbeab91ec4a997124940':
  specify decription for 'vmap' redirect
  specify redirects decsription examples
  • Loading branch information
slavaleleka committed Mar 5, 2020
2 parents e3546f1 + eeb28cf commit 054db54
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 56 deletions.
20 changes: 12 additions & 8 deletions dist/cjs/scriptletsCjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions dist/redirects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
description: |-
**Example**
```
||example.org^$stylesheet,redirect=noopcss
||example.org/style.css$stylesheet,redirect=noopcss
```
aliases:
- blank-css
Expand All @@ -89,7 +89,7 @@
description: |-
**Example**
```
||example.org^$script,redirect=noopjs
||example.org/advert.js$script,redirect=noopjs
```
aliases:
- noop.js
Expand All @@ -101,7 +101,7 @@
description: |-
**Example**
```
||example.org^$xmlhttprequest,redirect=nooptext
||example.org/advert.js$xmlhttprequest,redirect=nooptext
```
aliases:
- noop.txt
Expand All @@ -115,7 +115,7 @@
**Example**
```
||example.org^$xmlhttprequest,redirect=noopvmap-1.0
||example.org/vmap01.xml$xmlhttprequest,redirect=noopvmap-1.0
```
contentType: text/xml
content: >-
Expand All @@ -128,7 +128,7 @@
**Example**
```
||example.org^$xmlhttprequest,redirect=noopvast-2.0
||example.org/vast02.xml^$xmlhttprequest,redirect=noopvast-2.0
```
contentType: text/xml
content: <VAST version="2.0"></VAST>
Expand All @@ -139,7 +139,7 @@
**Example**
```
||example.org^$xmlhttprequest,redirect=noopvast-3.0
||example.org/vast03.xml^$xmlhttprequest,redirect=noopvast-3.0
```
contentType: text/xml
content: <VAST version="3.0"></VAST>
Expand All @@ -148,7 +148,7 @@
description: |-
**Example**
```
||example.org^$media,redirect=noopmp3-0.1s
||example.org/advert.mp3$media,redirect=noopmp3-0.1s
```
aliases:
- noopmp3-0.1s
Expand Down Expand Up @@ -179,7 +179,7 @@
description: |-
**Example**
```
||example.org^$media,redirect=noopmp4-1s
||example.org/advert.mp4$media,redirect=noopmp4-1s
```
aliases:
- noop-1s.mp4
Expand Down
20 changes: 12 additions & 8 deletions dist/scriptlets.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/redirects/google-analytics-ga.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { noop } from '../helpers/noop';
*
* **Example**
* ```
* ||example.org/index.js$script,redirect=google-analytics-ga
* ||google-analytics.com/ga.js$script,redirect=google-analytics-ga
* ```
*/
export function GoogleAnalyticsGa(source) {
Expand Down
2 changes: 1 addition & 1 deletion src/redirects/google-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { noop, noopNull } from '../helpers/noop';
*
* **Example**
* ```
* ||example.org/index.js$script,redirect=google-analytics
* ||google-analytics.com/analytics.js$script,redirect=google-analytics
* ```
*/
export function GoogleAnalytics(source) {
Expand Down
4 changes: 3 additions & 1 deletion src/redirects/googlesyndication-adsbygoogle.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { hit } from '../helpers/hit';

/* eslint-disable max-len */
/**
* @redirect googlesyndication-adsbygoogle
*
Expand All @@ -11,9 +12,10 @@ import { hit } from '../helpers/hit';
*
* **Example**
* ```
* ||example.org/index.js$script,redirect=googlesyndication-adsbygoogle
* ||pagead2.googlesyndication.com/pagead/js/adsbygoogle.js$script,redirect=googlesyndication-adsbygoogle
* ```
*/
/* eslint-enable max-len */
export function GoogleSyndicationAdsByGoogle(source) {
window.adsbygoogle = window.adsbygoogle || {
length: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/redirects/googletagmanager-gtm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { noop } from '../helpers/noop';
*
* **Example**
* ```
* ||example.org/index.js$script,redirect=googletagmanager-gtm
* ||googletagmanager.com/gtm.js$script,redirect=googletagmanager-gtm
* ```
*/
export function GoogleTagManagerGtm(source) {
Expand Down
2 changes: 1 addition & 1 deletion src/redirects/googletagservices-gpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
*
* **Example**
* ```
* ||example.org/index.js$script,redirect=googletagservices-gpt
* ||googletagservices.com/tag/js/gpt.js$script,redirect=googletagservices-gpt
* ```
*/
export function GoogleTagServicesGpt(source) {
Expand Down
2 changes: 1 addition & 1 deletion src/redirects/metrika-yandex-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { noop } from '../helpers/noop';
*
* **Example**
* ```
* ||example.org/index.js$script,redirect=metrika-yandex-tag
* ||mc.yandex.ru/metrika/tag.js$script,redirect=metrika-yandex-tag
* ```
*/
export function metrikaYandexTag(source) {
Expand Down
2 changes: 1 addition & 1 deletion src/redirects/metrika-yandex-watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { noop } from '../helpers/noop';
*
* **Example**
* ```
* ||example.org/index.js$script,redirect=metrika-yandex-watch
* ||mc.yandex.ru/metrika/watch.js$script,redirect=metrika-yandex-watch
* ```
*/
export function metrikaYandexWatch(source) {
Expand Down
2 changes: 1 addition & 1 deletion src/redirects/scorecardresearch-beacon.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { hit } from '../helpers/hit';
*
* **Example**
* ```
* ||example.org/index.js$script,redirect=scorecardresearch-beacon
* ||sb.scorecardresearch.com/beacon.js$script,redirect=scorecardresearch-beacon
* ```
*/
export function ScoreCardResearchBeacon(source) {
Expand Down
16 changes: 8 additions & 8 deletions src/redirects/static-redirects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
description: |-
**Example**
```
||example.org^$stylesheet,redirect=noopcss
||example.org/style.css$stylesheet,redirect=noopcss
```
aliases:
- blank-css
Expand All @@ -89,7 +89,7 @@
description: |-
**Example**
```
||example.org^$script,redirect=noopjs
||example.org/advert.js$script,redirect=noopjs
```
aliases:
- noop.js
Expand All @@ -101,7 +101,7 @@
description: |-
**Example**
```
||example.org^$xmlhttprequest,redirect=nooptext
||example.org/advert.js$xmlhttprequest,redirect=nooptext
```
aliases:
- noop.txt
Expand All @@ -115,7 +115,7 @@
**Example**
```
||example.org^$xmlhttprequest,redirect=noopvmap-1.0
||example.org/vmap01.xml$xmlhttprequest,redirect=noopvmap-1.0
```
contentType: text/xml
content: <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0"></vmap:VMAP>
Expand All @@ -126,7 +126,7 @@
**Example**
```
||example.org^$xmlhttprequest,redirect=noopvast-2.0
||example.org/vast02.xml^$xmlhttprequest,redirect=noopvast-2.0
```
contentType: text/xml
content: <VAST version="2.0"></VAST>
Expand All @@ -137,7 +137,7 @@
**Example**
```
||example.org^$xmlhttprequest,redirect=noopvast-3.0
||example.org/vast03.xml^$xmlhttprequest,redirect=noopvast-3.0
```
contentType: text/xml
content: <VAST version="3.0"></VAST>
Expand All @@ -146,7 +146,7 @@
description: |-
**Example**
```
||example.org^$media,redirect=noopmp3-0.1s
||example.org/advert.mp3$media,redirect=noopmp3-0.1s
```
aliases:
- noopmp3-0.1s
Expand Down Expand Up @@ -176,7 +176,7 @@
description: |-
**Example**
```
||example.org^$media,redirect=noopmp4-1s
||example.org/advert.mp4$media,redirect=noopmp4-1s
```
aliases:
- noop-1s.mp4
Expand Down
Loading

0 comments on commit 054db54

Please sign in to comment.