I get the HTML of the grammar points’ pages and use jQuery to locate the relevant elements.
If you’re familiar with JS it’s a simple ajax call
$.get('https://bunpro.jp/grammar_points/'+I, function(data){
forExampleSentence(I, data, lacksYellow);
forExampleSentence(I, data, checkQuestionMark);
checkReadingsTab(I, data);
checkSelfStudyTab(I, data);
});
For each grammar point (I) it gets the HTML (data), and performs the checks on that data.