File tree Expand file tree Collapse file tree 6 files changed +46
-8
lines changed
Expand file tree Collapse file tree 6 files changed +46
-8
lines changed Original file line number Diff line number Diff line change 1- version=1.7.19
1+ version=1.7.20
Original file line number Diff line number Diff line change 11#
22# AdGuard Scriptlets (Redirects Source)
3- # Version 1.7.19
3+ # Version 1.7.20
44#
55- title : 1x1-transparent.gif
66 description : |-
Original file line number Diff line number Diff line change 11{
2- "version" : " 1.7.19 " ,
2+ "version" : " 1.7.20 " ,
33 "scriptlets" : [
44 {
55 "names" : [
Original file line number Diff line number Diff line change 11
22/**
33 * AdGuard Scriptlets
4- * Version 1.7.19
4+ * Version 1.7.20
55 */
66
77(function () {
1351813518 * @property {string} comment
1351913519 * @property {string} content
1352013520 * @property {string} contentType
13521+ * @property {string} file
1352113522 * @property {boolean} [isBlocking]
1352213523 * @property {string} [sha]
1352313524 */
1354513546 /**
1354613547 * Returns redirect source object
1354713548 * @param {string} title
13548- * @return {Redirect}
13549+ * @return {Redirect|undefined} Found redirect source object, or `undefined` if not found.
1354913550 */
1355013551 createClass(Redirects, [{
1355113552 key: "getRedirect",
1356713568 return aliases.indexOf(title) > -1;
1356813569 });
1356913570 }
13571+ /**
13572+ * Checks if redirect is blocking like click2load.html
13573+ * @param {string} title Title of the redirect.
13574+ * @returns True if redirect is blocking otherwise returns `false` even if redirect name is
13575+ * unknown.
13576+ */
13577+ }, {
13578+ key: "isBlocking",
13579+ value: function isBlocking(title) {
13580+ var redirect = this.redirects[title];
13581+ if (redirect) {
13582+ return !!redirect.isBlocking;
13583+ }
13584+ return false;
13585+ }
1357013586 }]);
1357113587 return Redirects;
1357213588 }();
Original file line number Diff line number Diff line change @@ -64,6 +64,11 @@ declare module '@adguard/scriptlets' {
6464 */
6565 contentType : string ;
6666
67+ /**
68+ * Filename of the redirect.
69+ */
70+ file : string ;
71+
6772 /**
6873 * If it's new type of redirects, i.e. click2load
6974 */
@@ -81,6 +86,7 @@ declare module '@adguard/scriptlets' {
8186 class Redirects {
8287 constructor ( rawYaml : string ) ;
8388 getRedirect ( title : string ) : Redirect ;
89+ isBlocking ( title : string ) : boolean ;
8490 }
8591
8692 /**
@@ -117,7 +123,7 @@ declare module '@adguard/scriptlets' {
117123 /**
118124 * Object with redirects titles in the keys and RedirectSources
119125 */
120- Redirects : Redirects ;
126+ Redirects : typeof Redirects ;
121127
122128 /**
123129 * Returns filename with extension for requested alias
Original file line number Diff line number Diff line change 11
22/**
33 * AdGuard Scriptlets
4- * Version 1.7.19
4+ * Version 1.7.20
55 */
66
77(function (factory) {
1352013520 * @property {string} comment
1352113521 * @property {string} content
1352213522 * @property {string} contentType
13523+ * @property {string} file
1352313524 * @property {boolean} [isBlocking]
1352413525 * @property {string} [sha]
1352513526 */
1354713548 /**
1354813549 * Returns redirect source object
1354913550 * @param {string} title
13550- * @return {Redirect}
13551+ * @return {Redirect|undefined} Found redirect source object, or `undefined` if not found.
1355113552 */
1355213553 createClass(Redirects, [{
1355313554 key: "getRedirect",
1356913570 return aliases.indexOf(title) > -1;
1357013571 });
1357113572 }
13573+ /**
13574+ * Checks if redirect is blocking like click2load.html
13575+ * @param {string} title Title of the redirect.
13576+ * @returns True if redirect is blocking otherwise returns `false` even if redirect name is
13577+ * unknown.
13578+ */
13579+ }, {
13580+ key: "isBlocking",
13581+ value: function isBlocking(title) {
13582+ var redirect = this.redirects[title];
13583+ if (redirect) {
13584+ return !!redirect.isBlocking;
13585+ }
13586+ return false;
13587+ }
1357213588 }]);
1357313589 return Redirects;
1357413590 }();
You can’t perform that action at this time.
0 commit comments