Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #27 from FlyingSky-CN/1.0.3
Browse files Browse the repository at this point in the history
1.0.3
  • Loading branch information
FlyingSky-CN authored Jan 18, 2020
2 parents 772d796 + daff671 commit 3efda95
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
31 changes: 18 additions & 13 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ function themeConfig($form) {
<script>(function(){new Headroom(document.querySelector("#mdr-botnav"),{classes:{pinned:"slideDown",unpinned:"slideUp"}}).init();}());</script>
EOF;
echo "<script>document.getElementById('mdr-version').innerHTML = '".MDR_VERSION."'</script>".'<script>document.getElementById("mdr-update").onclick = function(){if(confirm("你确认要执行吗?更新过程中站点可能无法正常访问")){document.getElementById("mdr-update").innerHTML = "正在检查并更新";document.getElementById("mdr-update").setAttribute("disabled","true");var xmlhttp;if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){document.getElementById("mdr-update-pre").innerHTML=xmlhttp.responseText;$("#mdr-update-pre").slideDown();document.getElementById("mdr-update").innerHTML = "完成";}else{document.getElementById("mdr-update").innerHTML = "正在执行";}};xmlhttp.open("GET","';cjUrl('update.php');echo '",true);xmlhttp.send();}}</script>';

/* MDr Color 主题色设置 */
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Checkbox('mdrNotice', NULL, NULL, _t('<h2 id="mdr-color">主题色设置 <small>Color</small></h2>'));
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Text('mdrNotice', NULL, NULL, _t('<h2 id="mdr-color">主题色设置 <small>Color</small></h2>'));
$mdrNotice->input->setAttribute('style', 'display:none');
$form->addInput($mdrNotice);

$mdrPrimary = new Typecho_Widget_Helper_Form_Element_Select(
Expand Down Expand Up @@ -128,12 +130,9 @@ function themeConfig($form) {
$mdrChrome->input->setAttribute('class', 'mini');
$form->addInput($mdrChrome);

$mdrNotice = new Typecho_Widget_Helper_Form_Element_Checkbox(
'mdrNotice',
NULL,
NULL,
_t('<h2 id="mdr-cdn">CDN 设置 <small>CDN</small></h2>')
);
/* MDr CDN 设置 */
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Text('mdrNotice',NULL,NULL,_t('<h2 id="mdr-cdn">CDN 设置 <small>CDN</small></h2>'));
$mdrNotice->input->setAttribute('style', 'display:none');
$form->addInput($mdrNotice);

$mdrMDUICDN = new Typecho_Widget_Helper_Form_Element_Radio(
Expand Down Expand Up @@ -176,7 +175,8 @@ function themeConfig($form) {
$form->addInput($GravatarUrl);

/* MDr Nav 边栏设置 */
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Checkbox('mdrNotice', NULL, NULL, _t('<h2 id="mdr-nav">边栏设置 <small>Nav</small></h2>'));
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Text('mdrNotice', NULL, NULL, _t('<h2 id="mdr-nav">边栏设置 <small>Nav</small></h2>'));
$mdrNotice->input->setAttribute('style', 'display:none');
$form->addInput($mdrNotice);

$mdrNavDefOpen = new Typecho_Widget_Helper_Form_Element_Radio(
Expand Down Expand Up @@ -274,7 +274,8 @@ function themeConfig($form) {
$form->addInput($sidebarBlock->multiMode());

/* MDr Pjax Ajax 设置 */
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Checkbox('mdrNotice', NULL, NULL, _t('<h2 id="mdr-pjax">Ajax 设置 <small>Ajax</small></h2>'));
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Text('mdrNotice', NULL, NULL, _t('<h2 id="mdr-pjax">Ajax 设置 <small>Ajax</small></h2>'));
$mdrNotice->input->setAttribute('style', 'display:none');
$form->addInput($mdrNotice);

$PjaxOption = new Typecho_Widget_Helper_Form_Element_Radio(
Expand Down Expand Up @@ -325,7 +326,8 @@ function themeConfig($form) {
$form->addInput($mdrLoading);

/* MDr Dark 黑暗模式设置 */
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Checkbox('mdrNotice', NULL, NULL, _t('<h2 id="mdr-dark">黑暗模式设置 <small>Dark Mode</small></h2>'), _t('Dev | 该功能还在开发阶段,如遇问题欢迎反馈。'));
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Text('mdrNotice', NULL, NULL, _t('<h2 id="mdr-dark">黑暗模式设置 <small>Dark Mode</small></h2>'));
$mdrNotice->input->setAttribute('style', 'display:none');
$form->addInput($mdrNotice);

$DarkMode = new Typecho_Widget_Helper_Form_Element_Radio(
Expand Down Expand Up @@ -362,7 +364,8 @@ function themeConfig($form) {
$form->addInput($DarkModeDomain);

/* MDr Music 背景音乐设置 */
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Checkbox('mdrNotice', NULL, NULL, _t('<h2 id="mdr-music">背景音乐设置 <small>Music</small></h2>'));
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Text('mdrNotice', NULL, NULL, _t('<h2 id="mdr-music">背景音乐设置 <small>Music</small></h2>'));
$mdrNotice->input->setAttribute('style', 'display:none');
$form->addInput($mdrNotice);

$MusicSet = new Typecho_Widget_Helper_Form_Element_Radio(
Expand Down Expand Up @@ -398,7 +401,8 @@ function themeConfig($form) {
$form->addInput($MusicVol->addRule('isInteger', _t('请填入一个0~1内的数字')));

/* MDr Func 附加功能设置 */
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Checkbox('mdrNotice', NULL, NULL, _t('<h2 id="mdr-func">附加功能设置 <small>Func</small></h2>'));
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Text('mdrNotice', NULL, NULL, _t('<h2 id="mdr-func">附加功能设置 <small>Func</small></h2>'));
$mdrNotice->input->setAttribute('style', 'display:none');
$form->addInput($mdrNotice);

$mdrSnackbar = new Typecho_Widget_Helper_Form_Element_Select(
Expand Down Expand Up @@ -581,7 +585,8 @@ function themeConfig($form) {
$form->addInput($scrollTop);

/* MDr Custom 自定义设置 */
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Checkbox('mdrNotice', NULL, NULL, _t('<h2 id="mdr-custom">自定义内容 <small>Custom</small></h2>'));
$mdrNotice = new Typecho_Widget_Helper_Form_Element_Text('mdrNotice', NULL, NULL, _t('<h2 id="mdr-custom">自定义内容 <small>Custom</small></h2>'));
$mdrNotice->input->setAttribute('style', 'display:none');
$form->addInput($mdrNotice);

$ShowLinks = new Typecho_Widget_Helper_Form_Element_Checkbox(
Expand Down
2 changes: 1 addition & 1 deletion update.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function curl($url){
exit();
}

echo $hash . "\n\n";
echo $hash . "\n";

$hash = explode("\n", $hash);
array_pop($hash);
Expand Down

0 comments on commit 3efda95

Please sign in to comment.