diff --git a/extension/content.js b/extension/content.js index b659d93..89c3020 100644 --- a/extension/content.js +++ b/extension/content.js @@ -7,10 +7,12 @@ $(document).ready(function () { if (!loaded) { loaded = true; const splits = location.pathname.split('/').filter(s => s); - if (splits.length === 2 && $("#repo-stars-counter-star").length > 0) { + if (splits.length >= 2 && $("#repo-stars-counter-star").length > 0) { itemId = splits[0] + ':' + splits[1]; // mark read - chrome.runtime.sendMessage({ read: itemId }, () => { }); + if (splits.length == 2) { + chrome.runtime.sendMessage({ read: itemId }, () => { }); + } // get neighbors loadSimilarRepos(); } else if (splits.length === 0) { @@ -159,8 +161,8 @@ async function showRecommend(result) { let exploreDiv = $("[aria-label='Explore']"); exploreDiv.children("[aria-label='GitRec']").remove(); let template = ` -