File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
// ==UserScript==
2
2
// @name UnityForumFixer
3
3
// @namespace https://unitycoder.com/
4
- // @version 0.42 (25.08.2024)
4
+ // @version 0.421 (25.08.2024)
5
5
// @description Fixes For Unity Forums - https://github.com/unitycoder/UnityForumFixer
6
6
// @author unitycoder.com
7
7
// @match https://discussions.unity.com/*
@@ -32,6 +32,7 @@ function OnUpdate()
32
32
{
33
33
FixPostActivityTime ( ) ;
34
34
TopicsViewShowOriginalPosterInfo ( ) ;
35
+ PostViewShowOriginalPosterInfo ( ) ;
35
36
setTimeout ( OnUpdate , 1000 ) ;
36
37
}
37
38
@@ -310,6 +311,11 @@ function PostViewShowOriginalPosterInfo()
310
311
{
311
312
// Select all elements that contain the avatar with a data-user-card attribute
312
313
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
+
313
319
// Get the user name from the data-user-card attribute
314
320
var userName = avatar . getAttribute ( 'data-user-card' ) ;
315
321
You can’t perform that action at this time.
0 commit comments