Changeset 2253009
- Timestamp:
- 03/02/2020 02:30:10 PM (6 years ago)
- Location:
- snatchbot-webchat/trunk
- Files:
-
- 5 edited
-
admin/admin.php (modified) (1 diff)
-
assets/js/embedCode.js (modified) (1 diff)
-
assets/js/embedCode.min.js (modified) (1 diff)
-
client/client.php (modified) (1 diff)
-
includes/sbw-utility-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
snatchbot-webchat/trunk/admin/admin.php
r2218956 r2253009 95 95 "wp_user_id" => (int) $wp_user_id, 96 96 )); 97 $user = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $table WHERE wp_user_id = %d", $wp_user_id) ); 97 98 } 98 99 $wp_esc_user = sbw_esc_checking_db($user[0]); -
snatchbot-webchat/trunk/assets/js/embedCode.js
r2218956 r2253009 1 1 (function($) { 2 const head = $("head")3 2 if (typeof snatchBot !== 'undefined') { 4 head.append('<script>window.sntchChat.Init('+ snatchBot.botID +')</script>') 3 const footer = $("footer") 4 const head = $("head") 5 if(footer) { 6 footer.append('<script>window.sntchChat.Init('+ snatchBot.botID +')</script>') 7 } else { 8 head.append('<script>window.sntchChat.Init('+ snatchBot.botID +')</script>') 9 } 5 10 } else { 6 11 console.log("ERROR: doesn't given SnatchBot ID") -
snatchbot-webchat/trunk/assets/js/embedCode.min.js
r2218956 r2253009 1 !function(t){ const n=jQuery("head");"undefined"!=typeof snatchBot?n.append("<script>window.sntchChat.Init("+snatchBot.botID+")<\/script>"):console.log("ERROR: doesn't given SnatchBot ID")}();1 !function(t){if("undefined"!=typeof snatchBot){const n=t("footer"),o=t("head");n?n.append("<script>window.sntchChat.Init("+snatchBot.botID+")<\/script>"):o.append("<script>window.sntchChat.Init("+snatchBot.botID+")<\/script>")}else console.log("ERROR: doesn't given SnatchBot ID")}(jQuery); -
snatchbot-webchat/trunk/client/client.php
r2218956 r2253009 49 49 50 50 if (!empty($bot_id)) { 51 wp_register_script('EmbedCode', 'https://account.snatchbot.me/script.js' );52 wp_enqueue_script('SnatchEmbedCodeDeploy', $assetsPath['files']['embedCodeJS'], array('EmbedCode'), false, true );51 wp_register_script('EmbedCode', 'https://account.snatchbot.me/script.js', '', '', false ); 52 wp_enqueue_script('SnatchEmbedCodeDeploy', $assetsPath['files']['embedCodeJS'], array('EmbedCode'), '', true ); 53 53 wp_localize_script( 'SnatchEmbedCodeDeploy' , 'snatchBot', 54 54 array('botID' => $bot_id) -
snatchbot-webchat/trunk/includes/sbw-utility-functions.php
r2218956 r2253009 87 87 'images' => array( 88 88 'favicons' => plugins_url( 'assets/img/favicons.png', dirname(__FILE__) ), 89 'preloader' => plugins_url( "assets/img/preloader.gif", dirname(__FILE__) ),90 'logo' => plugins_url( "assets/img/logo.png", dirname(__FILE__) ),89 'preloader' => plugins_url( 'assets/img/preloader.gif', dirname(__FILE__) ), 90 'logo' => plugins_url( 'assets/img/logo.png', dirname(__FILE__) ), 91 91 ), 92 92 'files' => array(
Note: See TracChangeset
for help on using the changeset viewer.