1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
function Enterable (id, callback)
{
function thisKeydown (e)
{
if (e.keyCode === 13)
{
var s = $(id).val()
if (s)
callback(s)
}
}
$("#lookup-room").keydown(thisKeydown)
}
var Background =
{
off: function ()
{
$("#bg").hide()
}
}
var Main = {load: function(){}}
var AdminTest =
{
init: function ()
{
d.warn("INIT TEST")
$(window).bind("resize", AdminTest.resize)
AdminTest.resize()
Auth.error = AdminTest.error
Auth.success = AdminTest.success
if ( ! Auth.init() )
AdminTest.error()
else
Auth.checkin()
},
resize: function ()
{
var h = $(window).height()
var statsheight = h-285-20-20-30
$("#stats").css({height: statsheight})
},
error: function ()
{
$("body").hide()
},
success: function ()
{
$("#session").html(Auth.session)
$("#bg-off").click(Background.off)
$(".remove").live("click", Admin.removeVideoClick)
AdminTest.lookupRoom(roomName)
AdminTest.lookupRoomEnterable = new Enterable ("#lookup-room", AdminTest.lookupRoom)
AdminTest.statsLoad()
},
lookupRoom: function (s)
{
d.warn("LOOKUP ROOM "+s)
Room.name = s
Admin.viewRoom()
setTimeout(AdminTest.refresh, 500)
},
refresh: function ()
{
d.warn("ROOM REFRESH")
Room.settingsOpen()
$("#room-name").html(Room.name)
$("#return-link").attr("href", "/"+Room.name)
$("#room-lastlog").val(Lastlog.old)
$("#pnp").attr("src", "http://scannerjammer.fm/"+Room.name+"/read")
},
statsLoad: function ()
{
$.get(API.URL.room.stats).success(AdminTest.statsDump)
},
statsDump: function (html)
{
var greetings = ""
greetings += ">>> <a href='/register/reset'>Need to fix someone's password?</a>"
greetings += "<br/><br/>"
greetings += "<b>Congratulations, %%USERNAME%%!</b> You, on the basis of your score, have been selected to be a SCANNERJAMMER MODERATOR!<br/><br/>"
greetings += "This means we are asking you to be a part of our team. As a moderator, your responsibility is to clear all of the crap videos from the playlist. If something seems like it doesn't belong, do not hesitate to remove it. We care about the content of our site. Soon we will also be adding a mute feature.<br/><br/>Another power you have been granted is to make your OWN SCANNERJAMMER ROOM. Only mods can do this! All you need to do is add the name of your new room to the end of the URL. For example, type <i><b>scannerjammer.fm/whatupdoe</b></i> into the address bar and lo and behold, the SCANNERJAMMER \"whatupdoe\" room has been created!<br/><br/>This is a great way to have a more private SCANNERJAMMER experience, should you want to talk to friends. Feel free to create as many rooms as you want.<br><br/> Thank you, we love you! -Pepper and ryz"
greetings = greetings.replace("%%USERNAME%%", Auth.username)
if (html)
greetings += "<br/><br/><b>STATS TODAY</b><br/>"+html
$("#stats").html(greetings).fadeIn(1000)
}
}
var Main =
{
}
AdminTest.init()
$("#msg").hide()
|