Chrome extension to parse google search results

前端 未结 1 659
说谎
说谎 2020-12-30 16:12

I\'m trying to make a little extension that checks the google search results for wikipedia articles, and adds a little extra link afterwards. But am having a little trouble

相关标签:
1条回答
  • 2020-12-30 17:14

    Google is loading results via AJAX so you need to use an event listener for DOMNodeInserted events.

    function filterResultInserts(event) {
      console.log(event);
    }
    
    target.addEventListener('DOMNodeInserted', filterResultInserts);
    

    Within filterResultInserts you will have to look for classes or ids that match results and modify them.

    0 讨论(0)
提交回复
热议问题