Migrate assets to use Webpacker

This commit is contained in:
Albert Yi
2018-07-06 16:41:08 -07:00
parent 95b72f5f5c
commit 6fa0ae2cf1
175 changed files with 11518 additions and 3726 deletions

View File

@@ -0,0 +1,38 @@
import Utility from './utility'
let PostPopular = {};
PostPopular.nav_prev = function(e) {
if ($("#popular-nav-links").length) {
var href = $("#popular-nav-links a[rel=prev]").attr("href");
if (href) {
location.href = href;
}
}
e.preventDefault();
}
PostPopular.nav_next = function(e) {
if ($("#popular-nav-links").length) {
var href = $("#popular-nav-links a[rel=next]").attr("href");
if (href) {
location.href = href;
}
}
e.preventDefault();
}
PostPopular.initialize_all = function() {
if ($("#c-explore-posts").length) {
Utility.keydown("a left", "prev_page", PostPopular.nav_prev);
Utility.keydown("d right", "next_page", PostPopular.nav_next);
}
}
$(document).ready(function() {
PostPopular.initialize_all();
});
export default PostPopular