特别是在Chrome上,我遇到了一个脚本问题,该脚本会将数据插入位于页面中间的字段中。这可以防止用户阅读页面顶部。
我想停用它。
直接链接: http://h2005.fr/mise-en-conformite-integrale/#gf_6
log(e.checkout_action),"failure"==b.message.result&&(a("html, body").animate({scrollTop:a(d).offset().top-100},500),a(".mfp-wrap").animate({scrollTop:0},500)),void("reveal"==e.checkout_action&&(c.removeClass("loading").prop("disabled",!1),a(".qc-loading").hide().remove(),d.slideDown(),a("html, body").animate({scrollTop:d.offset().top-35},500))))},resizedCallback:function(b){a(".mfp-preloader").hide()}})},qc_get_object:function(a){return e=a.data(),c.parents("form").data("product_variations")&&(e.product_variations=c.parents("form").data("product_variations")),e.id&&(e.product_id=e.id,delete e.id),c.data("quantity")>1?e.quantity=c.data("quantity"):c.hasClass("single_add_to_cart_button")&&(e.quantity=c.parents("form").find("input.qty").val()),(c.hasClass("quick-checkout-link")||c.hasClass("quick-checkout-now"))&&(e.checkout_action="lightbox",e.clear_cart=!1,e.checkout_now=!0,e.product_id=0),e},qc_open_modal:function(){a.magnificPopup.open({items:{src:d,type:"inline"},callbacks:{open:function(){a(".mfp-preloader").show(),a(".quick-checkout-active-loading").removeClass("quick-checkout-active-loading"),a(document.body).on("checkout_error",function(){a(".mfp-wrap").animate({scrollTop:0},1e3)})},close:function(){a("#quick-checkout-modal").remove()}}})},add_single_product_variation:function(b){var d=b.find("input[name=variation_id]").val(),f=b.find("input[name=product_id]").val(),g=b.find("input[name=quantity]").val();a(".ajaxerrors").remove();var h={},j=!0,k=b.find("select[name^=attribute]");if(k.length||(k=b.find("[name^=attribute]:checked")),k.length||(k=b.find("input[name^=attribute]")),k.each(function(){var b,c,d=a(this),e=d.attr("name"),f=d.val();d.removeClass("error"),0===f.length?(b=e.lastIndexOf("_"),c=e.substring(b+1),d.addClass("required error").before('<div class="ajaxerrors"><p>Please select '+c+"</p></div>"),j=!1):h[e]=f}),!j)return!1;var l={action:"wqc_add_to_cart",product_id:f,quantity:g,variation_id:d,variation:h,clear_cart:e.clear_cart};return a("body").trigger("adding_to_cart",[c,l]),i.qc_ajax(l),!1},shop_checkout_now:function(){if("1"==quick_checkout.woocommerce_is_cart)return!1;if(!i.is_shop_checkout_now_enabled())return!1;var b=a(".products").find(".add_to_cart_button");b.on("click touchend",b,i.checkout_now)},checkout_now:function(){var b=a(this),c=a(this).data("product_sku"),d=a(this).data("product_id"),e=quick_checkout.shop_cart_reveal_text;quick_checkout.shortcode_shop_cart_reveal_text&&(e=quick_checkout.shortcode_shop_cart_reveal_text),a("body").on("added_to_cart",function(f){0==a(b).closest(".product").find(".quick-checkout-now").length&&a(b).after('<a href="#" class="quick-checkout-now quick-checkout-button-shop wc-forward" data-product_id="'+d+'" data-product_sku="'+c+'">'+e+"</a>")})},is_shop_checkout_now_enabled:function(){return"yes"==quick_checkout.shop_cart_reveal&&"1"==quick_checkout.woocommerce_is_shop&&"yes"==quick_checkout.shop_on?!0:"yes"==quick_checkout.shortcode_shop_cart_reveal&&"1"!==quick_checkout.woocommerce_is_shop?!0:!1},hide_all_except_checkout:function(){var b=a("body.quick-checkout-frame"),c=a(b).find(".woocommerce");c.prependTo(b),c.siblings().hide(),c.parents().siblings().hide(),b.show(),c.show()},window_load:function(){a(".quick-checkout-button-image-overlay").each(function(b,c){i.center_div(a(c),0,0)}),i.shop_checkout_now(),a(".quick-checkout-product_quick_checkout").each(function(){var b=a(this).find(".add_to_cart_button");b.on("click touchend",b,i.checkout_now)})},center_div:function(b,c,d){var e=b.closest(".product").find(".wp-post-image");0===e.length&&(e=b.closest(".product").find("img"));var f=parseInt(e.outerWidth())/2-parseInt(b.outerWidth())/2-c,g=parseInt(e.outerHeight())/2-parseInt(b.outerHeight())/2-d;if(b.hasClass("quick-checkout-button-overlay-single")){e=b.closest(".images").find(".wp-post-image");var h,i="",j="";e.each(function(){i?this.width>i&&(h=a(this),i=this.width,j=this.height):(h=a(this),i=this.width,j=this.height)}),f=parseInt(i)/2-parseInt(b.outerWidth())/2-c,g=parseInt(j)/2-parseInt(b.outerHeight())/2-d}b.css({top:g,left:f}).addClass("qc-buy-now-centered")},login_form_submitted:function(a){h[0].hasAttribute("action")&&""!=h.attr("action")||(a.preventDefault(),h.attr("action",quick_checkout.checkout_url),h.submit())}};jQuery.fn.serializeObject=function(){var a={},b=this.serializeArray();return jQuery.each(b,function(){void 0!==a[this.name]?(a[this.name].push||(a[this.name]=[a[this.name]]),a[this.name].push(this.value||"")):a[this.name]=this.value||""}),a},a(function(){i.init()})}(jQuery);