GoogleWebComponents/google-youtube-video-wall — pull request #15 by jeffposnick (2014-10-23 17:06:04+00:00)
Title: Fixes for multiple requests, and added goingBackDays parameter

(CC: @addyosmani @ebidel to double-check some of my logic.)

There are a couple of changes to help make sure there aren't inadvertent API requests made:
- Don't rely on `JSON.stringify()` returning identical strings for the object keys/values. Explicitly check to see if the old and new parameter objects really differ before updating the `` parameter string.
- Wrapped the check to see if there are any scroll bars visible within a `this.async()` to give the new content a chance to get added to the DOM first. This prevents a request for the second page of results from being immediately requested.

This also introduces a new attribute, `goingBackDays`, which offers a shorthand for setting the `publishedAfter` attribute to a dynamic value corresponding to a number of days in the past.