Reviews for Bookmark Highlighter
Bookmark Highlighter by Carey Tilden
4 reviews
- Rated 4 out of 5by Moneky, 4 years agoThis addon will not work if the page contains some url like: mailto:name@email.com
You should check url format before run bookmark.search:
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator
for (var i = 0; i < m.hrefs.length; i++) {
var href = m.hrefs[i];
if(!pattern.test(href))
continue;
try {
bookmarkSearches.push(browser.bookmarks.search({ url: href }));
} catch (error) {
console.log(error);
console.log(href);
}
}
Thanks. - Rated 4 out of 5by Ahmmad Ismail, 7 years ago1 start missing because it does not work in some sites. I found the reason.
If the link is href="mysite.com/link1.html" Then it will work.
But, if the link is href="/link1.html" Then it will not work.
You can check it on https://www.lynda.com/subject/all
If you bookmark some of the links and refresh then the appearance will not change. Probably because the links do not contain the domain address. - Rated 4 out of 5by vidigal, 7 years agoGood Idea... Unluckly the site where i need this (github search pages) handle pagination via ajax, so i need to reload on each subsequent page to get it work. Probably you should use a delegate event attached to the body to resolve this issue.
- Rated 4 out of 5by Firefox user 12957254, 7 years agoThe main reason I use firefox! The only problem is that it doesn't work in every site (toranoana for example).
Developer response
posted 7 years agoIt looks like some links on your example site are being added after the extension has a chance to execute. I haven't been able to find a way to fix this problem, but if I do, I'll post another reply.