mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-16 14:15:36 +07:00
Simplify expression
This commit is contained in:
10
clearurls.js
10
clearurls.js
@@ -509,7 +509,7 @@ function start() {
|
|||||||
* @param {String} method HTTP Method Name
|
* @param {String} method HTTP Method Name
|
||||||
*/
|
*/
|
||||||
this.addMethod = function (method) {
|
this.addMethod = function (method) {
|
||||||
if (methods.indexOf(method) == -1) {
|
if (methods.indexOf(method) === -1) {
|
||||||
methods.push(method);
|
methods.push(method);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -517,12 +517,12 @@ function start() {
|
|||||||
/**
|
/**
|
||||||
* Check the requests' method.
|
* Check the requests' method.
|
||||||
*
|
*
|
||||||
* @param {requestDetails} details Requests deatils
|
* @param {requestDetails} details Requests details
|
||||||
* @returns {boolean} if need filter? true: false
|
* @returns {boolean} should be filtered or not
|
||||||
*/
|
*/
|
||||||
this.matchMethod = function (details) {
|
this.matchMethod = function (details) {
|
||||||
if (!methods.length) return true;
|
if (!methods.length) return true;
|
||||||
return methods.indexOf(details['method']) > -1 ? true : false;
|
return methods.indexOf(details['method']) > -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -599,7 +599,7 @@ function start() {
|
|||||||
* Function which called from the webRequest to
|
* Function which called from the webRequest to
|
||||||
* remove the tracking fields from the url.
|
* remove the tracking fields from the url.
|
||||||
*
|
*
|
||||||
* @param {webRequest} request webRequest-Object
|
* @param {requestDetails} request webRequest-Object
|
||||||
* @return {Array} redirectUrl or none
|
* @return {Array} redirectUrl or none
|
||||||
*/
|
*/
|
||||||
function clearUrl(request) {
|
function clearUrl(request) {
|
||||||
|
|||||||
Reference in New Issue
Block a user