strange code on website header when admin logged in
-
code I can see in the header:
var element = document.createElement(“script”); element.appendChild( document.createTextNode( “var wc_add_to_cart_params = {\”ajax_url\”:\”\\/wp-admin\\/admin-ajax.php\”,\”ajax_loader_url\”:\”\\/\\/www.beanofatree.com.au\\/wp-content\\/plugins\\/woocommerce\\/assets\\/images\\/[email protected]\”,\”i18n_view_cart\”:\”View Cart\”,\”cart_url\”:\”http:\\/\\/www.beanofatree.com.au\\/cart\\/\”,\”is_cart\”:\”\”,\”cart_redirect_after_add\”:\”no\”};” ) );document.body.appendChild(element); var element = document.createElement(“script”); element.appendChild( document.createTextNode( “var woocommerce_params = {\”ajax_url\”:\”\\/wp-admin\\/admin-ajax.php\”,\”ajax_loader_url\”:\”\\/\\/www.beanofatree.com.au\\/wp-content\\/plugins\\/woocommerce\\/assets\\/images\\/[email protected]\”};” ) );document.body.appendChild(element); var element = document.createElement(“script”); element.appendChild( document.createTextNode( “var wc_cart_fragments_params = {\”ajax_url\”:\”\\/wp-admin\\/admin-ajax.php\”,\”fragment_name\”:\”wc_fragments\”};” ) );document.body.appendChild(element); var element = document.createElement(“script”); element.appendChild( document.createTextNode( “var ajaxURL = {\”ajaxurl\”:\”http:\\/\\/www.beanofatree.com.au\\/wp-admin\\/admin-ajax.php\”};” ) );document.body.appendChild(element); var elementjquery = document.createElement(“script”);function helperjquery(){ var elementwc_add_to_cart = document.createElement(“script”); elementwc_add_to_cart.src = “//www.beanofatree.com.au/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js?ver=2.2.4”; document.body.appendChild(elementwc_add_to_cart); var elementjquery_blockui = document.createElement(“script”); elementjquery_blockui.src = “//www.beanofatree.com.au/wp-content/plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.min.js?ver=2.60”; document.body.appendChild(elementjquery_blockui); var elementjquery_cookie = document.createElement(“script”); elementjquery_cookie.src = “//www.beanofatree.com.au/wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js?ver=1.3.1”; document.body.appendChild(elementjquery_cookie); var elementflatsome_theme_js_minified = document.createElement(“script”); elementflatsome_theme_js_minified.src = “https://www.beanofatree.com.au/wp-content/themes/flatsome/js/flatsome.min.js?v=2.0&ver=2.1.1”; document.body.appendChild(elementflatsome_theme_js_minified); } elementjquery.onreadystatechange = function () { if (this.readyState == ‘complete’) helperjquery(); } elementjquery.onload = helperjquery;elementjquery.src = “https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js?ver=2.1.1”; document.body.appendChild(elementjquery); var elementadmin_bar = document.createElement(“script”); elementadmin_bar.src = “https://www.beanofatree.com.au/wp-includes/js/admin-bar.min.js?ver=4.0”; document.body.appendChild(elementadmin_bar); }// Check for browser support of event handling capability if (window.addEventListener) window.addEventListener(“load”, downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent(“onload”, downloadJSAtOnload); else window.onload = downloadJSAtOnload;
- The topic ‘strange code on website header when admin logged in’ is closed to new replies.