mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update components, redirect remote hashtag to local hashtag page
This commit is contained in:
parent
714eceb3ea
commit
b1fb7dcbc3
2 changed files with 24 additions and 0 deletions
|
@ -860,6 +860,18 @@ export default {
|
|||
}
|
||||
this.loaded = true;
|
||||
this.fetchProfilePosts();
|
||||
setTimeout(function() {
|
||||
document.querySelectorAll('.status-comment .comment-text a').forEach(function(i, e) {
|
||||
if(i.href.startsWith(window.location.origin)) {
|
||||
return;
|
||||
}
|
||||
let tag = i.innerText;
|
||||
if(tag.startsWith('#')) {
|
||||
tag = tag.substr(1);
|
||||
}
|
||||
i.href = '/discover/tags/'+tag+'?src=rph';
|
||||
});
|
||||
}, 500);
|
||||
}).catch(error => {
|
||||
swal('Oops!', 'An error occured, please try refreshing the page.', 'error');
|
||||
});
|
||||
|
|
|
@ -815,6 +815,18 @@
|
|||
}
|
||||
// this.fetchStories();
|
||||
this.rtw();
|
||||
setTimeout(function() {
|
||||
document.querySelectorAll('.caption .status-content a').forEach(function(i, e) {
|
||||
if(i.href.startsWith(window.location.origin)) {
|
||||
return;
|
||||
}
|
||||
let tag = i.innerText;
|
||||
if(tag.startsWith('#')) {
|
||||
tag = tag.substr(1);
|
||||
}
|
||||
i.href = '/discover/tags/'+tag+'?src=rph';
|
||||
});
|
||||
}, 500);
|
||||
}).catch(err => {
|
||||
swal(
|
||||
'Oops, something went wrong',
|
||||
|
|
Loading…
Reference in a new issue