• Resolved drazon

    (@drazon)


    At the bottom of the page there is a <div style="position: static;"> which includes
    div blocks like id="a2apage_overlay" id="a2apage_modal" id="a2apage_full" and others.
    I use the the “Add/Remove Services” button to choose sharing buttons only that I need. I don’t need the rest social buttons. I also don’t use the universal button.

    So how can I remove all this together?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author micropat

    (@micropat)

    The menu/overlay elements are always available for dynamic use cases and certain services such as the Copy Link service.

    While it’s not recommended because it could break the JavaScript now or in the future, there’s nothing stopping developers from removing elements from the DOM in an AddToAny ready event callback function.

    a2a_config.callbacks.push({
        ready: function() {
            console.log('AddToAny is ready!');
        }
    });
    Thread Starter drazon

    (@drazon)

    Thank you for your answer. I followed the link but I couldn’t figure out how to remove the whole parent <div style="position: static;"> Can you provide an example perhaps? Thank you in advance.

    Plugin Author micropat

    (@micropat)

    You would use node.parentNode, but at minimum you will get a JavaScript error when a button is used because the utility iframe has also been unexpectedly removed since you removed the parent. So don’t go the DOM removal route.

    Instead of manipulating the DOM, you can prevent the display of the div and contained elements:

    a2a_config.callbacks.push({
        ready: function() {
            // Prevent the AddToAny elements wrapper from being displayed.
            // Contained AddToAny menus/services won't display.
            var overlay = document.getElementById('a2apage_overlay');
            if (overlay) { overlay.parentNode.style.display = 'none'; }
        }
    });

    Standard share buttons will work, but not the universal button menu nor the Copy Link modal. Other dynamically displayed AddToAny elements won’t be able to display either.

    Thread Starter drazon

    (@drazon)

    This hides the problem but doesn’t fix it. The real problem is that there 110 nofollow links which shouldn’t be there as not all of those services were chosen. Moreover there is a hidden dofollow link to your website which I can’t understand why it is there. This results in a dofollow link to https://www.addtoany.com on any page on our websites that the icons appear.

    I would (and perhaps Google would do as well) consider this as spam. I’m afraid I have to totally uninstall this. Anyway thank you for your assistance

    Plugin Author micropat

    (@micropat)

    What you’re perceiving as a problem isn’t actually a problem for publishers or search engines (hasn’t been for over a decade), and it’s certainly not spam. The menu of accessible & nofollowed share links remains undisplayed (not part of your content) and available for the exact use cases mentioned above.

    Similar to the previous code, publishers can add rel.nofollow to the attribution link in the universal menu if they want to.

    Completely fair to find another solution if your sharing needs are more minimal. Some themes do the basics quite well.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to get rid of that div?’ is closed to new replies.