Post: Javascript: NGU Shoutbox Name Changer
06-01-2014, 11:28 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I got bored and made this script today Smile

It allows you to change your name, and what usergroup you're in on the ngu shoutbox.

You must login or register to view this content.


I'm using greasemonkey so it auto executes, but you can do whatever.

Make Sure You Change:

  • default_name
  • userid


Here is the script:

    
// ==UserScript==
// @name NGU SB
// @namespace nextgenupdate.com
// @description Shoutbox Hax
// @include https://www.nextgenupdate.com/forums/shoutbox-iframe.php
// @version 1
// @grant none
// ==/UserScript==

var default_name = "PREMIER-GAMER";
var userid = "1109432";

function nameChange() {
//a span
$("a[onclick*=pm_"+userid+"]").each(function(){
if($(this).html().indexOf(default_name) > -1){

var rank = $("div#namecp select").val();

if( rank == 7 )
$(this).attr("style", "color: white;text-decoration:line-through;text-decoration-color: #000; -moz-text-decoration-color: #000;");
else if( rank == 6)
$(this).attr("style", "color: #A3A3A3;");
else if(rank == 5)
$(this).attr("style", "color: #FF5E00;font-style:italic;");
else if(rank == 4)
$(this).attr("style", "color: #68C5E7;font-weight: bold;");
else if(rank == 3)
$(this).attr("style", "color: #2B6983;font-weight: bold;");
else if(rank == 2)
$(this).attr("style", "color: #000;font-weight: bold;");
else if( rank == 1 )
$(this).attr("style", "color: red;font-weight: bold;");

//name changer..
var name = $("div#namecp input").val();
if( name != "")
$(this).html(name);
else
$(this).html(default_name);

}
});

}

function addNameCP()
{
var prev0 = $(".bootstrap").first().html();
$(".bootstrap").first().html( '<div id="namecp" style="margin-bottom: 10px;border-bottom: 1px solid #DDD;padding-bottom: 5px;"><input type="text" placeholder="Set Name" style="height: 28px;"> <select><option value="1">Admin</option><option value="2">Super Mod</option><option value="3">Mod</option><option value="4">Gaming Squad</option><option value="5">Premium</option><option value="6">Registered</option><option value="7">Banned</option></select></div>' + prev0);
}

function addTabs()
{
var sel = "div.bootstrap ul.nav.nav-tabs";
var prev = $(sel).first().html();
$(sel).first().html( prev + "<li><a onclick='changeMod()' data-toggle='tab' href='#ngu-mod-sb'>ModBox</a></li><li><a onclick='changeAdmin()' data-toggle='tab' href='#ngu-admin-sb'>AdminBox</a></li><li><a onclick='changeBan()' data-toggle='tab' href='#ngu-ban-sb'>BanBox</a></li>" );
}

function startScript () {

//add name cp
addNameCP();

//add the sb tabs
addTabs();

//name changer.
setInterval( nameChange, 50 );
}
startScript();
Last edited by PREMIER-GAMER ; 06-01-2014 at 12:14 PM.

The following 9 users say thank you to PsychedelicJake for this useful post:

jerrmy12, Nath, RouletteBoi, Nick, SnaY, The-KozMic-Modz, Ciri, Winter, xkoeckiiej
06-02-2014, 07:35 PM #2
Nath
[move] LOLOL [/move]
It looks sweet! Thanks!

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo