1

so me and my friend are trying to make a userscript for a site and can't get past this issue. We wish to add a script from the shoutbox of the site and add it to the names on the right hand side to be able to @ people with their name there.

The script for the @ simple is here, this is already in the sites HTML, we are just trying to move it.

<li class="shout-at_12 clickable mr at-shout pause-shout" title="@" data-at-uname="Tattoo"></li>

Our current attempt is -

function onLoad() {
    $( document ).ready(){
        var uname = $(this).data('data-at-uname');
        $( "a.online-name" ).add(<li class="shout-at_12 clickable mr at-shout pause-shout" title="@" data-at-uname=" + uname + "></li>)
    }
}

But with no success. The whole pages HTML can be found here - http://pastebin.com/J6kk6LSn

The plugin we are using is Greasemonkey if it helps, we have been trying to do this for hours to no avail. If anyone can help it will be greatly appreciated.

Barmar
  • 741,623
  • 53
  • 500
  • 612