mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-16 06:05:37 +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
|
||||
*/
|
||||
this.addMethod = function (method) {
|
||||
if (methods.indexOf(method) == -1) {
|
||||
if (methods.indexOf(method) === -1) {
|
||||
methods.push(method);
|
||||
}
|
||||
}
|
||||
@@ -517,12 +517,12 @@ function start() {
|
||||
/**
|
||||
* Check the requests' method.
|
||||
*
|
||||
* @param {requestDetails} details Requests deatils
|
||||
* @returns {boolean} if need filter? true: false
|
||||
* @param {requestDetails} details Requests details
|
||||
* @returns {boolean} should be filtered or not
|
||||
*/
|
||||
this.matchMethod = function (details) {
|
||||
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
|
||||
* remove the tracking fields from the url.
|
||||
*
|
||||
* @param {webRequest} request webRequest-Object
|
||||
* @param {requestDetails} request webRequest-Object
|
||||
* @return {Array} redirectUrl or none
|
||||
*/
|
||||
function clearUrl(request) {
|
||||
|
||||
Reference in New Issue
Block a user