aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/front.js
Commit message (Collapse)AuthorAgeLines
* Clicking "Report" header links on homepage focusses #pc inputZarino Zappia2018-09-19-1/+13
| | | | | | | Works for both the "Report" button shown in the mobile header, and the "Report a problem" span on the desktop site. Thanks to Louise for suggesting this in mysociety/collideoscope#42!
* Avoid exception if homepage does not include a .report-a-problem-btnZarino Zappia2018-09-19-1/+1
| | | | | | | | Some cobrands (like Collideoscope) don’t have a .report-a-problem-btn in their mobile nav menu, so .querySelector() would raise an exception when we tried to attach an event listener to it. Now we check that the element exists before attaching the listener.
* Fix/tidy front-only hover behaviour.Matthew Somerville2018-05-02-0/+7
|
* Add js=1 to links to /around from the front pageDave Arter2017-11-24-0/+5
| | | | | | The location disambiguation page uses the frontpage JavaScript and has lots of links pointing to /around, so the code should make sure those links include the `js` parameter.
* Have front page load minimal JS necessary.Matthew Somerville2017-11-15-0/+13
By creating a small file with only what is needed (focus, js flagging), we can drop loading jQuery and all the application JavaScript on the front page, prefetching them instead.