Exporter les liens des posts du fil
Récupère auteurs et liens directs des posts du fil chargé puis copie la liste dans le presse-papiers.
Code à copier
(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);
}
})();
Comment utiliser cet exemple
- Copiez le code avec le bouton ci-dessus.
- Installez JustZix (2 minutes) et ouvrez l'extension sur la page cible.
- Ajoutez une nouvelle règle correspondant à cette page.
- Activez le panneau d'actions, ajoutez un bouton dans l'onglet Actions et collez-y le code — lancez-le en un clic.
Notez cet exemple
Aucune note — soyez le premier.