-
Small update to share the link from the timeline feed. The code for the Studio->Designer->Injections:
<script language="javascript">
function share_link_timeline(sContentId)
{
var dummy = document.createElement('input');
dummy.value = $('#bx-timeline-item-timeline-feed-' + sContentId + ' a.bx-tl-item-meta-date').attr('href');
document.body.appendChild(dummy);
dummy.select();
document.execCommand('copy');
document.body.removeChild(dummy);
}
</script>
and the code for the "Onclick" attribute of a new menu item in the Studio->Navigation->Timeline->Item actions area:
share_link_timeline('{content_id}'); return false;
-
Thank you @LeonidS , that works really well.
It would be nice if it closed the window on click or gave a notification that it has been copied. Is it possible?
-
Well, it's possible to add the simple alert("Message"); line right after document.execCommand('copy');
But may not be the true result as execCommand is the deprecated feature of the browsers now.
-