Fix sending heartbeats and parsing GitHub repo

This commit is contained in:
Alan Hamlett
2024-08-30 10:33:13 +02:00
parent fb29f07e5e
commit 872161f655
5 changed files with 26 additions and 28 deletions

View File

@@ -70,10 +70,7 @@ const GitHub: HeartbeatParser = (url: string) => {
};
}
const body = document.getElementsByTagName('body').item(0);
if (!body) return;
const repo = body
const repo = document
.querySelector('meta[name=octolytics-dimension-repository_nwo]')
?.getAttribute('content');
if (repo?.split('/')[1] !== match[0]) return;