Unpacked version of the Greenhouse extension (for Safari).
Javascript libraries include:
Tipped.js (jQuery plugin for the tooltip)
Highlight.js (jQuery plugin for highlighting)
List.js (Javascript plugin for list sorting in popover)
jQuery (of course)
Fonts and images are excluded.
A PHP file being hosted on my website is included (retrieval.php).
###Explaination:
- Safari injects library js and css files at page start
- Script.js (which runs the extension) is injected as an end script
- Script.js uses the highlight.js library to scan the page for an array of names (found in names.js)
- Highlight.js adds wraps names in span tag with class 'highlight-67132' if name is a Democrat, and 'highlight-16235' if Republican
- Tipped.js, using AJAX, sends the candidate ID (paired to name in array) to the PHP hosted on my site
- Using a Candidate's ID, the PHP file retrieves data from OpenSecrets API and echoes it back into the tooltip
- Echoed tooltip contents are styled with styles.css file