does 1 know how reddit alien animation on mobile app work. animation changes loading time.
is done through ajax calls change images after time has elapsed?
the picture of snoo added in fetch_more() in mobile.js:
function fetch_more() { $("#sitetable").after($("<div class='loading'><img src='" + r.utils.staticurl("reddit_loading.png") + "'/></div>")); var = document.location, c = a.pathname.split("."), c = c[c.length - 1].indexof("/") == -1 ? c.slice(0, -1).join(".") : a.pathname, = a.protocol + "//" + a.host + c + ".json-compact" + a.search, c = $("#sitetable").find(".thing:last"); += (document.location.search ? "&" : "?") + "after=" + c.thing_id(); c.find(".rank").length && parseint(c.find(".rank").html()); $.getjson(a, function (a) { $.insert_things(a.data, !0); $(".thing").click(function () {}); $("#sitetable").next(".loading").remove(); && a.data.length == 0 && $(window).unbind("scroll") }) }; the actual animation done in compact.css (through .loading class of parent div):
.loading img { -webkit-animation-name: rotatethis; -webkit-animation-duration: .5s; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; } both files heavily compacted, code snippets above taken versions prettified using tools found through google.
Comments
Post a Comment