Minecraft PC IP: play.cubecraft.net
D

Deleted member 346231

Guest
Hello, so, @Landviz made this joke thread on how to get the legendary PINK nametag.

Well today I made a rainbow coloured nametag (using his original script). It actually turned out looking pretty sick:
f87d991a606268d3637215aede7879af.gif

Anywho, if you want it, just follow the simple steps listed below.

  1. Go to https://greasyfork.org/en and install a userscript manager for your browser.
  2. Then go here and install my script
  3. Enjoy your nametag now in RAINBOW!
 

MagnificentSpam

Forum Expert
Mar 16, 2016
2,306
2,239
298
Greasemonkey 4 doesn't like it. If you want to use this in firefox you'll have to install Tampermonkey instead.

1. "https://www.cubecraft.net*" should be changed to "https://www.cubecraft.net/*", I guess Tampermonkey doesn't mind that.
2. In Greasemonkey 4 the userscript can't access the jquery the from the page. I had the same issue with some of my scripts, I ended up either removing jquery completely or loading my own query as a dependency to the script. I would be interested to know if there's some workaround for that.
Screenshot_2018-04-11_22-43-34.png Screenshot_2018-04-11_22-52-58.png
 

Attachments

  • Screenshot_2018-04-11_23-00-12.png
    Screenshot_2018-04-11_23-00-12.png
    38.5 KB · Views: 174

MagnificentSpam

Forum Expert
Mar 16, 2016
2,306
2,239
298
Could you do this for Stylish?
I thought about that, I generally prefer stylish styles because they load instantly and cause less flickering on the site. It would be impossible to replicate this exact behaviour (apply the color to all links that countain your username somewhere). It could be applied at some specific places, but I'm not sure how it would be possible to select the name next to your own posts in threads.
 
D

Deleted member 346231

Guest
"https://www.cubecraft.net*" should be changed to "https://www.cubecraft.net/*", I guess Tampermonkey doesn't mind that.
Aight, I fixed that, thank you!
In Greasemonkey 4 the userscript can't access the jquery the from the page. I had the same issue with some of my scripts, I ended up either removing jquery completely or loading my own query as a dependency to the script. I would be interested to know if there's some workaround for that.
This is very interesting, in the last script I made (this one), for some reason tampermonkey didn't like it when I used @require to import jQuery. What exactly happens when you try to load the script in Greasemonkey?
 

MagnificentSpam

Forum Expert
Mar 16, 2016
2,306
2,239
298
What exactly happens when you try to load the script in Greasemonkey?
Basically nothing. When I open the error console with ctrl+shift+j I see those '$ is not defined' errors piling up.
I had some scripts that used the jquery from the website that stopped working when I updated greasemonkey to version 4. Greasemonkey 4 also broke some other stuff, maybe it would be easier to just use tampermonkey that's available everywhere.
 

Max ♠

Forum Expert
Feb 20, 2016
1,420
2,940
344
24
North pole
It would be impossible to replicate this exact behaviour (apply the color to all links that countain your username somewhere). It could be applied at some specific places, but I'm not sure how it would be possible to select the name next to your own posts in threads.
Code:
a[href*="magnificentspam"] {
}
Dont think it's possible to automatically detect the users ign and apply the style from there (in css)

Also, https://www.cubecraft.net/threads/best-theme-ever.198112/
 

driima

Quest Master
Jan 23, 2018
49
555
139
United Kingdom
Stylish:

HTML:
@-moz-document url-prefix("https://www.cubecraft.net/") {
.username,
.username span,
.accountUsername span {
    animation: rainbow 3s infinite;
}

@keyframes rainbow {
    0% {
        color: #9400D3;
    }
    16.6666% {
        color: #0000FF;
    }
    33.3333% {
        color: #00FF00;
    }
    50% {
        color: #FFFF00;
    }
    66.6666% {
        color: #FF7F00;
    }
    83.3333% {
        color: #FF0000;
    }
    100% {
        color: #9400D3;
    }
}
}
 

MagnificentSpam

Forum Expert
Mar 16, 2016
2,306
2,239
298
Stylish:

HTML:
@-moz-document url-prefix("https://www.cubecraft.net/") {
.username,
.username span,
.accountUsername span {
    animation: rainbow 3s infinite;
}

@keyframes rainbow {
    0% {
        color: #9400D3;
    }
    16.6666% {
        color: #0000FF;
    }
    33.3333% {
        color: #00FF00;
    }
    50% {
        color: #FFFF00;
    }
    66.6666% {
        color: #FF7F00;
    }
    83.3333% {
        color: #FF0000;
    }
    100% {
        color: #9400D3;
    }
}
}
Now everyone has a rainbow name I want to be special! Like @Landviz said,
Code:
a[href*="magnificentspam"], .accountUsername {
    animation: rainbow 3s infinite;
}
kind of works.
 

driima

Quest Master
Jan 23, 2018
49
555
139
United Kingdom
Now everyone has a rainbow name I want to be special! Like @Landviz said,
Code:
a[href*="magnificentspam"], .accountUsername {
    animation: rainbow 3s infinite;
}
kind of works.

A bit late, but I had some time. Change "driima" to your username:

HTML:
@-moz-document url-prefix("https://www.cubecraft.net/") {
[data-author="driima"] .username,
[data-author="driima"] .username span,
.accountUsername span {
    animation: rainbow 3s infinite;
}

@keyframes rainbow {
    0% {
        color: #9400D3;
    }
    16.6666% {
        color: #0000FF;
    }
    33.3333% {
        color: #00FF00;
    }
    50% {
        color: #FFFF00;
    }
    66.6666% {
        color: #FF7F00;
    }
    83.3333% {
        color: #FF0000;
    }
    100% {
        color: #9400D3;
    }
}
}
 
Last edited:
  • Like
Reactions: MagnificentSpam

MagnificentSpam

Forum Expert
Mar 16, 2016
2,306
2,239
298
A bit late, but I had some time. Change "driima" to your username:

HTML:
@-moz-document url-prefix("https://www.cubecraft.net/") {
[data-author="driima"] .username span,
.accountUsername span {
    animation: rainbow 3s infinite;
}

@keyframes rainbow {
    0% {
        color: #9400D3;
    }
    16.6666% {
        color: #0000FF;
    }
    33.3333% {
        color: #00FF00;
    }
    50% {
        color: #FFFF00;
    }
    66.6666% {
        color: #FF7F00;
    }
    83.3333% {
        color: #FF0000;
    }
    100% {
        color: #9400D3;
    }
}
}
Hmm, that doesn't work for me, but `[data-author="MagnificentSpam"] .userText .username` does.

Edit: Ah I see, developers get an extra <span> so it would work for you. I don't understand why the * isn't necessary tbh. But you should add the .userText or all people that you mention in your post get the rainbow name as well.
 

driima

Quest Master
Jan 23, 2018
49
555
139
United Kingdom
Hmm, that doesn't work for me, but `[data-author="MagnificentSpam"] .userText .username` does.

Edit: Ah I see, developers get an extra <span> so it would work for you. I don't understand why the * isn't necessary tbh. But you should add the .userText or all people that you mention in your post get the rainbow name as well.

Fixed my reply. You don't need .userText
 
  • Like
Reactions: Dutudy
Top Bottom