mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-15 21:55:36 +07:00
Preparations for costume rules
+ Preparations for costume rules - Feature "Report URLs" + Auto hash rules + Minimize rules length + Add start and end delimiters to rules
This commit is contained in:
@@ -53,10 +53,17 @@ function checkOSAndroid()
|
||||
*/
|
||||
function countFields(url)
|
||||
{
|
||||
var matches = (url.match(/[^\/|\?|&]+=[^\/|\?|&]+/gi) || []);
|
||||
var count = matches.length;
|
||||
return extractFileds(url).length;
|
||||
}
|
||||
|
||||
return count;
|
||||
/**
|
||||
* Extract the fields from an url.
|
||||
* @param {String} url URL as String
|
||||
* @return {Array} Fields as array
|
||||
*/
|
||||
function extractFileds(url)
|
||||
{
|
||||
return (url.match(/[^\/|\?|&]+=[^\/|\?|&]+/gi) || []);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user