| 1 |
jQuery(document).ready(function($) { |
| 2 |
|
| 3 |
/********************************** |
| 4 |
Disable pro feature |
| 5 |
*********************************/ |
| 6 |
// Minimum Time (In Seconds) |
| 7 |
$("#comment_show_voice_message_enable").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 8 |
$("#comment_show_voice_message_enable").attr("disabled",true); |
| 9 |
|
| 10 |
$("#comment_show_voice_message_enable_for_woocommerce").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 11 |
$("#comment_show_voice_message_enable_for_woocommerce").attr("disabled",true); |
| 12 |
|
| 13 |
$("#comment_time_minimum").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 14 |
$("#comment_time_minimum").attr("disabled",true); |
| 15 |
// Custom Message for Quick comments |
| 16 |
$("#comment_quick_mgs").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 17 |
$("#comment_quick_mgs").attr("disabled",true); |
| 18 |
// Minimum Length of Character in Comments |
| 19 |
$("#comment_minimum_length").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 20 |
$("#comment_minimum_length").attr("disabled",true); |
| 21 |
// Alert Message for Minimum Comments Length |
| 22 |
$("#comment_minimum_length_mgs").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 23 |
$("#comment_minimum_length_mgs").attr("disabled",true); |
| 24 |
// Maximum of Character in Comments |
| 25 |
$("#comment_maximum_length").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 26 |
$("#comment_maximum_length").attr("disabled",true); |
| 27 |
// Alert Message for Maximum Comments Length |
| 28 |
$("#comment_maximum_length_mgs").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 29 |
$("#comment_maximum_length_mgs").attr("disabled",true); |
| 30 |
|
| 31 |
|
| 32 |
// Notify a user when their comment is approved |
| 33 |
$("#comment_notify_user_comment_approved").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 34 |
$("#comment_notify_user_comment_approved").attr("disabled",true); |
| 35 |
// Notify Subject |
| 36 |
$("#notify_user_comment_subject").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 37 |
$("#notify_user_comment_subject").attr("disabled",true); |
| 38 |
// Notify Message |
| 39 |
$("#notify_user_comment_messsage").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 40 |
$("#notify_user_comment_messsage").attr("disabled",true); |
| 41 |
|
| 42 |
|
| 43 |
// Set “follow” or “nofollow” to Comments Link |
| 44 |
$("#comment_link_follows").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 45 |
$("#comment_link_follows").attr("disabled",true); |
| 46 |
// Add “noreferrer” to “rel” attribute if Comments Link Open in New Tab |
| 47 |
$("#comment_link_noreffer").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 48 |
$("#comment_link_noreffer").attr("disabled",true); |
| 49 |
// Add “noopener” to “rel” attribute if Comments Link Open in New Tab |
| 50 |
$("#comment_link_noopener").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 51 |
$("#comment_link_noopener").attr("disabled",true); |
| 52 |
|
| 53 |
|
| 54 |
// #ce0707irect Page after Comments |
| 55 |
$("#comment_redirect").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 56 |
$("#comment_redirect").attr("disabled",true); |
| 57 |
// Enable Comments Read More option |
| 58 |
$("#comment_readmore").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 59 |
$("#comment_readmore").attr("disabled",true); |
| 60 |
// Show Read More after (in Words) |
| 61 |
$("#comment_readmore_length").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 62 |
$("#comment_readmore_length").attr("disabled",true); |
| 63 |
// Links in the admin comments section to email individual commenters |
| 64 |
$("#comment_admin_section_email_individual_comenters").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 65 |
$("#comment_admin_section_email_individual_comenters").attr("disabled",true); |
| 66 |
// Enable a button in the WP toolbar to email all the commenters on a post |
| 67 |
$("#comment_button_wp_toolbar_email_commenters_post").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 68 |
$("#comment_button_wp_toolbar_email_commenters_post").attr("disabled",true); |
| 69 |
// Adds a sidebar widget to show the top commentators in your WP site |
| 70 |
$("#comment_add_sidebar_widget_show_top_commentators").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 71 |
$("#comment_add_sidebar_widget_show_top_commentators").attr("disabled",true); |
| 72 |
// Show All Comments |
| 73 |
$("#comment_show_all_comments").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 74 |
$("#comment_show_all_comments").attr("disabled",true); |
| 75 |
// Vertical scroll in recent comments widget |
| 76 |
$("#comment_vertical_scroll_recent_widget_comments").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 77 |
$("#comment_vertical_scroll_recent_widget_comments").attr("disabled",true); |
| 78 |
|
| 79 |
|
| 80 |
$("#include_urls").attr("disabled",true); |
| 81 |
$(".qc_clr_btn_disabled").attr("disabled",true); |
| 82 |
|
| 83 |
// Enable Like/Dislike |
| 84 |
$("#like_dislike").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 85 |
$("#like_dislike").attr("disabled",true); |
| 86 |
// Show Emotions in Comment |
| 87 |
$("#enable_emotions").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 88 |
$("#enable_emotions").attr("disabled",true); |
| 89 |
// Allow Comments Filtering by Sentiment (Fontend) |
| 90 |
$("#enable_comment_filter").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 91 |
$("#enable_comment_filter").attr("disabled",true); |
| 92 |
// Allow Comments Threshold by Negative Score |
| 93 |
$("#enable_comment_threshold").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 94 |
$("#enable_comment_threshold").attr("disabled",true); |
| 95 |
// Threshold by Negative Score (EX: 0.5) |
| 96 |
$("#treshold_score").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 97 |
$("#treshold_score").attr("disabled",true); |
| 98 |
|
| 99 |
// Threshold Message |
| 100 |
$("#treshold_msg").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 101 |
$("#treshold_msg").attr("disabled",true); |
| 102 |
|
| 103 |
// qc_clr_email_subscription_enalbe_disable |
| 104 |
$("#qc_clr_email_subscription_enalbe_disable").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 105 |
$("#qc_clr_email_subscription_enalbe_disable").attr("disabled",true); |
| 106 |
// qc_clr_email_subscription_lang_text |
| 107 |
$("#qc_clr_email_subscription_lang_text").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 108 |
$("#qc_clr_email_subscription_lang_text").attr("disabled",true); |
| 109 |
// qc_clr_email_subscription_mailchamp_enalbe_disable |
| 110 |
$("#qc_clr_email_subscription_mailchamp_enalbe_disable").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 111 |
$("#qc_clr_email_subscription_mailchamp_enalbe_disable").attr("disabled",true); |
| 112 |
// qc_clr_email_subscription_zapier_enalbe_disable |
| 113 |
$("#qc_clr_email_subscription_zapier_enalbe_disable").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 114 |
$("#qc_clr_email_subscription_zapier_enalbe_disable").attr("disabled",true); |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
// comment_button_delete_commenters_comment |
| 119 |
$("#comment_button_delete_commenters_comment").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 120 |
$("#comment_button_delete_commenters_comment").attr("disabled",true); |
| 121 |
// comment_exclude_text_comments |
| 122 |
$("#comment_exclude_text_comments").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 123 |
$("#comment_exclude_text_comments").attr("disabled",true); |
| 124 |
// comment_exclude_action |
| 125 |
$("#comment_exclude_action").after('<strong class="qc-pro-alert">Pro Feature</strong>'); |
| 126 |
$("#comment_exclude_action").attr("disabled",true); |
| 127 |
|
| 128 |
|
| 129 |
$(".commentDelete").on("click", function(e){ |
| 130 |
var result = false; |
| 131 |
result = confirm("Do you really want to delete? This action is irreversible."); |
| 132 |
return result; |
| 133 |
}); |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
$('.clr_warapper_content').hide(); |
| 138 |
|
| 139 |
$(document).on('click', '.clr_pro_feature_taggle', function(e){ |
| 140 |
if($(this).hasClass('clr_feature_show')){ |
| 141 |
$( '.clr_warapper_content' ).fadeOut(); |
| 142 |
$('.clr_pro_feature_taggle span').text('Show'); |
| 143 |
$(this).removeClass('clr_feature_show'); |
| 144 |
}else{ |
| 145 |
$( '.clr_warapper_content' ).fadeIn(); |
| 146 |
$('.clr_pro_feature_taggle span').text('Hide'); |
| 147 |
$(this).addClass('clr_feature_show'); |
| 148 |
|
| 149 |
} |
| 150 |
}); |
| 151 |
|
| 152 |
|
| 153 |
var storedNoticeId = localStorage.getItem('qcld_clr_Notice_set'); |
| 154 |
var qcld_clr_Notice_time_set = localStorage.getItem('qcld_clr_Notice_time_set'); |
| 155 |
|
| 156 |
var notice_current_time = Math.round(new Date().getTime() / 1000); |
| 157 |
|
| 158 |
if ('message-clr' == storedNoticeId && qcld_clr_Notice_time_set > notice_current_time ) { |
| 159 |
$('#message-clr').css({'display': 'none'}); |
| 160 |
} |
| 161 |
|
| 162 |
$(document).on('click', '.notice-dismiss', function(e){ |
| 163 |
|
| 164 |
var currentDom = $(this); |
| 165 |
var currentWrap = currentDom.closest('.notice'); |
| 166 |
currentWrap.css({'display': 'none'}); |
| 167 |
localStorage.setItem('qcld_clr_Notice_set', 'message-clr'); |
| 168 |
|
| 169 |
var ts = Math.round(new Date().getTime() / 1000); |
| 170 |
var tsYesterday = ts + (72 * 3600); |
| 171 |
localStorage.setItem('qcld_clr_Notice_time_set', tsYesterday); |
| 172 |
|
| 173 |
}); |
| 174 |
|
| 175 |
|
| 176 |
}); |