• Resolved Jeff Starr

    (@specialk)


    I am noticing this added inline on all pages:

    <style>.edd-js .edd-no-js, .no-js .edd-has-js { display: none; }</style>
    <script>/* <![CDATA[ */(function(){var c = document.body.classList;c.remove('no-js');c.add('edd-js');})();/* ]]> */</script>

    Inline scripts and styles can impact page optimization.

    How to remove on non-store pages?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chris Klosowski

    (@cklosows)

    Hi @specialk

    This is a temporary backwards compatibility change that we had to add inline in order for it to work in the most situations.

    It is added via this action:
    add_action( 'wp_footer', 'edd_back_compat_add_js_class' );

    You should be able to remove that action and not have that backwards compat JS/CSS output. Especially if you are running a custom theme and aren’t relying on the old no JS compatibility layers.

    Thread Starter Jeff Starr

    (@specialk)

    Thanks @cklosows.

    Are the “old no JS compatibility layers” present in latest EDD?

    I mean, if the site is using only the latest EDD assets (CSS/JS) and nothing custom anywhere, then edd_back_compat_add_js_class is not required for anything, correct?

    Plugin Author Chris Klosowski

    (@cklosows)

    @specialk We’ll be releasing a new version of EDD 3.1.0.2 soon, and it still loads these back compat layers, but that is to mitigate some themes adding a body class that we didn’t anticipate being as popular as it is.

    Thread Starter Jeff Starr

    (@specialk)

    Ok thanks for the information.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘How to remove edd-js inline script & style’ is closed to new replies.