从gitee代码库中初始化项目。
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 619 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 932 B |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,305 @@
|
||||
(function () {
|
||||
tinymce.create('tinymce.plugins.h2title', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('h2title', {
|
||||
title: '特色标题',
|
||||
image: url + '/images/title.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[h2title]' + ed.selection.getContent() + '[/h2title]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('h2title', tinymce.plugins.h2title)
|
||||
|
||||
tinymce.create('tinymce.plugins.success', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('success', {
|
||||
title: '绿色背景栏',
|
||||
image: url + '/images/success.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[success]' + ed.selection.getContent() + '[/success]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('success', tinymce.plugins.success)
|
||||
|
||||
tinymce.create('tinymce.plugins.info', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('info', {
|
||||
title: '蓝色背景栏',
|
||||
image: url + '/images/info.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[info]' + ed.selection.getContent() + '[/info]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('info', tinymce.plugins.info)
|
||||
|
||||
tinymce.create('tinymce.plugins.warning', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('warning', {
|
||||
title: '黄色背景栏',
|
||||
image: url + '/images/warning.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[warning]' + ed.selection.getContent() + '[/warning]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('warning', tinymce.plugins.warning)
|
||||
|
||||
tinymce.create('tinymce.plugins.danger', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('danger', {
|
||||
title: '红色背景栏',
|
||||
image: url + '/images/danger.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[danger]' + ed.selection.getContent() + '[/danger]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('danger', tinymce.plugins.danger)
|
||||
|
||||
tinymce.create('tinymce.plugins.successbox', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('successbox', {
|
||||
title: '绿色面板',
|
||||
image: url + '/images/successbox.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[successbox title="标题内容"]' + ed.selection.getContent() + '[/successbox]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('successbox', tinymce.plugins.successbox)
|
||||
|
||||
tinymce.create('tinymce.plugins.infoboxs', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('infoboxs', {
|
||||
title: '蓝色面板',
|
||||
image: url + '/images/infobox.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[infobox title="标题内容"]' + ed.selection.getContent() + '[/infobox]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('infoboxs', tinymce.plugins.infoboxs)
|
||||
|
||||
tinymce.create('tinymce.plugins.warningbox', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('warningbox', {
|
||||
title: '黄色面板',
|
||||
image: url + '/images/warningbox.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[warningbox title="标题内容"]' + ed.selection.getContent() + '[/warningbox]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('warningbox', tinymce.plugins.warningbox)
|
||||
|
||||
tinymce.create('tinymce.plugins.dangerbox', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('dangerbox', {
|
||||
title: '红色面板',
|
||||
image: url + '/images/dangerbox.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[dangerbox title="标题内容"]' + ed.selection.getContent() + '[/dangerbox]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('dangerbox', tinymce.plugins.dangerbox)
|
||||
|
||||
tinymce.create('tinymce.plugins.kbd', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('kbd', {
|
||||
title: '键盘文本',
|
||||
image: url + '/images/kbd.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[kbd]' + ed.selection.getContent() + '[/kbd]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('kbd', tinymce.plugins.kbd)
|
||||
|
||||
tinymce.create('tinymce.plugins.mark', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('mark', {
|
||||
title: '内容标记',
|
||||
image: url + '/images/mark.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[mark]' + ed.selection.getContent() + '[/mark]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('mark', tinymce.plugins.mark)
|
||||
|
||||
tinymce.create('tinymce.plugins.striped', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('striped', {
|
||||
title: '进度条',
|
||||
image: url + '/images/striped.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[striped]' + ed.selection.getContent() + '[/striped]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('striped', tinymce.plugins.striped)
|
||||
|
||||
tinymce.create('tinymce.plugins.bdbtn', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('bdbtn', {
|
||||
title: '下载按钮',
|
||||
image: url + '/images/bdbtn.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[bdbtn]' + ed.selection.getContent() + '[/bdbtn]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('bdbtn', tinymce.plugins.bdbtn)
|
||||
|
||||
tinymce.create('tinymce.plugins.reply', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('reply', {
|
||||
title: '回复可见',
|
||||
image: url + '/images/reply.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[reply]' + ed.selection.getContent() + '[/reply]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('reply', tinymce.plugins.reply)
|
||||
|
||||
tinymce.create('tinymce.plugins.accordion', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('accordion', {
|
||||
title: '展开收缩',
|
||||
image: url + '/images/accordion.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[accordion title="标题内容"]' + ed.selection.getContent() + '[/accordion]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('accordion', tinymce.plugins.accordion)
|
||||
|
||||
tinymce.create('tinymce.plugins.music', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('music', {
|
||||
title: '网易云音乐',
|
||||
image: url + '/images/music.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[music]' + ed.selection.getContent() + '[/music]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('music', tinymce.plugins.music)
|
||||
|
||||
tinymce.create('tinymce.plugins.vqq', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('vqq', {
|
||||
title: '腾讯视频',
|
||||
image: url + '/images/vqq.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[vqq]' + ed.selection.getContent() + '[/vqq]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('vqq', tinymce.plugins.vqq)
|
||||
|
||||
tinymce.create('tinymce.plugins.bilibili', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('bilibili', {
|
||||
title: '哔哩哔哩',
|
||||
image: url + '/images/bilibili.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[bilibili]' + ed.selection.getContent() + '[/bilibili]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('bilibili', tinymce.plugins.bilibili)
|
||||
|
||||
tinymce.create('tinymce.plugins.youtube', {
|
||||
init: function (ed, url) {
|
||||
ed.addButton('youtube', {
|
||||
title: 'YouTube',
|
||||
image: url + '/images/youtube.png',
|
||||
onclick: function () {
|
||||
ed.selection.setContent('[youtube]' + ed.selection.getContent() + '[/youtube]')
|
||||
}
|
||||
})
|
||||
},
|
||||
createControl: function (n, cm) {
|
||||
return null
|
||||
},
|
||||
})
|
||||
tinymce.PluginManager.add('youtube', tinymce.plugins.youtube)
|
||||
})();
|
||||
@@ -0,0 +1 @@
|
||||
jQuery(document).ready(function(e){var t=e("#cancel-comment-reply-link"),n=t.text(),o="list";e(document).on("submit","#commentform",function(){return e.ajax({url:ajaxcomment.ajax_url,data:e(this).serialize()+"&action=ajax_comment",type:e(this).attr("method"),beforeSend:function(){layer.msg("评论正在提交中")},error:function(e){layer.msg(e.responseText)},success:function(t){e("textarea").each(function(){this.value=""});var n=addComment,r=n.I("cancel-comment-reply-link"),m=n.I("wp-temp-form-div"),a=n.I(n.respondId),c=(n.I("comment_post_ID").value,n.I("comment_parent").value);"0"!=c?e("#comment-"+c).append('<ul class="children">'+t+"</ul>"):"asc"==ajaxcomment.order?e("."+o).append(t):e("."+o).prepend(t),layer.msg("评论提交成功"),r.style.display="none",r.onclick=null,n.I("comment_parent").value="0",m&&a&&(m.parentNode.insertBefore(a,m),m.parentNode.removeChild(m))}}),!1}),addComment={moveForm:function(o,r,m){var a,c=this,l=c.I(o),p=c.I(m),d=c.I("cancel-comment-reply-link"),i=c.I("comment_parent");c.I("comment_post_ID");t.text(n),c.respondId=m,c.I("wp-temp-form-div")||(a=document.createElement("div"),a.id="wp-temp-form-div",a.style.display="none",p.parentNode.insertBefore(a,p)),l?l.parentNode.insertBefore(p,l.nextSibling):(temp=c.I("wp-temp-form-div"),c.I("comment_parent").value="0",temp.parentNode.insertBefore(p,temp),temp.parentNode.removeChild(temp)),e("body").animate({scrollTop:e("#respond").offset().top-150},400),i.value=r,d.style.display="",d.onclick=function(){var e=addComment,t=e.I("wp-temp-form-div"),n=e.I(e.respondId);return e.I("comment_parent").value="0",t&&n&&(t.parentNode.insertBefore(n,t),t.parentNode.removeChild(t)),this.style.display="none",this.onclick=null,!1};try{c.I("comment").focus()}catch(e){}return!1},I:function(e){return document.getElementById(e)},createButterbar:function(e){layer.msg(e)}}});
|
||||
@@ -0,0 +1,187 @@
|
||||
/*!
|
||||
* Kratos
|
||||
* Seaton Jiang <seaton@vtrois.com>
|
||||
*/
|
||||
; (function () {
|
||||
'use strict'
|
||||
|
||||
var KRATOS_VERSION = '3.1.8'
|
||||
|
||||
var navbarConfig = function () {
|
||||
$('#navbutton').on('click', function () {
|
||||
$('.navbar-toggler').toggleClass('nav-close')
|
||||
})
|
||||
}
|
||||
|
||||
var tooltipConfig = function () {
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
}
|
||||
|
||||
var gotopConfig = function () {
|
||||
$(window).on('load', function () {
|
||||
var $win = $(window)
|
||||
if ($win.scrollTop() > 200) {
|
||||
$('.gotop').addClass('active')
|
||||
} else {
|
||||
$('.gotop').removeClass('active')
|
||||
}
|
||||
$win.scroll(function () {
|
||||
if ($win.scrollTop() > 200) {
|
||||
$('.gotop').addClass('active')
|
||||
} else {
|
||||
$('.gotop').removeClass('active')
|
||||
}
|
||||
})
|
||||
})
|
||||
$('.gotop').on('click', function (event) {
|
||||
event.preventDefault()
|
||||
$('html, body').animate({
|
||||
scrollTop: $('html').offset().top
|
||||
}, 500)
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
var searchConfig = function () {
|
||||
$('.search').on('click', function (e) {
|
||||
$('.search-form').animate({
|
||||
width: '200px'
|
||||
}, 200), $('.search-form input').css('display', 'block')
|
||||
$(document).one('click', function () {
|
||||
$('.search-form').animate({
|
||||
width: '0'
|
||||
}, 100), $('.search-form input').hide()
|
||||
})
|
||||
e.stopPropagation()
|
||||
})
|
||||
$('.search-form').on('click', function (e) {
|
||||
e.stopPropagation()
|
||||
})
|
||||
}
|
||||
|
||||
var wechatConfig = function () {
|
||||
$('.wechat').mouseout(function () {
|
||||
$('.wechat-pic')[0].style.display = 'none'
|
||||
})
|
||||
$('.wechat').mouseover(function () {
|
||||
$('.wechat-pic')[0].style.display = 'block'
|
||||
})
|
||||
}
|
||||
|
||||
var smiliesConfig = function () {
|
||||
$('#addsmile').on("click", function (e) {
|
||||
$('.smile').toggleClass('open')
|
||||
$(document).one("click", function () {
|
||||
$('.smile').toggleClass('open')
|
||||
})
|
||||
e.stopPropagation()
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
var postlikeConfig = function () {
|
||||
$.fn.postLike = function () {
|
||||
if ($(this).hasClass('done')) {
|
||||
layer.msg(kratos.repeat, function () { })
|
||||
return false
|
||||
} else {
|
||||
$(this).addClass('done')
|
||||
layer.msg(kratos.thanks)
|
||||
var id = $(this).data("id"),
|
||||
action = $(this).data('action')
|
||||
var ajax_data = {
|
||||
action: "love",
|
||||
um_id: id,
|
||||
um_action: action
|
||||
}
|
||||
$.post(kratos.site + '/wp-admin/admin-ajax.php', ajax_data, function (data) { })
|
||||
return false
|
||||
}
|
||||
}
|
||||
$(document).on("click", ".btn-thumbs", function () {
|
||||
$(this).postLike()
|
||||
})
|
||||
}
|
||||
|
||||
var donateConfig = function () {
|
||||
$("#donate").on('click', function () {
|
||||
layer.open({
|
||||
type: 1,
|
||||
area: ['300px', '370px'],
|
||||
title: kratos.donate,
|
||||
resize: false,
|
||||
scrollbar: false,
|
||||
content: '<div class="donate-box"><div class="meta-pay text-center my-2"><strong>' + kratos.scan + '</strong></div><div class="qr-pay text-center"><img class="pay-img" id="alipay_qr" src="' + kratos.alipay + '"><img class="pay-img d-none" id="wechat_qr" src="' + kratos.wechat + '"></div><div class="choose-pay text-center mt-2"><input id="alipay" type="radio" name="pay-method" checked><label for="alipay" class="pay-button"><img src="' + kratos.directory + '/assets/img/payment/alipay.png"></label><input id="wechatpay" type="radio" name="pay-method"><label for="wechatpay" class="pay-button"><img src="' + kratos.directory + '/assets/img/payment/wechat.png"></label></div></div>'
|
||||
})
|
||||
$(".choose-pay input[type='radio']").click(function () {
|
||||
var id = $(this).attr("id")
|
||||
if (id == 'alipay') { $(".qr-pay #alipay_qr").removeClass('d-none'); $(".qr-pay #wechat_qr").addClass('d-none') };
|
||||
if (id == 'wechatpay') { $(".qr-pay #alipay_qr").addClass('d-none'); $(".qr-pay #wechat_qr").removeClass('d-none') };
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
var accordionConfig = function () {
|
||||
$(document).on('click', '.acheader', function (event) {
|
||||
var $this = $(this)
|
||||
$this.closest('.accordion').find('.contents').slideToggle(300)
|
||||
if ($this.closest('.accordion').hasClass('active')) {
|
||||
$this.closest('.accordion').removeClass('active')
|
||||
} else {
|
||||
$this.closest('.accordion').addClass('active')
|
||||
}
|
||||
event.preventDefault()
|
||||
})
|
||||
}
|
||||
|
||||
var consoleConfig = function () {
|
||||
console.log('\n Kratos v' + KRATOS_VERSION + '\n\n https://github.com/vtrois/kratos \n\n')
|
||||
}
|
||||
|
||||
$(function () {
|
||||
accordionConfig()
|
||||
navbarConfig()
|
||||
tooltipConfig()
|
||||
gotopConfig()
|
||||
searchConfig()
|
||||
wechatConfig()
|
||||
smiliesConfig()
|
||||
postlikeConfig()
|
||||
donateConfig()
|
||||
consoleConfig()
|
||||
})
|
||||
}())
|
||||
|
||||
function grin (tag) {
|
||||
var myField
|
||||
tag = ' ' + tag + ' '
|
||||
if (document.getElementById('comment') && document.getElementById('comment').type == 'textarea') {
|
||||
myField = document.getElementById('comment')
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
if (document.selection) {
|
||||
myField.focus()
|
||||
sel = document.selection.createRange()
|
||||
sel.text = tag
|
||||
myField.focus()
|
||||
}
|
||||
else if (myField.selectionStart || myField.selectionStart == '0') {
|
||||
var startPos = myField.selectionStart
|
||||
var endPos = myField.selectionEnd
|
||||
var cursorPos = endPos
|
||||
myField.value = myField.value.substring(0, startPos)
|
||||
+ tag
|
||||
+ myField.value.substring(endPos, myField.value.length)
|
||||
cursorPos += tag.length
|
||||
myField.focus()
|
||||
myField.selectionStart = cursorPos
|
||||
myField.selectionEnd = cursorPos
|
||||
}
|
||||
else {
|
||||
myField.value += tag
|
||||
myField.focus()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
function grin (t) { var o; if (t = " " + t + " ", !document.getElementById("comment") || "textarea" != document.getElementById("comment").type) return !1; if (o = document.getElementById("comment"), document.selection) o.focus(), sel = document.selection.createRange(), sel.text = t, o.focus(); else if (o.selectionStart || "0" == o.selectionStart) { var e = o.selectionStart, a = o.selectionEnd, n = a; o.value = o.value.substring(0, e) + t + o.value.substring(a, o.value.length), n += t.length, o.focus(), o.selectionStart = n, o.selectionEnd = n } else o.value += t, o.focus() } (function () { "use strict"; var t = "3.1.7", o = function () { $("#navbutton").on("click", function () { $(".navbar-toggler").toggleClass("nav-close") }) }, e = function () { $(function () { $('[data-toggle="tooltip"]').tooltip() }) }, a = function () { $(window).on("load", function () { var t = $(window); t.scrollTop() > 200 ? $(".gotop").addClass("active") : $(".gotop").removeClass("active"), t.scroll(function () { t.scrollTop() > 200 ? $(".gotop").addClass("active") : $(".gotop").removeClass("active") }) }), $(".gotop").on("click", function (t) { return t.preventDefault(), $("html, body").animate({ scrollTop: $("html").offset().top }, 500), !1 }) }, n = function () { $(".search").on("click", function (t) { $(".search-form").animate({ width: "200px" }, 200), $(".search-form input").css("display", "block"), $(document).one("click", function () { $(".search-form").animate({ width: "0" }, 100), $(".search-form input").hide() }), t.stopPropagation() }), $(".search-form").on("click", function (t) { t.stopPropagation() }) }, c = function () { $(".wechat").mouseout(function () { $(".wechat-pic")[0].style.display = "none" }), $(".wechat").mouseover(function () { $(".wechat-pic")[0].style.display = "block" }) }, s = function () { $("#addsmile").on("click", function (t) { return $(".smile").toggleClass("open"), $(document).one("click", function () { $(".smile").toggleClass("open") }), t.stopPropagation(), !1 }) }, i = function () { $.fn.postLike = function () { if ($(this).hasClass("done")) return layer.msg(kratos.repeat, function () { }), !1; $(this).addClass("done"), layer.msg(kratos.thanks); var t = $(this).data("id"), o = $(this).data("action"), e = { action: "love", um_id: t, um_action: o }; return $.post(kratos.site + "/wp-admin/admin-ajax.php", e, function (t) { }), !1 }, $(document).on("click", ".btn-thumbs", function () { $(this).postLike() }) }, l = function () { $("#donate").on("click", function () { layer.open({ type: 1, area: ["300px", "370px"], title: kratos.donate, resize: !1, scrollbar: !1, content: '<div class="donate-box"><div class="meta-pay text-center my-2"><strong>' + kratos.scan + '</strong></div><div class="qr-pay text-center"><img class="pay-img" id="alipay_qr" src="' + kratos.alipay + '"><img class="pay-img d-none" id="wechat_qr" src="' + kratos.wechat + '"></div><div class="choose-pay text-center mt-2"><input id="alipay" type="radio" name="pay-method" checked><label for="alipay" class="pay-button"><img src="' + kratos.directory + '/assets/img/payment/alipay.png"></label><input id="wechatpay" type="radio" name="pay-method"><label for="wechatpay" class="pay-button"><img src="' + kratos.directory + '/assets/img/payment/wechat.png"></label></div></div>' }), $(".choose-pay input[type='radio']").click(function () { var t = $(this).attr("id"); "alipay" == t && ($(".qr-pay #alipay_qr").removeClass("d-none"), $(".qr-pay #wechat_qr").addClass("d-none")), "wechatpay" == t && ($(".qr-pay #alipay_qr").addClass("d-none"), $(".qr-pay #wechat_qr").removeClass("d-none")) }) }) }, r = function () { $(document).on("click", ".acheader", function (t) { var o = $(this); o.closest(".accordion").find(".contents").slideToggle(300), o.closest(".accordion").hasClass("active") ? o.closest(".accordion").removeClass("active") : o.closest(".accordion").addClass("active"), t.preventDefault() }) }, d = function () { console.log("\n Kratos v" + t + "\n\n https://github.com/vtrois/kratos \n\n") }; $(function () { r(), o(), e(), a(), n(), c(), s(), i(), l(), d() }) })()
|
||||
@@ -0,0 +1 @@
|
||||
jQuery(document).ready(function($){$(document).on("click","button[class*='upload_']",function(e){e.preventDefault();var $button=$(this);if(file_frame){file_frame.open();return}var file_frame=wp.media.frames.file_frame=wp.media({library:{type:'image'},multiple:false});file_frame.on('select',function(){var attachment=file_frame.state().get('selection').first().toJSON();$button.siblings('input').val(attachment.url).change();});file_frame.open()})});
|
||||