Seen by icons
This commit is contained in:
12
admin.css
12
admin.css
@@ -116,6 +116,7 @@
|
||||
background:url(img/flags.png) no-repeat 0 0;
|
||||
background-size: 20px auto;
|
||||
}
|
||||
&.ctry_eu::before { background-position-y: -161px }
|
||||
&.ctry_ad::before { background-position-y: -441px }
|
||||
&.ctry_ae::before { background-position-y: -461px }
|
||||
&.ctry_af::before { background-position-y: -481px }
|
||||
@@ -380,6 +381,17 @@
|
||||
&.ref_facebook::before { background-position-y: -280px }
|
||||
&.ref_discord::before { background-position-y: -300px }
|
||||
&.ref_other::before { background-image: url('img/more.svg') }
|
||||
|
||||
/* seen-by icons */
|
||||
&.seenby::before { background-image: url('img/stages.png') }
|
||||
&.sb_srv::before { background-position-y: -20px }
|
||||
&.sb_log::before { background-position-y: -40px }
|
||||
&.sb_srvlog::before { background-position-y: -60px }
|
||||
&.sb_tck::before { background-position-y: -80px }
|
||||
&.sb_srvtck::before { background-position-y: -100px }
|
||||
&.sb_logtck::before { background-position-y: -120px }
|
||||
&.sb_srvlogtck::before { background-position-y: -140px }
|
||||
|
||||
}
|
||||
|
||||
.page_icon {
|
||||
|
||||
31
admin.js
31
admin.js
@@ -1156,7 +1156,7 @@ BotMon.live = {
|
||||
|
||||
// check for unknown bots:
|
||||
if (!botInfo) {
|
||||
const botmatch = agent.match(/([\s\d\w\-]*bot|[\s\d\w\-]*crawler|[\s\d\w\-]*spider)[\/\s;\),\\.$]/i);
|
||||
const botmatch = agent.match(/([\s\d\w\-]*bot|[\s\d\w\-]*crawler|[\s\d\w\-]*spider)[\/\s\w\-;\),\\.$]/i);
|
||||
if(botmatch) {
|
||||
botInfo = {'id': ( botmatch[1] || "other_" ), 'n': "Other" + ( botmatch[1] ? " (" + botmatch[1] + ")" : "" ) , "bot": botmatch[1] };
|
||||
}
|
||||
@@ -1543,15 +1543,15 @@ BotMon.live = {
|
||||
},
|
||||
|
||||
// test for specific client identifiers:
|
||||
/*matchesClients: function(visitor, ...list) {
|
||||
matchesUserAgent: function(visitor, ...list) {
|
||||
|
||||
for (let i=0; i<list.length; i++) {
|
||||
if (visitor._client.id == list[i]) {
|
||||
return true
|
||||
if (visitor.agent == list[i]) {
|
||||
return true
|
||||
}
|
||||
};
|
||||
return false;
|
||||
},*/
|
||||
},
|
||||
|
||||
// unusual combinations of Platform and Client:
|
||||
combinationTest: function(visitor, ...combinations) {
|
||||
@@ -2299,6 +2299,12 @@ BotMon.live = {
|
||||
}, data.id));
|
||||
}
|
||||
|
||||
// seen by icon:
|
||||
span1.appendChild(make('span', {
|
||||
'class': 'icon_only seenby sb_' + data._seenBy.join(''),
|
||||
'title': "Seen by: " + data._seenBy.join('+')
|
||||
}, data._seenBy.join(', ')));
|
||||
|
||||
// country flag:
|
||||
if (data.geo && data.geo !== 'ZZ') {
|
||||
span1.appendChild(make('span', {
|
||||
@@ -2411,6 +2417,19 @@ BotMon.live = {
|
||||
dl.appendChild(make('dt', {}, "User-Agent:"));
|
||||
dl.appendChild(make('dd', {'class': 'agent'}, data.agent));
|
||||
|
||||
if (data.ref && data.ref !== '') {
|
||||
dl.appendChild(make('dt', {}, "Referrer:"));
|
||||
|
||||
const refInfo = BotMon.live.data.analytics.getRefererInfo(data.ref);
|
||||
const refDd = dl.appendChild(make('dd', {
|
||||
'class': 'has_icon referer ref_' + refInfo.id
|
||||
}));
|
||||
refDd.appendChild(make('a', {
|
||||
'href': data.ref,
|
||||
'target': 'refTarget'
|
||||
}, data.ref));
|
||||
}
|
||||
|
||||
dl.appendChild(make('dt', {}, "Languages:"));
|
||||
dl.appendChild(make('dd', {'class': 'langs'}, ` [${data.accept}]`));
|
||||
|
||||
@@ -2427,7 +2446,7 @@ BotMon.live = {
|
||||
dl.appendChild(make('dd', {'class': 'has_icon session typ_' + data.typ}, data.id));
|
||||
|
||||
dl.appendChild(make('dt', {}, "Seen by:"));
|
||||
dl.appendChild(make('dd', undefined, data._seenBy.join(', ') ));
|
||||
dl.appendChild(make('dd', {'class': 'has_icon seenby sb_' + data._seenBy.join('')}, data._seenBy.join(', ') ));
|
||||
|
||||
dl.appendChild(make('dt', {}, "Visited pages:"));
|
||||
const pagesDd = make('dd', {'class': 'pages'});
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
{"func": "smallPageCount", "params": [1],
|
||||
"id": "onePage", "desc": "Visiter viewed only a single page",
|
||||
"bot": 30
|
||||
"bot": 20
|
||||
},
|
||||
{"func": "noRecord", "params": ["log"],
|
||||
"id": "noClient", "desc": "No client-side JS log was recorded",
|
||||
@@ -31,7 +31,7 @@
|
||||
},
|
||||
{"func": "noRecord", "params": ["tck"],
|
||||
"id": "noTicks", "desc": "No client ticks were recorded",
|
||||
"bot": 20
|
||||
"bot": 10
|
||||
},
|
||||
{"func": "noReferrer",
|
||||
"id": "noRefs", "desc": "No referer field",
|
||||
@@ -45,6 +45,10 @@
|
||||
"id": "botClient", "desc": "Client identifier indicates web crawler",
|
||||
"bot": 100
|
||||
},
|
||||
{"func": "matchesUserAgent", "params": [""],
|
||||
"id": "noUA", "desc": "Didn’t even bother to send a user-agent string",
|
||||
"bot": 50
|
||||
},
|
||||
{"func": "combinationTest", "params": [["macos","chromeold"],["macos","msie"],["winold","edge"],["winold","brave"]],
|
||||
"id": "suspPC", "desc": "Suspicious combination of platform and client",
|
||||
"bot": 30
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
},
|
||||
{"n": "WhatsApp",
|
||||
"id": "whatsapp",
|
||||
"rx": [ "WhatsApp/(\\d+\\.\\d+)" ]
|
||||
"rx": [ "WhatsApp/(\\d+\\.?\\d*)" ]
|
||||
},
|
||||
{"n": "Apple Messages",
|
||||
"id": "applemsgs",
|
||||
|
||||
BIN
img/stages.png
Normal file
BIN
img/stages.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
@@ -1,7 +1,7 @@
|
||||
base botmon
|
||||
author Sascha Leib
|
||||
email ad@hominem.com
|
||||
date 2025-10-17
|
||||
date 2025-10-19
|
||||
name Bot Monitoring
|
||||
desc A tool for monitoring and analysing bot traffic to your wiki (under development)
|
||||
url https://www.dokuwiki.org/plugin:botmon
|
||||
|
||||
Reference in New Issue
Block a user