Search

An Expansive Social Media Tool

0 views

Social media optimization is a big right now. There are a lot of sites that want to be featured on Digg, Del.icio.us, Facebook or one of the many other social networks.

However, getting there isn’t always that easy. The first steps though is ensuring you have social media links on your blog to make sharing that content easy. My favorite tool of the moment for this is ' /></a>                </div>
                
                <script>
                (function() {
                    function initCopyableSections() {
                        document.querySelectorAll('.article-content .copyable-section').forEach(function(section) {
                            if (section.querySelector('.copyable-section__btn')) return;
                            var btn = document.createElement('button');
                            btn.type = 'button';
                            btn.className = 'copyable-section__btn';
                            btn.setAttribute('aria-label', 'Copy to clipboard');
                            var label = section.getAttribute('data-copy-label');
                            btn.textContent = label ? 'Copy ' + label : 'Copy';
                            section.appendChild(btn);
                            btn.addEventListener('click', function() {
                                var contentEl = section.querySelector('.copyable-section__content');
                                var text;
                                if (contentEl) {
                                    text = contentEl.textContent.trim();
                                } else {
                                    var clone = section.cloneNode(true);
                                    var btnClone = clone.querySelector('.copyable-section__btn');
                                    if (btnClone) btnClone.parentNode.removeChild(btnClone);
                                    text = clone.textContent.trim();
                                }
                                if (!text) return;
                                navigator.clipboard.writeText(text).then(function() {
                                    var t = btn.textContent;
                                    btn.textContent = 'Copied!';
                                    btn.classList.add('copied');
                                    setTimeout(function() {
                                        btn.textContent = t;
                                        btn.classList.remove('copied');
                                    }, 2000);
                                });
                            });
                        });
                    }
                    if (document.readyState === 'loading') {
                        document.addEventListener('DOMContentLoaded', initCopyableSections);
                    } else {
                        initCopyableSections();
                    }
                })();
                </script>
                
                <!-- Tags -->
                                
                <!-- Correction Form -->
                <div class=

Found an error or have a suggestion? Let us know and we'll review it.

Share this article

Comments (0)

Please sign in to leave a comment.

No comments yet. Be the first to comment!