Update components, fix url rewriter. Closes #2538

This commit is contained in:
Daniel Supernault 2021-01-24 15:32:14 -07:00
parent 80b911c4d2
commit e8cc66dce7
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
4 changed files with 30 additions and 54 deletions

View file

@ -839,15 +839,8 @@ body-class="p-2 rounded">
// 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';
document.querySelectorAll('.timeline .card-body .comments .comment-body a').forEach(function(i, e) {
i.href = App.util.format.rewriteLinks(i);
});
}, 500);
}).catch(err => {
@ -1004,15 +997,8 @@ body-class="p-2 rounded">
});
this.replies = _.reverse(data);
setTimeout(function() {
document.querySelectorAll('.comments .comment-body 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';
document.querySelectorAll('.timeline .card-body .comments .comment-body a').forEach(function(i, e) {
i.href = App.util.format.rewriteLinks(i);
});
}, 500);
}).catch(err => {