-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Broken hashtags on embed and publish pages
Since we don't have icons or access to the JS that transforms hashtag icon placeholders into their proper icons and colours on embed and publish pages, we need to at least show _something_ and make sure the hashtags are not totally broken on these pages.
- Loading branch information
1 parent
1c395e1
commit 65b83fa
Showing
5 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(function () { | ||
window.onload = function () { | ||
// Use a # for hashtags since we don't have the JS and icons needed here to render the proper icon. | ||
let hashtags = document.querySelectorAll( | ||
".published-page-content-body a.hashtag-cooked" | ||
); | ||
for (let i = 0; i < hashtags.length; i++) { | ||
hashtags[i].querySelector(".hashtag-icon-placeholder .d-icon").remove(); | ||
hashtags[i].querySelector(".hashtag-icon-placeholder").innerText = "#"; | ||
} | ||
}; | ||
})(); |
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
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
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