r/programmingtools • • Sep 15 '16

[request] a javascript lib that allows to programatically "annotate" sites

Hi there,

As the title indicates, i'm looking for a lib that i could use to "annotate" pages without user input.

Something that would allow, for instance, to add a text that says "profile picture" with an arrow pointed at the profile picture if loaded on facebook.

If you ever came across something like this, a name or link would be greatly appreciated !

8 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/iodbh Sep 15 '16

Well, i have a semi-clear idea how i could do it : get the position of the element i want to annotate, add a text with position:absolute somewhere close and maybe add a css class with borders.

But i'm no frontend ninja and finding a tool that does it nicely with all the caveats figured out (what do i do if i'm exceeding the page's length/width for instance) would be a huge time saver.

2

u/woojoo666 Sep 15 '16

hmm, I think you're looking for something similar to a dropdown menu, which many UI libraries support, with boundary checking factored in and everything. Perhaps try modifying JQuery UI's Dropdown Menu. I know Foundation also has a dropdown menu. Have you tried searching/asking stackoverflow? If it hasnt been answered before, somebody might even code up a quick solution (I would try but I'm not at a computer right now)