Pógódnośenja za Bookmark Highlighter
Bookmark Highlighter wót Carey Tilden
4 pógódnośenja
- Z 4 z 5 pógódnośonywót Moneky, 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. - Z 4 z 5 pógódnośonywót Ahmmad Ismail, 7 წლის წინ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. - Z 4 z 5 pógódnośonywót vidigal, 7 წლის წინGood 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.
- Z 4 z 5 pógódnośonywót Wužywaŕ Firefox 12957254, 8 წლის წინThe main reason I use firefox! The only problem is that it doesn't work in every site (toranoana for example).
Wótegrono wuwijarja
jo se napisał 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.