diff --git a/config/default-config.json b/config/default-config.json index d0b79c9..f220192 100644 --- a/config/default-config.json +++ b/config/default-config.json @@ -9,7 +9,7 @@ "id": "oldClient", "desc": "Obsolete browser version", "bot": 40 }, - {"func": "matchesPlatform", "params": ["winold", "macosold"], + {"func": "matchesPlatform", "params": ["winold", "macosold", "androidold"], "id": "oldOS", "desc": "Obsolete platform version", "bot": 40 }, @@ -17,6 +17,10 @@ "id": "serverOS", "desc": "Server OS", "bot": 40 }, + {"func": "matchesPlatform", "params": ["null"], + "id": "noOS", "desc": "Unknown or missing OS information", + "bot": 40 + }, {"func": "smallPageCount", "params": [1], "id": "onePage", "desc": "Visiter viewed only a single page", "bot": 40 @@ -71,14 +75,15 @@ } ], "ipRanges": [ - {"from": "3.0.0.0", "to": "3.255.255.254", "label": "Amazon Data Services [US]"}, + {"from": "3.0.0.0", "to": "3.255.255.254", "label": "Amazon Data Services [US]", "g": "US"}, {"from": "8.127.0.0", "to": "8.223.255.254", "label": "Alibaba [CN]"}, - {"from": "24.240.0.0", "to": "24.247.255.255", "mask": 13, "label": "Charter [US]"}, + {"from": "24.240.0.0", "to": "24.247.255.255", "m": 13, "label": "Charter [US]"}, {"from": "27.106.0.0", "to": "27.106.127.254", "label": "Huawei [US]"}, {"from": "34.0.0.0", "to": "34.191.255.254", "label": "Google LLC"}, {"from": "45.0.0.0", "to": "45.255.255.254", "label": "Various small ISPs, mostly BR"}, {"from": "46.250.160.0", "to": "46.250.191.254", "label": "Huawei [MX]"}, {"from": "49.0.200.0", "to": "49.0.255.254", "label": "Huawei [SG]"}, + {"from": "66.249.64.0", "to": "66.249.95.255", "m": 19, "label": "Google LLC [US]"}, {"from": "84.37.35.0", "to": "84.37.255.254", "label": "GTT.net [US]"}, {"from": "94.74.64.0", "to": "94.74.127.254", "label": "Huawei [HK]"}, {"from": "101.0.0.0", "to": "101.255.255.254", "label": "ChinaNet [CN]"}, @@ -102,14 +107,14 @@ {"from": "188.0.0.0", "to": "188.255.255.254", "label": "South-American ISPs (188.x)"}, {"from": "189.0.0.0", "to": "189.255.255.254", "label": "South-American ISPs (189.x)"}, {"from": "190.0.0.0", "to": "190.255.255.254", "label": "South-American ISPs (190.x)"}, - {"from": "192.124.170.0", "to": "192.124.182.254", "label": "Relcom [CZ]"}, + {"from": "192.124.170.0", "to": "192.124.182.254", "label": "Relcom [CZ]"}, {"from": "195.37.0.0", "to": "195.37.255.255", "label": "DFN [DE]"}, {"from": "2001:4800::::::", "to": "2001:4fff:ffff:ffff:ffff:ffff:ffff:ffff", "label": "Rackspace/Google [US]"}, - {"from": "2001:0ee0::::::", "to": "2001:ee3:ffff:ffff:ffff:ffff:ffff:ffff", "mask": 30, "label": "VNPT [VN]"}, - {"from": "2600:1f00::::::", "to": "2600:1fff:ffff:ffff:ffff:ffff:ffff:ffff", "label": "Amazon Cloud [US]"}, - {"from": "2603:6010::::::", "to": "2603:6010:ffff:ffff:ffff:ffff:ffff:ffff", "mask": 32, "label": "Charter [US]"}, - {"from": "2603:8000::::::", "to": "2603:80ff:ffff:ffff:ffff:ffff:ffff:ffff", "mask": 24, "label": "Charter [US]"}, - {"from": "2804:::::::", "to": "2804:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", "mask": 16, "label": "Inspire [BR]"}, + {"from": "2001:0ee0::::::", "to": "2001:ee3:ffff:ffff:ffff:ffff:ffff:ffff", "m": 30, "label": "VNPT [VN]"}, + {"from": "2600:1f00::::::", "to": "2600:1fff:ffff:ffff:ffff:ffff:ffff:ffff", "m": "Amazon Cloud [US]"}, + {"from": "2603:6010::::::", "to": "2603:6010:ffff:ffff:ffff:ffff:ffff:ffff", "m": 32, "label": "Charter [US]"}, + {"from": "2603:8000::::::", "to": "2603:80ff:ffff:ffff:ffff:ffff:ffff:ffff", "m": 24, "label": "Charter [US]"}, + {"from": "2804:::::::", "to": "2804:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", "m": 16, "label": "Inspire [BR]"}, {"from": "2a0a:4cc0::::::", "to": "2a0a:4cc0:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", "label": "Netcup [DE]"} ] } \ No newline at end of file diff --git a/config/known-clients.json b/config/known-clients.json index 813f5b1..d650d9f 100644 --- a/config/known-clients.json +++ b/config/known-clients.json @@ -23,6 +23,10 @@ "id": "huawei", "rx": [ "\\sHuaweiBrowser\\/(\\d+\\.\\d+)[\\s\\.]", "\\/harmony360Browser\\/(\\d+\\.\\d+)[\\s\\.]"] }, + {"n": "Silk", + "id": "silk", + "rx": [ "\\Silk\\/(\\d+)\\." ] + }, {"n": "DuckDuckGo", "id": "ddg", "rx": [ "\\sDdg\\/(\\S+)" ] @@ -59,8 +63,12 @@ "id": "safari", "rx": [ "\\sSafari\\/(\\d+)" ] }, + {"n": "Firefox Old", + "id": "ffold", + "rx": [ "\\sFirefox\\/(\\d\\d)\\.", "\\sFirefox\\s" ] + }, {"n": "Firefox", "id": "firefox", - "rx": [ "\\sFirefox\\/(\\S+)" ] + "rx": [ "\\sFirefox\\/(\\d\\d\\d)\\." ] } ] diff --git a/config/known-platforms.json b/config/known-platforms.json index 7dd452e..a4a9ed5 100644 --- a/config/known-platforms.json +++ b/config/known-platforms.json @@ -15,9 +15,17 @@ "id": "ios", "rx": [ "\\sFxiOS\\/(\\d+\\.\\d+)\\s", "\\siPhone\\sOS\\s([\\d\\._]+)\\s", "\\siPadOS\\s([\\d\\._]+)\\s", "iPad; CPU OS (\\d+)[_\\.\\s]", "\\sCriOS\\/(\\d+\\.\\d+)\\." ] }, + {"n": "FireOS", + "id": "fire", + "rx": [ "\\sKFFOWI[\\)\\s]]", "\\sKFTHWI[\\)\\s]]" , "\\sSilk\\/"] + }, + {"n": "Old Android", + "id": "androidold", + "rx": [ "Android[\\s;\\/](\\d)\\." ] + }, {"n": "Android", "id": "android", - "rx": [ "[\\(\\s]Android\\s([^;]+);" ] + "rx": [ " Android[\\s;\\/](\\d\\d)\\.;\\s" ] }, {"n": "Old MacOS", "id": "macosold", diff --git a/img/clients.png b/img/clients.png index fc6a01d..fd9d06b 100644 Binary files a/img/clients.png and b/img/clients.png differ diff --git a/img/platforms.png b/img/platforms.png index 46a33b7..0e0eb7e 100644 Binary files a/img/platforms.png and b/img/platforms.png differ diff --git a/script.js b/script.js index c902300..1062364 100644 --- a/script.js +++ b/script.js @@ -981,7 +981,7 @@ BotMon.live = { match: function(agent) { //console.info('BotMon.live.data.clients.match(',agent,')'); - let match = {"n": "Unknown", "v": -1, "id": null}; + let match = {"n": "Unknown", "v": -1, "id": 'null'}; if (agent) { BotMon.live.data.clients._list.find(client => { @@ -1047,7 +1047,7 @@ BotMon.live = { match: function(cid) { //console.info('BotMon.live.data.platforms.match(',cid,')'); - let match = {"n": "Unknown", "id": null}; + let match = {"n": "Unknown", "id": 'null'}; if (cid) { BotMon.live.data.platforms._list.find(platform => { @@ -1216,6 +1216,9 @@ BotMon.live = { matchesPlatform: function(visitor, ...platforms) { const pId = ( visitor._platform ? visitor._platform.id : ''); + + if (visitor._platform.id == null) console.log(visitor._platform); + return platforms.includes(pId); }, diff --git a/style.less b/style.less index 9e1cd61..4108677 100644 --- a/style.less +++ b/style.less @@ -49,8 +49,7 @@ &.bot_seznambot::before { background-position-y: -140px } &.bot_claude::before { background-position-y: -160px } - /* platform icons */ - + /* platform icons */ &.platform::before { background-image: url('img/platforms.png') } &.pf_win10::before { background-position-y: -20px } &.pf_winold::before, dd.platform_winold::before, @@ -59,18 +58,19 @@ &.pf_macosold::before { background-position-y: -80px } &.pf_ios::before { background-position-y: -100px } &.pf_android::before { background-position-y: -120px } + &.pf_androidold::before { background-position-y: -140px } &.pf_linux::before { background-position-y: -160px } &.pf_bsd::before { background-position-y: -180px } &.pf_chromium::before { background-position-y: -200px } &.pf_hmos::before { background-position-y: -220px } &.pf_tizen::before { background-position-y: -240px } + &.pf_fire::before { background-position-y: -260px } /* browser icons */ &.client::before { background-image: url('img/clients.png') } &.cl_firefox::before { background-position-y: -20px } &.cl_safari::before { background-position-y: -40px } &.cl_chrome::before { background-position-y: -60px } - &.cl_chromeold::before { background-position-y: -60px; opacity: 75%; filter: ~"saturate(25%)"; } &.cl_msedge::before { background-position-y: -80px } &.cl_msie::before { background-position-y: -100px } &.cl_opera::before { background-position-y: -120px } @@ -81,6 +81,9 @@ &.cl_vivaldi::before { background-position-y: -220px } &.cl_aol::before { background-position-y: -240px } &.cl_ya::before { background-position-y: -260px } + &.cl_silk::before { background-position-y: -280px } + &.cl_ffold::before { background-position-y: -300px } + &.cl_chromeold::before { background-position-y: -320px } /* Country flags */ /* Note: flag images and CSS adapted from: https://github.com/lafeber/world-flags-sprite/ */