/* Last Modified time : 20220211 15:38 by https://immmmm.com 已适配 FriendCircle 公共库和主库 */ //默认数据 var fdata = { jsonurl: '', apiurl: 'https://moments.0206.ink/', apipublicurl: '', //默认公共库 initnumber: 20, //首次加载文章数 stepnumber: 20, //更多加载文章数 article_sort: 'created', //文章排序 updated or created error_img: 'https://sdn.geekzu.org/avatar/57d8260dfb55501c37dde588e7c3852c' } //可通过 var fdataUser 替换默认值 if (typeof (fdataUser) !== "undefined") { for (var key in fdataUser) { if (fdataUser[key]) { fdata[key] = fdataUser[key]; } } } var article_num = '', sortNow = '', UrlNow = '', friends_num = '' var container = document.getElementById('cf-container') || document.getElementById('fcircleContainer'); // 获取本地 排序值、加载apiUrl,实现记忆效果 var localSortNow = localStorage.getItem("sortNow") var localUrlNow = localStorage.getItem("urlNow") if (localSortNow && localUrlNow) { sortNow = localSortNow UrlNow = localUrlNow } else { sortNow = fdata.article_sort if (fdata.jsonurl) { UrlNow = fdata.apipublicurl + 'postjson?jsonlink=' + fdata.jsonurl + "&" } else if (fdata.apiurl) { UrlNow = fdata.apiurl + 'all?' } else { UrlNow = fdata.apipublicurl + 'all?' } console.log("当前模式:" + UrlNow) localStorage.setItem("urlNow", UrlNow) localStorage.setItem("sortNow", sortNow) } // 打印基本信息 function loadStatistical(sdata) { article_num = sdata.article_num friends_num = sdata.friends_num var messageBoard = `
${item.title}${item.created}
` } showHtml += '