Skip to content

Commit 172483b

Browse files
authored
Update unity-forum-fixer.js
1 parent 692ded2 commit 172483b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎unity-forum-fixer.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name UnityForumFixer
33
// @namespace https://unitycoder.com/
4-
// @version 0.42 (25.08.2024)
4+
// @version 0.421 (25.08.2024)
55
// @description Fixes For Unity Forums - https://github.com/unitycoder/UnityForumFixer
66
// @author unitycoder.com
77
// @match https://discussions.unity.com/*
@@ -32,6 +32,7 @@ function OnUpdate()
3232
{
3333
FixPostActivityTime();
3434
TopicsViewShowOriginalPosterInfo();
35+
PostViewShowOriginalPosterInfo();
3536
setTimeout(OnUpdate, 1000);
3637
}
3738

@@ -310,6 +311,11 @@ function PostViewShowOriginalPosterInfo()
310311
{
311312
// Select all elements that contain the avatar with a data-user-card attribute
312313
document.querySelectorAll('.trigger-user-card.main-avatar').forEach(function(avatar) {
314+
// Check if the user link has already been added
315+
if (avatar.parentNode.querySelector('.custom-post-username')) {
316+
return; // Skip to the next avatar if the user link already exists
317+
}
318+
313319
// Get the user name from the data-user-card attribute
314320
var userName = avatar.getAttribute('data-user-card');
315321

0 commit comments

Comments
 (0)