if you wanted a redirect this is the way to do it
api.onPageChange((url) => {
if (url.includes('/c/redirect-politifora')) {
window.location.replace('https://politifora.com/');
}
});
however this is kinda slow and won’t run until the page has finished loading, which means users will still see the redirect category. i tried a second way, which is using jQuery to replace the links on the index or anywhere else this category appears.
api.onPageChange(() => {
$(function(){
$('a[href*="/c/redirect-politifora').attr(
'href', 'https://politifora.com/'
);
});
});
with this you don’t need a redirect, because it modifies href attribute of every redirect-politiflora link in place.