Achei interessante, talvez você também goste:
The article discusses a feature related to user interactions on a platform. It highlights how the system identifies the current user and adjusts the display accordingly. Additionally, it mentions options for managing comments and user interactions.
- ▪The system checks for the current user in local storage.
- ▪If the current user matches a specific ID, the article display is modified.
- ▪Users have options to manage comments, including hiding or reporting them.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 399260) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } vitoriazzp Posted on Jun 3 Achei interessante, talvez você também goste: Sign in to view linked content Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).