I\'m running the following javascript code in firefox extension
highlightLinks: function(e) {
var anchors = e.target.getElementsByTagName(\"a\");
let file =
In general when you call a database(not the browser ones) it is better to make one call, fetch all the data you will need into an array or an hash, and then work with them internally.
EDIT:
I would do that: load from the storage all the links and build a hash like:
linksHash = {
'url-1':true,
...,
'url-n':true
}
Then loop on anchors
and make a check with something like:
if(linksHash[anchors[i].href]){
//the link href is in the hash
}
Then if you note the RAM becomes an issue cut the load of the table in 2 or more pieces.