• Resolved wn nj

    (@waseemnaikgmailcom)


    AMP is giving the following error:

    Error code
    DISALLOWED_TAG
    Invalid markup
    <script … >
    Element attributes
    type text/javascript
    Element name
    script
    Parent element
    body
    Text content

    (function () {
    document.getElementsByClassName(‘close-nav-toggle’)[0].addEventListener(‘focus’, () => {
    document.getElementsByClassName(‘close-nav-toggle’)[0].blur();
    });
    }());

    Sources
    #1 Type: Plugin
    Name: Options for Twenty Twenty (options-for-twenty-twenty)
    Function: options_for_twenty_twenty_class::oftt_fix_focused_toggle()
    Action: wp_footer (priority 10)
    Location: options-for-twenty-twenty.php:2051

    kindly advise

    TIA

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Oliver Campion

    (@domainsupport)

    Hello,

    Throughout the options in this plugin, inline JavaScript is used to move elements of the DOM about and perform other tasks on the client side in order to allow the various features of the plugin to work.

    For example, in order to show a sidebar, the plugin injects the sidebar where it can (where the theme allows) and then JavaScript is used to move the sidebar to where it is required to be.

    In the case above we have plans to move this to be an option but in order to use other features, if AMP is showing inline JavaScript as an “error” then I’m afraid this plugin may not be suitable for you.

    Sorry.

    Oliver

    Thread Starter wn nj

    (@waseemnaikgmailcom)

    thanks for your reply…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Options for Twenty Twenty and AMP’ is closed to new replies.