Bookmark Highlighter에 대한 리뷰
Bookmark Highlighter 제작자: Carey Tilden
리뷰 4개
- This 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. - 5점 만점에 4점Ahmmad Ismail 님, 8년 전1 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. - 5점 만점에 4점Firefox 사용자 12957254 님, 8년 전The main reason I use firefox! The only problem is that it doesn't work in every site (toranoana for example).
개발자 답글
8년 전에 게시됨It 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.