AlternativeTo.net - OnePager - bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function() { | |
const appListParent = document.querySelector('li[data-testid]').parentElement; | |
let alternativesApps = []; | |
document.querySelector('nav[aria-label="Pagination Navigation"]').remove(); // Remove navigation links | |
const container = document.createElement("div"); | |
for (i = 2; i <= window.__NEXT_DATA__.props.pageProps.pagingMeta.totalPages; i++) | |
{ | |
fetch(window.location.href + "?p=" + i).then(res => | |
{ | |
return res.text(); | |
}).then(data => | |
{ | |
container.innerHTML = data; | |
alternativesApps = container.querySelectorAll("li[data-testid]"); | |
alternativesApps.forEach(item => | |
{ | |
appListParent.appendChild(item); | |
}); | |
}); | |
} | |
const metaspansCount = document.querySelectorAll('span.meta').length; | |
document.querySelectorAll('span.meta')[metaspansCount - 1].parentNode.remove(); // remove last span that contains 'navigation progress' | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This scriptlet is for displaying all alternative software on AlternativeTo.net on one page.
Use it on
https://alternativeto.net/software/[software name]/
Add the above code as a bookmark (paste it as a bookmark URL) and click on it while on AlternativeTo.net.
It does not fetch images (yet).