diff --git a/src/routes/_utils/massageUserText.js b/src/routes/_utils/massageUserText.js index be9c3020..2b4518b9 100644 --- a/src/routes/_utils/massageUserText.js +++ b/src/routes/_utils/massageUserText.js @@ -3,7 +3,7 @@ import { massageStatusPlainText } from './massageStatusPlainText' export function massageUserText (text, emojis, $autoplayGifs) { text = text || '' - text = text.replace(/]+>.*?#.*?>fedilove<.*?<\/a>/gi, ''); + text = text.replace(/]+hashtag[^<>]+>.*?#.*?>fedilove<.*?<\/a>/gi, ''); text = emojifyText(text, emojis, $autoplayGifs) text = massageStatusPlainText(text) return text diff --git a/static/fedilove-no-react.js b/static/fedilove-no-react.js index cd9ddfe7..a3cdbb6f 100644 --- a/static/fedilove-no-react.js +++ b/static/fedilove-no-react.js @@ -607,12 +607,18 @@ function fedilove_customization() { // and dispatch a call to "fedilove_customization" to load page customizations depending on URL context var __window_url = null; var __window_url_old = null; -setInterval(function() { - const newurl = window.location.pathname; - if (newurl != __window_url) { - __window_url_old = __window_url; - __window_url = newurl; - fedilove_customization(); +(function() { + const _this = setInterval(function() { + if (typeof $ !== "undefined") { + clearInterval(_this); + setInterval(function() { + const newurl = window.location.pathname; + if (newurl != __window_url) { + __window_url_old = __window_url; + __window_url = newurl; + fedilove_customization(); + } + }, 100); } -}, 100); - + }); +})();