Created
November 18, 2016 10:27
-
-
Save vinhlh/6603385fa039508c3c8ea34db7083635 to your computer and use it in GitHub Desktop.
Typehead twitter search implement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.getRemoteSuggestions = function(a, b, c, d) { | |
if (!b || !this.needsRemoteRequest(b, d)) | |
return; | |
this.request[a] || (this.attr.useThrottle ? | |
this.request[a] = utils.throttle(this.splitRemoteRequests.bind(this), this.attr.remoteThrottleInterval) : | |
this.request[a] = utils.debounce(this.splitRemoteRequests.bind(this), this.attr.remoteDebounceInterval)), | |
b.query.indexOf("@") === 0 && b.typeaheadSrc === "COMPOSE" && (b.query = b.query.substring(1), | |
b.atSignRemoved = !0), | |
this.request[a](a, b, c, d) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment