mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-03 02:48:45 +08:00
Added new service classes: Maintenance, Acceleration, Adblock, Avatar, Database, Fonts, Performance, and related templates and assets. Updated Service/Base.php to conditionally instantiate service classes only if they exist. Improved Service/Memory.php and Service/Monitor.php with better settings handling and update logic. Enhanced Service/Setting.php to simplify framework title usage. These changes modularize features and improve plugin extensibility and reliability.
33 lines
1.2 KiB
JavaScript
Executable file
33 lines
1.2 KiB
JavaScript
Executable file
jQuery(document).ready(function($) {
|
|
$("#test-rss-feed").click(function() {
|
|
var button = $(this);
|
|
var result = $("#rss-test-result");
|
|
var feedUrl = $("#custom_rss_url").val();
|
|
|
|
if (!feedUrl) {
|
|
result.html('<span style="color: red;">请先填写 RSS 源地址</span>');
|
|
return;
|
|
}
|
|
|
|
button.prop("disabled", true);
|
|
result.html("测试中...");
|
|
|
|
$.post(ajaxurl, {
|
|
action: "test_rss_feed",
|
|
_ajax_nonce: '<?php echo wp_create_nonce("wp_china_yes_nonce"); ?>',
|
|
feed_url: feedUrl
|
|
})
|
|
.done(function(response) {
|
|
result.html(response.success ?
|
|
'<span style="color: green;">' + response.data + '</span>' :
|
|
'<span style="color: red;">' + response.data + '</span>'
|
|
);
|
|
})
|
|
.fail(function() {
|
|
result.html('<span style="color: red;">测试失败</span>');
|
|
})
|
|
.always(function() {
|
|
button.prop("disabled", false);
|
|
});
|
|
});
|
|
});
|