mirror of
https://github.com/Jonnyan404/memos-bber.git
synced 2026-04-25 03:58:37 +09:00
dayjs
This commit is contained in:
+1
-1
@@ -240,7 +240,7 @@ $('#random').click(function () {
|
|||||||
|
|
||||||
function randDom(randomData){
|
function randDom(randomData){
|
||||||
get_info(function (info) {
|
get_info(function (info) {
|
||||||
var randomDom = '<div class="random-item"><div class="random-time"><span id="random-link" data-id="'+randomData.id+'">…</span>'+dayjs(new Date(randomData.createdTs * 1000).toLocaleString()).fromNow()+'</div><div class="random-content">'+randomData.content.replace(/!\[.*?\]\((.*?)\)/g,' <img class="random-image" src="$1"/> ').replace(/\[(.*?)\]\((.*?)\)/g,' <a href="$2" target="_blank">$1</a> ')+'</div></div>'
|
var randomDom = '<div class="random-item"><div class="random-time"><span id="random-link" data-id="'+randomData.id+'">…</span>'+dayjs(new Date(randomData.createdTs * 1000)).fromNow()+'</div><div class="random-content">'+randomData.content.replace(/!\[.*?\]\((.*?)\)/g,' <img class="random-image" src="$1"/> ').replace(/\[(.*?)\]\((.*?)\)/g,' <a href="$2" target="_blank">$1</a> ')+'</div></div>'
|
||||||
if(randomData.resourceList && randomData.resourceList.length > 0){
|
if(randomData.resourceList && randomData.resourceList.length > 0){
|
||||||
var resourceList = randomData.resourceList;
|
var resourceList = randomData.resourceList;
|
||||||
for(var j=0;j < resourceList.length;j++){
|
for(var j=0;j < resourceList.length;j++){
|
||||||
|
|||||||
Reference in New Issue
Block a user