From e0e3d975be4cf514eeb832882621c4ddab86f248 Mon Sep 17 00:00:00 2001 From: iotcat Date: Tue, 9 Jul 2019 15:01:06 +0800 Subject: [PATCH] auto update --- .../img/usr/themes/photograph/fancybox3/js/share.js | 12 +++++++++++- ushio/www/img/usr/themes/photograph/index.php | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ushio/www/img/usr/themes/photograph/fancybox3/js/share.js b/ushio/www/img/usr/themes/photograph/fancybox3/js/share.js index 2429698c..4256399d 100644 --- a/ushio/www/img/usr/themes/photograph/fancybox3/js/share.js +++ b/ushio/www/img/usr/themes/photograph/fancybox3/js/share.js @@ -39,7 +39,11 @@ "Pinterest" + "" + "

" + - '

' + + '

' + + '

This Page

' + + '

Url

' + + '

HTML

' + + '

Markdown

' + "" } }); @@ -75,10 +79,16 @@ url = current.opts.share.url.apply(current, [instance, current]); } + var share_url = current.src; + var share_alt = window.location.href.match(/xyz\/(\S*)?.html/)[1]+'_'+current.src.match(/img_(\S[^_]*)?_/)[1]; + tpl = current.opts.share.tpl .replace(/\{\{media\}\}/g, current.type === "image" ? encodeURIComponent(current.src) : "") .replace(/\{\{url\}\}/g, encodeURIComponent(url)) .replace(/\{\{url_raw\}\}/g, escapeHtml(url)) + .replace(/\{\{url_url\}\}/g, share_url) + .replace(/\{\{url_html\}\}/g, '"'+share_alt+'"') + .replace(/\{\{url_markdown\}\}/g, '!['+share_alt+']('+share_url+')') .replace(/\{\{descr\}\}/g, instance.$caption ? encodeURIComponent(instance.$caption.text()) : ""); $.fancybox.open({ diff --git a/ushio/www/img/usr/themes/photograph/index.php b/ushio/www/img/usr/themes/photograph/index.php index db5e9b7a..a39303d2 100644 --- a/ushio/www/img/usr/themes/photograph/index.php +++ b/ushio/www/img/usr/themes/photograph/index.php @@ -11,7 +11,7 @@ include '/home/ushio/www/api/functions.php'; -if(file_get_contents('/tmp/img_yimian_is_update') != date('Y-m-d-H')){ +if(file_get_contents('/tmp/img_yimian_is_update') != date('Y-m')){ $__db= Typecho_Db::get();