Skip to content

Commit

Permalink
handle v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka committed May 15, 2023
1 parent a1b3b95 commit a5cd94e
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/redirects/ati-smarttag.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { hit, noopFunc } from '../helpers/index';

/**
* @redirect ati-smarttag
*
* @description
* Mocks AT Internat SmartTag.
* https://developers.atinternet-solutions.com/as2-tagging-en/javascript-en/getting-started-javascript-en/tracker-initialisation-javascript-en/
Expand All @@ -10,6 +11,8 @@ import { hit, noopFunc } from '../helpers/index';
* ```
* ||bloctel.gouv.fr/assets/scripts/smarttag.js$script,redirect=ati-smarttag
* ```
*
* @added v1.5.0.
*/
export function ATInternetSmartTag(source) {
const setNoopFuncWrapper = {
Expand Down
3 changes: 3 additions & 0 deletions src/redirects/fingerprintjs2.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { hit } from '../helpers/index';

/**
* @redirect fingerprintjs2
*
* @description
* Mocks FingerprintJS v2
* https://github.com/fingerprintjs
Expand All @@ -14,6 +15,8 @@ import { hit } from '../helpers/index';
* ```
* ||the-japan-news.com/modules/js/lib/fgp/fingerprint2.js$script,redirect=fingerprintjs2
* ```
*
* @added v1.5.0.
*/
export function Fingerprintjs2(source) {
let browserId = '';
Expand Down
3 changes: 3 additions & 0 deletions src/redirects/gemius.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { hit, noopFunc } from '../helpers/index';

/**
* @redirect gemius
*
* @description
* Mocks Gemius Analytics.
* https://flowplayer.com/developers/plugins/gemius
Expand All @@ -11,6 +12,8 @@ import { hit, noopFunc } from '../helpers/index';
* ```
* ||gapt.hit.gemius.pl/gplayer.js$script,redirect=gemius
* ```
*
* @added v1.5.0.
*/
export function Gemius(source) {
const GemiusPlayer = function () {};
Expand Down
3 changes: 3 additions & 0 deletions src/redirects/matomo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import { hit, noopFunc } from '../helpers/index';

/**
* @redirect matomo
*
* @description
* Mocks the piwik.js file of Matomo (formerly Piwik).
*
* **Example**
* ```
* ||example.org/piwik.js$script,redirect=matomo
* ```
*
* @added v1.5.0.
*/

export function Matomo(source) {
Expand Down
3 changes: 3 additions & 0 deletions src/redirects/prevent-bab2.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { hit } from '../helpers/index';

/**
* @redirect prevent-bab2
*
* @description
* Prevents BlockAdblock script from detecting an ad blocker.
*
Expand All @@ -15,6 +16,8 @@ import { hit } from '../helpers/index';
* ```
* /blockadblock.$script,redirect=prevent-bab2
* ```
*
* @added v1.5.0.
*/
export function preventBab2(source) {
const script = document.currentScript;
Expand Down
3 changes: 3 additions & 0 deletions src/scriptlets/abort-on-stack-trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
/* eslint-disable max-len */
/**
* @scriptlet abort-on-stack-trace
*
* @description
* Aborts a script when it attempts to utilize (read or write to) the specified property and it's error stack trace contains given value.
*
Expand Down Expand Up @@ -55,6 +56,8 @@ import {
* ! Aborts script when it tries to access `window.Ya` and it's an injected script
* example.org#%#//scriptlet('abort-on-stack-trace', 'Ya', 'injectedScript')
* ```
*
* @added v1.5.0.
*/
/* eslint-enable max-len */
export function abortOnStackTrace(source, property, stack) {
Expand Down
3 changes: 3 additions & 0 deletions src/scriptlets/close-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {

/**
* @scriptlet close-window
*
* @description
* Closes the browser tab immediately.
*
Expand All @@ -29,6 +30,8 @@ import {
* ! closes specific example.org tab
* example.org#%#//scriptlet('close-window', '/example-page.html')
* ```
*
* @added v1.5.0.
*/
export function forceWindowClose(source, path = '') {
// https://github.com/AdguardTeam/Scriptlets/issues/158#issuecomment-993423036
Expand Down
3 changes: 3 additions & 0 deletions src/scriptlets/log-on-stack-trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
/* eslint-disable max-len */
/**
* @scriptlet log-on-stack-trace
*
* @description
* This scriptlet is basically the same as [abort-on-stack-trace](#abort-on-stack-trace), but instead of aborting it logs:
* - function and source script names pairs that access the given property
Expand All @@ -23,6 +24,8 @@ import {
* ```
*
* - `property` — required, path to a property. The property must be attached to window.
*
* @added v1.5.0.
*/
/* eslint-enable max-len */
export function logOnStacktrace(source, property) {
Expand Down
3 changes: 3 additions & 0 deletions src/scriptlets/prevent-xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
/* eslint-disable max-len */
/**
* @scriptlet prevent-xhr
*
* @description
* Prevents `xhr` calls if **all** given parameters match.
*
Expand Down Expand Up @@ -86,6 +87,8 @@ import {
* ```
* example.org#%#//scriptlet('prevent-xhr', 'example.org', 'length:100-300')
* ```
*
* @added v1.5.0.
*/
/* eslint-enable max-len */
export function preventXHR(source, propsToMatch, customResponseText) {
Expand Down
3 changes: 3 additions & 0 deletions src/scriptlets/set-attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
/* eslint-disable max-len */
/**
* @scriptlet set-attr
*
* @description
* Sets the specified attribute on the specified elements. This scriptlet runs once when the page loads
* and after that and after that on DOM tree changes.
Expand Down Expand Up @@ -75,6 +76,8 @@ import {
* <!-- after -->
* <a class="class" test-attribute="fAlse">Some text</div>
* ```
*
* @added v1.5.0.
*/
/* eslint-enable max-len */
export function setAttr(source, selector, attr, value = '') {
Expand Down

0 comments on commit a5cd94e

Please sign in to comment.