function my_space_onload() {
$("#main_view").addClass("myspace");
render_selected_filter_list();
userRecentGet();
//LoadAllChannel();
LoadAllLanguage();
$("#filter-author").parent().hide();
$("#palicanon-category").hide();
}
function userRecentGet(offset=0){
$.getJSON(
"/api/v2/view?view=user-recent"
)
.done(function(data) {
let html = "";
for (const item of data.data) {
item.meta = JSON.parse(item.meta);
html += "
";
html += "";
html += "";
if(item.title){
html += item.title;
}else{
html += item.org_title;
}
html += "";
html +="";
html += "";
html += item.count;
html += "";
html += "";
html += item.updated_at;
html += "";
html += "";
}
$("#list-1").html(html);
})
.fail(function() {
console.log( "error" );
});
}
function loadUserRecent(){
$.getJSON(
"/api/v2/view?view=user-recent",
{
take:10,
}
)
.done(function(data) {
let html = "";
html += "";
for (const item of data.data) {
item.meta = JSON.parse(item.meta);
html += "- ";
html += "";
if(item.title){
html += item.title;
}else{
html += item.org_title;
}
html += "";
html += "
";
}
html += "
";
$("#user_recent").find('.list').first().html(html);
})
.fail(function() {
console.log( "error" );
});
}