Export feed post links
Collects authors and direct post links from the currently loaded feed and copies the list to the clipboard.
Code to copy
(function () {
try {
var posts = document.querySelectorAll('.feed-shared-update-v2[data-urn], [data-id^="urn:li:activity"]');
var lines = [];
posts.forEach(function (p) {
var urn = p.getAttribute('data-urn') || p.getAttribute('data-id') || '';
var id = (urn.match(/urn:li:activity:(\d+)/) || [])[1];
var author = p.querySelector('.update-components-actor__title span[aria-hidden="true"]');
var name = author ? author.textContent.trim() : '(unknown)';
if (id) {
lines.push(name + ' — https://www.linkedin.com/feed/update/urn:li:activity:' + id + '/');
}
});
if (!lines.length) {
alert('No feed posts found on this page.');
return;
}
var text = lines.join('\n');
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(text).then(function () {
alert('Copied ' + lines.length + ' post links to the clipboard.');
});
} else {
window.prompt('Feed post links:', text);
}
} catch (e) {
alert('Export failed: ' + e.message);
}
})();
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Enable the action panel, add a button in the Actions tab and paste the code into it — run it with one click.
Rate this example
No ratings yet — be the first.