GOONCHAT IS DEAD! LONG LIVE THE KING!
This commit is contained in:
@@ -1,341 +0,0 @@
|
||||
/*********************************
|
||||
For the main html chat area
|
||||
*********************************/
|
||||
|
||||
/// Should match the value set in the browser js
|
||||
#define MAX_COOKIE_LENGTH 5
|
||||
|
||||
//Precaching a bunch of shit. Someone ship this out of here
|
||||
GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of icons for the browser output
|
||||
|
||||
//lazy renaming to chat_output, instead renamed to old chatOutput
|
||||
/**
|
||||
* The chatOutput datum exists to handle the goonchat browser.
|
||||
* On client, created on Client/New()
|
||||
*/
|
||||
/datum/chatOutput
|
||||
/// The client that owns us.
|
||||
var/client/owner
|
||||
/// How many times client data has been checked
|
||||
var/total_checks = 0
|
||||
/// When to next clear the client data checks counter
|
||||
var/next_time_to_clear = 0
|
||||
/// Has the client loaded the browser output area?
|
||||
var/loaded = FALSE
|
||||
/// If they haven't loaded chat, this is where messages will go until they do
|
||||
var/list/messageQueue
|
||||
var/cookieSent = FALSE // Has the client sent a cookie for analysis
|
||||
var/broken = FALSE
|
||||
var/list/connectionHistory //Contains the connection history passed from chat cookie
|
||||
var/adminMusicVolume = 25 //This is for the Play Global Sound verb
|
||||
|
||||
/datum/chatOutput/New(client/C)
|
||||
owner = C
|
||||
messageQueue = list()
|
||||
connectionHistory = list()
|
||||
|
||||
/**
|
||||
* start: Tries to load the chat browser
|
||||
* Aborts if a problem is encountered.
|
||||
* Async because this is called from Client/New.
|
||||
*/
|
||||
/datum/chatOutput/proc/start()
|
||||
set waitfor = FALSE
|
||||
//Check for existing chat
|
||||
if(!owner)
|
||||
return FALSE
|
||||
|
||||
if(!winexists(owner, "browseroutput")) // Oh goddamnit.
|
||||
broken = TRUE
|
||||
message_admins("Couldn't start chat for [key_name_admin(owner)]!")
|
||||
. = FALSE
|
||||
alert(owner.mob, "Updated chat window does not exist. If you are using a custom skin file please allow the game to update.")
|
||||
return
|
||||
|
||||
if(winget(owner, "browseroutput", "is-visible") == "true") //Already setup
|
||||
doneLoading()
|
||||
|
||||
else //Not setup
|
||||
load()
|
||||
|
||||
return TRUE
|
||||
|
||||
/// Loads goonchat and sends assets.
|
||||
/datum/chatOutput/proc/load()
|
||||
set waitfor = FALSE
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
var/datum/asset/stuff = get_asset_datum(/datum/asset/group/goonchat)
|
||||
stuff.send(owner)
|
||||
|
||||
owner << browse(file('code/modules/goonchat/browserassets/html/browserOutput.html'), "window=browseroutput")
|
||||
|
||||
/// Interprets input from the client. Will send data back if required.
|
||||
/datum/chatOutput/Topic(href, list/href_list)
|
||||
if(usr.client != owner)
|
||||
return TRUE
|
||||
|
||||
// Build arguments.
|
||||
// Arguments are in the form "param[paramname]=thing"
|
||||
var/list/params = list()
|
||||
for(var/key in href_list)
|
||||
if(length_char(key) > 7 && findtext(key, "param")) // 7 is the amount of characters in the basic param key template.
|
||||
var/param_name = copytext_char(key, 7, -1)
|
||||
var/item = href_list[key]
|
||||
|
||||
params[param_name] = item
|
||||
|
||||
var/data // Data to be sent back to the chat.
|
||||
switch(href_list["proc"])
|
||||
if("doneLoading")
|
||||
data = doneLoading(arglist(params))
|
||||
|
||||
if("debug")
|
||||
data = debug(arglist(params))
|
||||
|
||||
if("ping")
|
||||
data = ping(arglist(params))
|
||||
|
||||
if("analyzeClientData")
|
||||
data = analyzeClientData(arglist(params))
|
||||
|
||||
if("setMusicVolume")
|
||||
data = setMusicVolume(arglist(params))
|
||||
if("colorPresetPost") //User just swapped color presets in their goonchat preferences. Do we do anything else?
|
||||
switch(href_list["preset"])
|
||||
if("light")
|
||||
owner.force_white_theme()
|
||||
if("dark" || "normal")
|
||||
owner.force_dark_theme()
|
||||
// if("swaptodarkmode")
|
||||
// swaptodarkmode()
|
||||
// if("swaptolightmode")
|
||||
// swaptolightmode()
|
||||
|
||||
if(data)
|
||||
ehjax_send(data = data)
|
||||
|
||||
|
||||
/// Called on chat output done-loading by JS.
|
||||
/datum/chatOutput/proc/doneLoading()
|
||||
if(loaded)
|
||||
return
|
||||
|
||||
testing("Chat loaded for [owner.ckey]")
|
||||
loaded = TRUE
|
||||
showChat()
|
||||
|
||||
|
||||
for(var/message in messageQueue)
|
||||
// whitespace has already been handled by the original to_chat
|
||||
to_chat(owner, message, handle_whitespace=FALSE)
|
||||
|
||||
messageQueue = null
|
||||
sendClientData()
|
||||
|
||||
syncRegex()
|
||||
|
||||
//do not convert to to_chat()
|
||||
SEND_TEXT(owner, "<span class=\"userdanger\">Failed to load fancy chat, reverting to old chat. Certain features won't work.</span>")
|
||||
|
||||
/// Hides the standard output and makes the browser visible.
|
||||
/datum/chatOutput/proc/showChat()
|
||||
winset(owner, "output", "is-visible=false")
|
||||
winset(owner, "browseroutput", "is-disabled=false;is-visible=true")
|
||||
|
||||
/// Calls syncRegex on all currently owned chatOutput datums
|
||||
/proc/syncChatRegexes()
|
||||
for (var/user in GLOB.clients)
|
||||
var/client/C = user
|
||||
var/datum/chatOutput/Cchat = C.chatOutput
|
||||
if (Cchat && !Cchat.broken && Cchat.loaded)
|
||||
Cchat.syncRegex()
|
||||
|
||||
/// Used to dynamically add regexes to the browser output. Currently only used by the IC filter.
|
||||
/datum/chatOutput/proc/syncRegex()
|
||||
var/list/regexes = list()
|
||||
/*
|
||||
if (config.ic_filter_regex)
|
||||
regexes["show_filtered_ic_chat"] = list(
|
||||
config.ic_filter_regex.name,
|
||||
"ig",
|
||||
"<span class='boldwarning'>$1</span>"
|
||||
)
|
||||
*/
|
||||
if (regexes.len)
|
||||
ehjax_send(data = list("syncRegex" = regexes))
|
||||
|
||||
/// Sends json encoded data to the browser.
|
||||
/datum/chatOutput/proc/ehjax_send(client/C = owner, window = "browseroutput", data)
|
||||
if(islist(data))
|
||||
data = json_encode(data)
|
||||
C << output("[data]", "[window]:ehjaxCallback")
|
||||
|
||||
/**
|
||||
* Sends music data to the browser. If enabled by the browser, it will start playing.
|
||||
* Arguments:
|
||||
* music must be a https adress.
|
||||
* extra_data is a list. The keys "pitch", "start" and "end" are used.
|
||||
** "pitch" determines the playback rate
|
||||
** "start" determines the start time of the sound
|
||||
** "end" determines when the musics stops playing
|
||||
*/
|
||||
/datum/chatOutput/proc/sendMusic(music, pitch, list/extra_data) //someone remove pitch
|
||||
if(!findtext(music, GLOB.is_http_protocol))
|
||||
return
|
||||
var/list/music_data = list("adminMusic" = url_encode(url_encode(music)))
|
||||
|
||||
if(extra_data?.len)
|
||||
music_data["musicRate"] = extra_data["pitch"] || pitch
|
||||
music_data["musicSeek"] = extra_data["start"]
|
||||
music_data["musicHalt"] = extra_data["end"]
|
||||
|
||||
ehjax_send(data = music_data)
|
||||
|
||||
/// Stops music playing throw the browser.
|
||||
/datum/chatOutput/proc/stopMusic()
|
||||
ehjax_send(data = "stopMusic")
|
||||
|
||||
/// Setter for adminMusicVolume. Sanitizes the value to between 0 and 100.
|
||||
/datum/chatOutput/proc/setMusicVolume(volume = "")
|
||||
if(volume)
|
||||
adminMusicVolume = clamp(text2num(volume), 0, 100)
|
||||
|
||||
/// Sends client connection details to the chat to handle and save
|
||||
/datum/chatOutput/proc/sendClientData()
|
||||
//Get dem deets
|
||||
var/list/deets = list("clientData" = list())
|
||||
deets["clientData"]["ckey"] = owner.ckey
|
||||
deets["clientData"]["ip"] = owner.address
|
||||
deets["clientData"]["compid"] = owner.computer_id
|
||||
var/data = json_encode(deets)
|
||||
ehjax_send(data = data)
|
||||
|
||||
/// Called by client, sent data to investigate (cookie history so far)
|
||||
/datum/chatOutput/proc/analyzeClientData(cookie = "")
|
||||
//Spam check
|
||||
if(world.time > next_time_to_clear)
|
||||
next_time_to_clear = world.time + (3 SECONDS)
|
||||
total_checks = 0
|
||||
|
||||
total_checks += 1
|
||||
|
||||
if(total_checks > SPAM_TRIGGER_AUTOMUTE)
|
||||
message_admins("[key_name(owner)] kicked for goonchat topic spam")
|
||||
qdel(owner)
|
||||
return
|
||||
|
||||
if(!cookie)
|
||||
return
|
||||
|
||||
if(cookie != "none")
|
||||
var/list/connData = json_decode(cookie)
|
||||
if (connData && islist(connData) && connData.len > 0 && connData["connData"])
|
||||
connectionHistory = connData["connData"] //lol fuck
|
||||
var/list/found = new()
|
||||
|
||||
if(connectionHistory.len > MAX_COOKIE_LENGTH)
|
||||
message_admins("[key_name(src.owner)] was kicked for an invalid ban cookie)")
|
||||
qdel(owner)
|
||||
return
|
||||
|
||||
for(var/i in connectionHistory.len to 1 step -1)
|
||||
if(QDELETED(owner))
|
||||
//he got cleaned up before we were done
|
||||
return
|
||||
var/list/row = src.connectionHistory[i]
|
||||
if (!row || row.len < 3 || (!row["ckey"] || !row["compid"] || !row["ip"])) //Passed malformed history object
|
||||
return
|
||||
if (world.IsBanned(row["ckey"], row["ip"], row["compid"], real_bans_only=TRUE))
|
||||
found = row
|
||||
break
|
||||
CHECK_TICK
|
||||
|
||||
//Uh oh this fucker has a history of playing on a banned account!!
|
||||
if (found.len > 0)
|
||||
message_admins("[key_name(src.owner)] has a cookie from a banned account! (Matched: [found["ckey"]], [found["ip"]], [found["compid"]])")
|
||||
log_admin_private("[key_name(owner)] has a cookie from a banned account! (Matched: [found["ckey"]], [found["ip"]], [found["compid"]])")
|
||||
|
||||
cookieSent = TRUE
|
||||
|
||||
/// Called by js client every 60 seconds
|
||||
/datum/chatOutput/proc/ping()
|
||||
return "pong"
|
||||
|
||||
/// Called by js client on js error
|
||||
/datum/chatOutput/proc/debug(error)
|
||||
log_world("\[[time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")]\] Client: [(src.owner.key ? src.owner.key : src.owner)] triggered JS error: [error]")
|
||||
|
||||
/// Global chat proc. to_chat_immediate will circumvent SSchat and send data as soon as possible.
|
||||
/proc/to_chat_immediate(target, message, handle_whitespace = TRUE, trailing_newline = TRUE, confidential = FALSE)
|
||||
if(!target || !message)
|
||||
return
|
||||
|
||||
if(target == world)
|
||||
target = GLOB.clients
|
||||
|
||||
var/original_message = message
|
||||
if(handle_whitespace)
|
||||
message = replacetext(message, "\n", "<br>")
|
||||
message = replacetext(message, "\t", "[FOURSPACES][FOURSPACES]") //EIGHT SPACES IN TOTAL!!
|
||||
if(trailing_newline)
|
||||
message += "<br>"
|
||||
|
||||
if(islist(target))
|
||||
// Do the double-encoding outside the loop to save nanoseconds
|
||||
var/twiceEncoded = url_encode(url_encode(message))
|
||||
for(var/I in target)
|
||||
var/client/C = CLIENT_FROM_VAR(I) //Grab us a client if possible
|
||||
|
||||
if (!C)
|
||||
continue
|
||||
|
||||
//Send it to the old style output window.
|
||||
SEND_TEXT(C, original_message)
|
||||
|
||||
if(!C.chatOutput || C.chatOutput.broken) // A player who hasn't updated his skin file.
|
||||
continue
|
||||
|
||||
if(!C.chatOutput.loaded)
|
||||
//Client still loading, put their messages in a queue
|
||||
C.chatOutput.messageQueue += message
|
||||
continue
|
||||
|
||||
C << output(twiceEncoded, "browseroutput:output")
|
||||
else
|
||||
var/client/C = CLIENT_FROM_VAR(target) //Grab us a client if possible
|
||||
|
||||
if (!C)
|
||||
return
|
||||
|
||||
//Send it to the old style output window.
|
||||
SEND_TEXT(C, original_message)
|
||||
|
||||
if(!C.chatOutput || C.chatOutput.broken) // A player who hasn't updated his skin file.
|
||||
return
|
||||
|
||||
if(!C.chatOutput.loaded)
|
||||
//Client still loading, put their messages in a queue
|
||||
C.chatOutput.messageQueue += message
|
||||
return
|
||||
|
||||
// url_encode it TWICE, this way any UTF-8 characters are able to be decoded by the Javascript.
|
||||
C << output(url_encode(url_encode(message)), "browseroutput:output")
|
||||
|
||||
/// Sends a text message to the target.
|
||||
/proc/to_chat(target, message, handle_whitespace = TRUE, trailing_newline = TRUE, confidential = FALSE)
|
||||
if(Master.current_runlevel == RUNLEVEL_INIT || !SSchat?.initialized)
|
||||
to_chat_immediate(target, message, handle_whitespace, trailing_newline, confidential)
|
||||
return
|
||||
SSchat.queue(target, message, handle_whitespace, trailing_newline, confidential)
|
||||
|
||||
/// Dark mode light mode stuff. Yell at KMC if this breaks! (See darkmode.dm for documentation)
|
||||
/datum/chatOutput/proc/swaptolightmode()
|
||||
owner.force_white_theme()
|
||||
|
||||
/// Light mode stuff. (See darkmode.dm for documentation)
|
||||
/datum/chatOutput/proc/swaptodarkmode()
|
||||
owner.force_dark_theme()
|
||||
|
||||
#undef MAX_COOKIE_LENGTH
|
||||
@@ -1,464 +0,0 @@
|
||||
/*****************************************
|
||||
*
|
||||
* GLOBAL STYLES
|
||||
*
|
||||
******************************************/
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
color: #000000;
|
||||
}
|
||||
body {
|
||||
background: #E0E0E0; /*CIT CHANGE - darkens chatbox a lil*/
|
||||
font-family: Verdana, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.2;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1;
|
||||
-ms-interpolation-mode: nearest-neighbor;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
img.icon {
|
||||
height: 1em;
|
||||
min-height: 16px;
|
||||
width: auto;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
|
||||
.r:before { /* "repeated" badge class for combined messages */
|
||||
content: 'x';
|
||||
}
|
||||
.r {
|
||||
display: inline-block;
|
||||
min-width: 0.5em;
|
||||
font-size: 0.7em;
|
||||
padding: 0.2em 0.3em;
|
||||
line-height: 1;
|
||||
color: white;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
background-color: crimson;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
a {color: #0000ff;}
|
||||
a.visited {color: #ff00ff;}
|
||||
a:visited {color: #ff00ff;}
|
||||
a.popt {text-decoration: none;}
|
||||
|
||||
/*****************************************
|
||||
*
|
||||
* OUTPUT NOT RELATED TO ACTUAL MESSAGES
|
||||
*
|
||||
******************************************/
|
||||
#loading {
|
||||
position: fixed;
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
text-align: center;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin: -75px 0 0 -150px;
|
||||
}
|
||||
#loading i {display: block; padding-bottom: 3px;}
|
||||
|
||||
#messages {
|
||||
font-size: 13px;
|
||||
padding: 3px;
|
||||
margin: 0;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
#newMessages {
|
||||
position: fixed;
|
||||
display: block;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
padding: 8px;
|
||||
background: #d0d0d0;
|
||||
text-decoration: none;
|
||||
font-variant: small-caps;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
#newMessages:hover {background: #ccc;}
|
||||
#newMessages i {vertical-align: middle; padding-left: 3px;}
|
||||
#ping {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 135px;
|
||||
width: 45px;
|
||||
background: #d0d0d0;
|
||||
height: 30px;
|
||||
padding: 8px 0 2px 0;
|
||||
}
|
||||
#ping i {display: block; text-align: center;}
|
||||
#ping .ms {
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 8pt;
|
||||
padding-top: 2px;
|
||||
}
|
||||
#userBar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
#userBar .subCell {
|
||||
background: #d0d0d0;
|
||||
height: 30px;
|
||||
padding: 5px 0;
|
||||
display: block;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
line-height: 28px;
|
||||
border-top: 1px solid #b4b4b4;
|
||||
}
|
||||
#userBar .subCell:hover {background: #ccc;}
|
||||
#userBar .toggle {
|
||||
width: 45px;
|
||||
background: #ccc;
|
||||
border-top: 0;
|
||||
float: right;
|
||||
text-align: center;
|
||||
}
|
||||
#userBar .sub {clear: both; display: none; width: 180px;}
|
||||
#userBar .sub.scroll {overflow-y: scroll;}
|
||||
#userBar .sub.subCell {padding: 3px 0 3px 8px; line-height: 30px; font-size: 0.9em; clear: both;}
|
||||
#userBar .sub span {
|
||||
display: block;
|
||||
line-height: 30px;
|
||||
float: left;
|
||||
}
|
||||
#userBar .sub i {
|
||||
display: block;
|
||||
padding: 0 5px;
|
||||
font-size: 1.1em;
|
||||
width: 22px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
float: right;
|
||||
}
|
||||
#userBar .sub input {
|
||||
position: absolute;
|
||||
padding: 7px 5px;
|
||||
width: 121px;
|
||||
line-height: 30px;
|
||||
float: left;
|
||||
}
|
||||
#userBar .topCell {border-top: 0;}
|
||||
|
||||
/* POPUPS */
|
||||
.popup {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
background: #d0d0d0;
|
||||
}
|
||||
.popup .close {
|
||||
position: absolute;
|
||||
background: #aaa;
|
||||
top: 0;
|
||||
right: 0;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
z-index: 2;
|
||||
padding: 0 10px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.popup .close:hover {background: #999;}
|
||||
.popup .head {
|
||||
background: #999;
|
||||
color: #d0d0d0;
|
||||
padding: 0 10px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
border-bottom: 2px solid green;
|
||||
}
|
||||
.popup input {border: 1px solid #999; background: #fff; margin: 0; padding: 5px; outline: none; color: #333;}
|
||||
.popup input[type=text]:hover, .popup input[type=text]:active, .popup input[type=text]:focus {border-color: green;}
|
||||
.popup input[type=submit] {padding: 5px 10px; background: #999; color: #d0d0d0; text-transform: uppercase; font-size: 0.9em; font-weight: bold;}
|
||||
.popup input[type=submit]:hover, .popup input[type=submit]:focus, .popup input[type=submit]:active {background: #aaa; cursor: pointer;}
|
||||
|
||||
.changeFont {padding: 10px;}
|
||||
.changeFont a {display: block; text-decoration: none; padding: 3px; color: #333;}
|
||||
.changeFont a:hover {background: #ccc;}
|
||||
|
||||
.highlightPopup {padding: 10px; text-align: center;}
|
||||
.highlightPopup input[type=text] {display: block; width: 215px; text-align: left; margin-top: 5px;}
|
||||
.highlightPopup input.highlightColor {background-color: #FFFF00;}
|
||||
.highlightPopup input.highlightTermSubmit {margin-top: 5px;}
|
||||
|
||||
/* ADMIN CONTEXT MENU */
|
||||
.contextMenu {
|
||||
background-color: #d0d0d0;
|
||||
position: fixed;
|
||||
margin: 2px;
|
||||
width: 150px;
|
||||
}
|
||||
.contextMenu a {
|
||||
display: block;
|
||||
padding: 2px 5px;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.contextMenu a:hover {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
/* ADMIN FILTER MESSAGES MENU */
|
||||
.filterMessages {padding: 5px;}
|
||||
.filterMessages div {padding: 2px 0;}
|
||||
.filterMessages input {}
|
||||
.filterMessages label {}
|
||||
|
||||
.icon-stack {height: 1em; line-height: 1em; width: 1em; vertical-align: middle; margin-top: -2px;}
|
||||
|
||||
|
||||
/*****************************************
|
||||
*
|
||||
* OUTPUT ACTUALLY RELATED TO MESSAGES
|
||||
*
|
||||
******************************************/
|
||||
|
||||
/* MOTD */
|
||||
.motd {color: #638500; font-family: Verdana, sans-serif;}
|
||||
.motd h1, .motd h2, .motd h3, .motd h4, .motd h5, .motd h6 {color: #638500; text-decoration: underline;}
|
||||
.motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover {color: #638500;}
|
||||
|
||||
/* ADD HERE FOR BOLD */
|
||||
.bold, .name, .prefix, .ooc, .looc, .adminooc, .admin, .medal, .yell {font-weight: bold;}
|
||||
|
||||
/* ADD HERE FOR ITALIC */
|
||||
.italic, .italics, .emote {font-style: italic;}
|
||||
|
||||
/* OUTPUT COLORS */
|
||||
.highlight {background: yellow;}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {color: #0000ff;font-family: Georgia, Verdana, sans-serif;}
|
||||
h1.alert, h2.alert {color: #000000;}
|
||||
|
||||
em {font-style: normal; font-weight: bold;}
|
||||
|
||||
.ooc {color: #002eb8; font-weight: bold;}
|
||||
.looc {color: #6699CC; font-weight: bold;}
|
||||
.antagooc {color: #b8002e; font-weight: bold;}
|
||||
.adminobserverooc {color: #0099cc; font-weight: bold;}
|
||||
.adminooc {color: #700038; font-weight: bold;}
|
||||
|
||||
.adminsay {color: #FF4500}
|
||||
.admin {color: #386aff; font-weight: bold;}
|
||||
|
||||
.name { font-weight: bold;}
|
||||
|
||||
.say {}
|
||||
.deadsay {color: #5c00e6;}
|
||||
.binarysay {color: #20c20e; background-color: #000000; display: block;}
|
||||
.binarysay a {color: #00ff00;}
|
||||
.binarysay a:active, .binarysay a:visited {color: #88ff88;}
|
||||
.radio {color: #008000;}
|
||||
.sciradio {color: #993399;}
|
||||
.comradio {color: #948f02;}
|
||||
.secradio {color: #a30000;}
|
||||
.medradio {color: #337296;}
|
||||
.engradio {color: #fb5613;}
|
||||
.suppradio {color: #a8732b;}
|
||||
.servradio {color: #6eaa2c;}
|
||||
.syndradio {color: #6d3f40;}
|
||||
.centcomradio {color: #686868;}
|
||||
.aiprivradio {color: #ff00ff;}
|
||||
.redteamradio {color: #ff0000;}
|
||||
.blueteamradio {color: #0000ff;}
|
||||
|
||||
.yell { font-weight: bold;}
|
||||
|
||||
.alert {color: #ff0000;}
|
||||
h1.alert, h2.alert {color: #000000;}
|
||||
|
||||
.emote { font-style: italic;}
|
||||
.selecteddna {color: #ffffff; background-color: #001B1B}
|
||||
|
||||
.attack {color: #ff0000;}
|
||||
.disarm {color: #990000;}
|
||||
.passive {color: #660000;}
|
||||
|
||||
.userdanger {color: #ff0000; font-weight: bold; font-size: 185%;}
|
||||
.bolddanger {color: #c51e1e;font-weight: bold;}
|
||||
.danger {color: #ff0000;}
|
||||
.tinydanger {color: #c51e1e; font-size: 85%;}
|
||||
.smalldanger {color: #c51e1e; font-size: 90%;}
|
||||
.warning {color: #ff0000; font-style: italic;}
|
||||
.alertwarning {color: #FF0000; font-weight: bold}
|
||||
.boldwarning {color: #ff0000; font-style: italic; font-weight: bold}
|
||||
.announce {color: #228b22; font-weight: bold;}
|
||||
.boldannounce {color: #ff0000; font-weight: bold;}
|
||||
.greenannounce {color: #00ff00; font-weight: bold;}
|
||||
.rose {color: #ff5050;}
|
||||
.info {color: #0000CC;}
|
||||
.notice {color: #000099;}
|
||||
.tinynotice {color: #6685f5; font-style: italic; font-size: 85%;}
|
||||
.smallnotice {color: #6685f5; font-size: 90%;}
|
||||
.smallnoticeital {color: #6685f5; font-style: italic; font-size: 90%;}
|
||||
.boldnotice {color: #000099; font-weight: bold;}
|
||||
.adminnotice {color: #0000ff;}
|
||||
.adminhelp {color: #ff0000; font-weight: bold;}
|
||||
.unconscious {color: #0000ff; font-weight: bold;}
|
||||
.suicide {color: #ff5050; font-style: italic;}
|
||||
.green {color: #03ff39;}
|
||||
.red {color: #FF0000;}
|
||||
.pink {color: #FF69Bf;}
|
||||
.blue {color: #0000FF;}
|
||||
.nicegreen {color: #14a833;}
|
||||
.userlove {color: #FF1493; font-style: italic; font-weight: bold; text-shadow: 0 0 6px #ff6dbc;}
|
||||
.love {color: #ff006a; font-style: italic; text-shadow: 0 0 6px #ff6d6d;}
|
||||
.shadowling {color: #3b2769;}
|
||||
.cult {color: #960000;}
|
||||
|
||||
.cultitalic {color: #960000; font-style: italic;}
|
||||
.cultbold {color: #960000; font-style: italic; font-weight: bold;}
|
||||
.cultboldtalic {color: #960000; font-weight: bold; font-size: 185%;}
|
||||
|
||||
.cultlarge {color: #960000; font-weight: bold; font-size: 185%;}
|
||||
.narsie {color: #960000; font-weight: bold; font-size: 925%;}
|
||||
.narsiesmall {color: #960000; font-weight: bold; font-size: 370%;}
|
||||
.colossus {color: #7F282A; font-size: 310%;}
|
||||
.hierophant {color: #660099; font-weight: bold; font-style: italic;}
|
||||
.hierophant_warning {color: #660099; font-style: italic;}
|
||||
.purple {color: #5e2d79;}
|
||||
.holoparasite {color: #35333a;}
|
||||
|
||||
.revennotice {color: #1d2953;}
|
||||
.revenboldnotice {color: #1d2953; font-weight: bold;}
|
||||
.revenbignotice {color: #1d2953; font-weight: bold; font-size: 185%;}
|
||||
.revenminor {color: #823abb}
|
||||
.revenwarning {color: #760fbb; font-style: italic;}
|
||||
.revendanger {color: #760fbb; font-weight: bold; font-size: 185%;}
|
||||
.umbra {color: #5000A0;}
|
||||
.umbra_emphasis {color: #5000A0; font-weight: bold; font-style: italic;}
|
||||
.umbra_large {color: #5000A0; font-size: 185%; font-weight: bold; font-style: italic;}
|
||||
|
||||
.deconversion_message {color: #5000A0; font-size: 185%; font-style: italic;}
|
||||
|
||||
.brass {color: #BE8700;}
|
||||
.heavy_brass {color: #BE8700; font-weight: bold; font-style: italic;}
|
||||
.large_brass {color: #BE8700; font-size: 185%;}
|
||||
.big_brass {color: #BE8700; font-size: 185%; font-weight: bold; font-style: italic;}
|
||||
.ratvar {color: #BE8700; font-size: 370%; font-weight: bold; font-style: italic;}
|
||||
.alloy {color: #42474D;}
|
||||
.heavy_alloy {color: #42474D; font-weight: bold; font-style: italic;}
|
||||
.nezbere_large {color: #42474D; font-size: 185%; font-weight: bold; font-style: italic;}
|
||||
.nezbere {color: #42474D; font-weight: bold; font-style: italic;}
|
||||
.nezbere_small {color: #42474D;}
|
||||
.sevtug_large {color: #AF0AAF; font-size: 185%; font-weight: bold; font-style: italic;}
|
||||
.sevtug {color: #AF0AAF; font-weight: bold; font-style: italic;}
|
||||
.sevtug_small {color: #AF0AAF;}
|
||||
.inathneq_large {color: #1E8CE1; font-size: 185%; font-weight: bold; font-style: italic;}
|
||||
.inathneq {color: #1E8CE1; font-weight: bold; font-style: italic;}
|
||||
.inathneq_small {color: #1E8CE1;}
|
||||
.nzcrentr_large {color: #DAAA18; font-size: 185%; font-weight: bold; font-style: italic;}
|
||||
.nzcrentr {color: #DAAA18; font-weight: bold; font-style: italic;}
|
||||
.nzcrentr_small {color: #DAAA18;}
|
||||
.neovgre_large {color: #6E001A; font-size: 185%; font-weight: bold; font-style: italic;}
|
||||
.neovgre {color: #6E001A; font-weight: bold; font-style: italic;}
|
||||
.neovgre_small {color: #6E001A;}
|
||||
|
||||
.newscaster {color: #800000;}
|
||||
.ghostalert {color: #5c00e6; font-style: italic; font-weight: bold;}
|
||||
|
||||
.alien {color: #543354;}
|
||||
.noticealien {color: #00c000;}
|
||||
.alertalien {color: #00c000; font-weight: bold;}
|
||||
.changeling {color: #800080; font-style: italic;}
|
||||
|
||||
.spider {color: #4d004d; font-weight: bold; font-size: 185%;}
|
||||
|
||||
.interface {color: #330033;}
|
||||
|
||||
.sans {font-family: "Comic Sans MS", cursive, sans-serif;}
|
||||
.papyrus {font-family: "Papyrus", cursive, sans-serif;}
|
||||
.robot {font-family: "Courier New", cursive, sans-serif;}
|
||||
|
||||
.command_headset {font-weight: bold; font-size: 160%;}
|
||||
.small {font-size: 60%;}
|
||||
.big {font-size: 185%;}
|
||||
.reallybig {font-size: 245%;}
|
||||
.extremelybig {font-size: 310%;}
|
||||
.greentext {color: #00FF00; font-size: 185%;}
|
||||
.redtext {color: #FF0000; font-size: 185%;}
|
||||
.clown {color: #FF69Bf; font-size: 160%; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;}
|
||||
.his_grace {color: #15D512; font-family: "Courier New", cursive, sans-serif; font-style: italic;}
|
||||
.spooky {color: #FF6100;}
|
||||
.velvet {color: #660015; font-weight: bold; animation: velvet 5000ms infinite;}
|
||||
|
||||
.lethal {color: #bf3d3d; font-weight: bold;}
|
||||
.stun {color: #0f81bc; font-weight: bold;}
|
||||
.ion {color: #d084d6; font-weight: bold;}
|
||||
.xray {color: #32c025; font-weight: bold;}
|
||||
|
||||
@keyframes velvet {
|
||||
0% { color: #400020; }
|
||||
40% { color: #FF0000; }
|
||||
50% { color: #FF8888; }
|
||||
60% { color: #FF0000; }
|
||||
100% { color: #400020; }
|
||||
}
|
||||
|
||||
.hypnophrase {color: #202020; font-weight: bold; animation: hypnocolor 1500ms infinite;}
|
||||
@keyframes hypnocolor {
|
||||
0% { color: #202020; }
|
||||
25% { color: #4b02ac; }
|
||||
50% { color: #9f41f1; }
|
||||
75% { color: #541c9c; }
|
||||
100% { color: #7adbf3; }
|
||||
}
|
||||
|
||||
.phobia {color: #dd0000; font-weight: bold; animation: phobia 750ms infinite;}
|
||||
@keyframes phobia {
|
||||
0% { color: #f75a5a; }
|
||||
50% { color: #dd0000; }
|
||||
100% { color: #f75a5a; }
|
||||
}
|
||||
|
||||
|
||||
.icon {height: 1em; width: auto;}
|
||||
|
||||
.memo {color: #638500; text-align: center;}
|
||||
.memoedit {text-align: center; font-size: 125%;}
|
||||
.abductor {color: #800080; font-style: italic;}
|
||||
.mind_control {color: #A00D6F; font-size: 100%; font-weight: bold; font-style: italic;}
|
||||
.slime {color: #00CED1;}
|
||||
.drone {color: #848482;}
|
||||
.monkey {color: #975032;}
|
||||
.swarmer {color: #2C75FF;}
|
||||
.resonate {color: #298F85;}
|
||||
|
||||
.monkeyhive {color: #774704;}
|
||||
.monkeylead {color: #774704; font-size: 125%;}
|
||||
|
||||
.connectionClosed, .fatalError {background: red; color: white; padding: 5px;}
|
||||
.connectionClosed.restored {background: green;}
|
||||
.internal.boldnshit {color: #000099; font-weight: bold;}
|
||||
|
||||
/* HELPER CLASSES */
|
||||
.text-normal {font-weight: normal; font-style: normal;}
|
||||
.hidden {display: none; visibility: hidden;}
|
||||
@@ -1,159 +0,0 @@
|
||||
html, body {color: #E0E0E0;}
|
||||
body {
|
||||
background: #171717;
|
||||
font-color: #E0E0E0;
|
||||
scrollbar-face-color:#1A1A1A;
|
||||
scrollbar-track-color:#171717;
|
||||
scrollbar-highlight-color:#171717;
|
||||
}
|
||||
|
||||
a {color: #397ea5;}
|
||||
a.visited {color: #7c00e6;}
|
||||
a:visited {color: #7c00e6;}
|
||||
|
||||
#newMessages {
|
||||
background: #242424;
|
||||
color: #E0E0E0;
|
||||
}
|
||||
#newMessages:hover {background: #272727;}
|
||||
|
||||
#ping {background: #272727;}
|
||||
|
||||
#userBar .subCell {
|
||||
background: #272727;
|
||||
color: #E0E0E0;
|
||||
border-top: 1px solid #171717;
|
||||
}
|
||||
#userBar .subCell:hover {background: #272727;}
|
||||
#userBar .toggle {background: #272727;}
|
||||
|
||||
/* MOTD */
|
||||
.motd {color: #E0E0E0;}
|
||||
.motd h1, .motd h2, .motd h3, .motd h4, .motd h5, .motd h6 {color: #E0E0E0;}
|
||||
.motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover {color: #E0E0E0;}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {color: #E0E0E0;}
|
||||
h1.alert, h2.alert {color: #E0E0E0;}
|
||||
|
||||
.ooc {color: #cca300;}
|
||||
.looc {color: #d8b555;}
|
||||
.antagooc {color: #ce254f;}
|
||||
.adminobserverooc {color: #0099cc;}
|
||||
.adminooc {color: #3d5bc3;}
|
||||
|
||||
.admin {color: #5975da;}
|
||||
|
||||
.deadsay {color: #e2c1ff;}
|
||||
.radio {color: #1ecc43;}
|
||||
.sciradio {color: #c68cfa;}
|
||||
.comradio {color: #5177ff;}
|
||||
.secradio {color: #dd3535;}
|
||||
.medradio {color: #57b8f0;}
|
||||
.engradio {color: #f37746;}
|
||||
.suppradio {color: #b88646;}
|
||||
.servradio {color: #6ca729;}
|
||||
.syndradio {color: #8f4a4b;}
|
||||
.centcomradio {color: #2681a5;}
|
||||
.aiprivradio {color: #d65d95;}
|
||||
.redteamradio {color: #ff4444;}
|
||||
.blueteamradio {color: #3434fd;}
|
||||
|
||||
.alert {color: #d82020;}
|
||||
h1.alert, h2.alert {color: #99aab5;}
|
||||
|
||||
.attack {color: #e01c1c;}
|
||||
.disarm {color: #b42525;}
|
||||
.passive {color: #a00f0f;}
|
||||
|
||||
.userdanger {color: #c51e1e;}
|
||||
.danger {color: #c51e1e;}
|
||||
.warning {color: #c51e1e;}
|
||||
.alertwarning {color: #c51e1e;}
|
||||
.boldwarning {color: #c51e1e;}
|
||||
.announce {color: #c51e1e;}
|
||||
.boldannounce {color: #c51e1e;}
|
||||
.greenannounce {color: #059223;}
|
||||
.info {color: #6685f5;}
|
||||
.notice {color: #6685f5;}
|
||||
.boldnotice {color: #6685f5;}
|
||||
.adminnotice {color: #6685f5;}
|
||||
.adminhelp {color: #ff0000;}
|
||||
.unconscious {color: #E0E0E0;}
|
||||
.red {color: #FF0000;}
|
||||
.pink {color: #ff70c1;}
|
||||
.blue {color: #215cff;}
|
||||
.green {color: #059223;}
|
||||
.nicegreen {color: #059223;}
|
||||
.userlove {color: #ff42a6; text-shadow: 0 0 6px #82365e;}
|
||||
.love {color: #ff4591; text-shadow: 0 0 6px #994449;}
|
||||
.shadowling {color: #8e8a99;}
|
||||
.cult {color: #aa1c1c;}
|
||||
|
||||
.cultitalic {color: #aa1c1c;}
|
||||
.cultbold {color: #aa1c1c;}
|
||||
.cultboldtalic {color: #aa1c1c;}
|
||||
|
||||
.cultlarge {color: #aa1c1c;}
|
||||
.narsie {color: #aa1c1c;}
|
||||
.narsiesmall {color: #aa1c1c;}
|
||||
.hierophant {color: #b441ee;}
|
||||
.hierophant_warning {color: #c56bf1;}
|
||||
.purple {color: #9956d3;}
|
||||
.holoparasite {color: #88809c;}
|
||||
|
||||
.revennotice {color: #3645aa;}
|
||||
.revenboldnotice {color: #3645aa;}
|
||||
.revenbignotice {color: #3645aa;}
|
||||
.revenminor {color: #823ddd;}
|
||||
.revenwarning {color: #8911d9;}
|
||||
.revendanger {color: #8911d9;}
|
||||
.umbra {color: #7c00e6;}
|
||||
.umbra_emphasis {color: #7c00e6;}
|
||||
.umbra_large {color: #7c00e6;}
|
||||
|
||||
.deconversion_message {color: #a947ff;}
|
||||
|
||||
.alloy {color: #545b64;}
|
||||
.heavy_alloy {color: #545b64;}
|
||||
.nezbere_large {color: #545b64;}
|
||||
.nezbere {color: #545b64;}
|
||||
.nezbere_small {color: #545b64;}
|
||||
.inathneq_large {color: #1d7dc7;}
|
||||
.inathneq {color: #1d7dc7;}
|
||||
.inathneq_small {color: #1d7dc7;}
|
||||
.neovgre_large {color: #7c0622;}
|
||||
.neovgre {color: #7c0622;}
|
||||
.neovgre_small {color: #7c0622;}
|
||||
|
||||
.newscaster {color: #c05d5d;}
|
||||
.ghostalert {color: #6600ff;}
|
||||
|
||||
.alien {color: #855d85;}
|
||||
.noticealien {color: #059223;}
|
||||
.alertalien {color: #059223;}
|
||||
.changeling {color: #059223;}
|
||||
|
||||
.spider {color: #8800ff;}
|
||||
|
||||
.interface {color: #750e75;}
|
||||
|
||||
.greentext {color: #059223;}
|
||||
.redtext {color: #c51e1e;}
|
||||
.clown {color: #ff70c1;}
|
||||
.velvet {color: #660015;}
|
||||
@keyframes velvet {
|
||||
0% { color: #890020; }
|
||||
40% { color: #c51e1e; }
|
||||
50% { color: #FF8888; }
|
||||
60% { color: #c51e1e; }
|
||||
100% { color: #890020; }
|
||||
}
|
||||
|
||||
.abductor {color: #c204c2;}
|
||||
.mind_control {color: #df3da9;}
|
||||
.drone {color: #979795;}
|
||||
|
||||
.monkeyhive {color: #a56408;}
|
||||
.monkeylead {color: #af6805;}
|
||||
|
||||
.internal.boldnshit {color: #3d5bc3;}
|
||||
@@ -1,14 +0,0 @@
|
||||
body {background: #F1F1F1;}
|
||||
|
||||
#newMessages {background: #ddd;}
|
||||
#ping {background: #ddd;}
|
||||
|
||||
#userBar .subCell {background: #ddd;}
|
||||
|
||||
/* POPUPS */
|
||||
.popup {background: #ddd;}
|
||||
.popup .head {color: #ddd;}
|
||||
.popup input[type=submit] {color: #ddd;}
|
||||
|
||||
/* ADMIN CONTEXT MENU */
|
||||
.contextMenu {background-color: #ddd;}
|
||||
@@ -1,58 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Chat</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link rel="stylesheet" type="text/css" href="font-awesome.css" />
|
||||
<link rel="stylesheet" type="text/css" href="browserOutput.css" />
|
||||
<link rel="stylesheet" type="text/css" href="spritesheet_chat.css" />
|
||||
<link rel="stylesheet" type="text/css" id="colorPresetLink"/>
|
||||
<script type="text/javascript" src="jquery.min.js"></script>
|
||||
<script type="text/javascript" src="json2.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="loading">
|
||||
<i class="fas fa-spinner fa-2x"></i>
|
||||
<div>
|
||||
Loading...<br><br>
|
||||
If this takes longer than 30 seconds, it will automatically reload a maximum of 5 times.<br>
|
||||
If it <b>still</b> doesn't work, use the bug report button at the top right of the window.
|
||||
</div>
|
||||
</div>
|
||||
<div id="messages">
|
||||
|
||||
</div>
|
||||
<div id="userBar" style="display: none;">
|
||||
<div id="ping">
|
||||
<i class="fas fa-circle" id="pingDot"></i>
|
||||
<span class="ms" id="pingMs">--ms</span>
|
||||
</div>
|
||||
<div id="darkmodething">
|
||||
<a href="#" class="subCell toggle" id="changeColorPreset" title="Change color preset"><i class="fas fa-eye"></i></a>
|
||||
</div>
|
||||
<div id="audio">
|
||||
<a href="#" class="subCell toggle" id="toggleAudio" title="Audio"><i class="fas fa-volume-up"></i></a>
|
||||
</div>
|
||||
<div id="options">
|
||||
<a href="#" class="subCell toggle" id="toggleOptions" title="Options"><i class="fas fa-cog"></i></a>
|
||||
</div>
|
||||
<div class="sub" id="subOptions">
|
||||
<a href="#" class="subCell decreaseFont topCell" id="decreaseFont"><span>Decrease font size</span> <i class="fas fa-font"></i></a>
|
||||
<a href="#" class="subCell increaseFont" id="increaseFont"><span>Increase font size</span> <i class="fas fa-font"></i></a>
|
||||
<a href="#" class="subCell decreaseLineHeight" id="decreaseLineHeight"><span>Decrease line height</span> <i class="fas fa-text-height"></i></a>
|
||||
<a href="#" class="subCell increaseLineHeight" id="increaseLineHeight"><span>Increase line height</span> <i class="fas fa-text-height"></i></a>
|
||||
<a href="#" class="subCell togglePing" id="togglePing"><span>Toggle ping display</span> <i class="fas fa-circle"></i></a>
|
||||
<a href="#" class="subCell highlightTerm" id="highlightTerm"><span>Highlight string</span> <i class="fas fa-tag"></i></a>
|
||||
<a href="#" class="subCell saveLog" id="saveLog"><span>Save chat log</span> <i class="fas fa-save"></i></a>
|
||||
<a href="#" class="subCell toggleCombine" id="toggleCombine"><span>Toggle line combining</span> <i class="fas fa-filter"></i></a>
|
||||
<a href="#" class="subCell clearMessages" id="clearMessages"><span>Clear all messages</span> <i class="fas fa-eraser"></i></a>
|
||||
</div>
|
||||
<div class="sub" id="subAudio">
|
||||
<span class="subCell topCell" id="musicVolumeSpan"><input type="range" class="hidden" id="musicVolume"><span id="musicVolumeText">Admin music volume</span><i class="fas fa-music"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<audio class="hidden" id="adminMusic" autoplay></audio>
|
||||
<script type="text/javascript" src="browserOutput.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(t){return 10>t?"0"+t:t}function this_value(){return this.valueOf()}function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var r,n,o,u,f,a=gap,i=e[t];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(t)),"function"==typeof rep&&(i=rep.call(e,t,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,f=[],"[object Array]"===Object.prototype.toString.apply(i)){for(u=i.length,r=0;u>r;r+=1)f[r]=str(r,i)||"null";return o=0===f.length?"[]":gap?"[\n"+gap+f.join(",\n"+gap)+"\n"+a+"]":"["+f.join(",")+"]",gap=a,o}if(rep&&"object"==typeof rep)for(u=rep.length,r=0;u>r;r+=1)"string"==typeof rep[r]&&(n=rep[r],o=str(n,i),o&&f.push(quote(n)+(gap?": ":":")+o));else for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o=str(n,i),o&&f.push(quote(n)+(gap?": ":":")+o));return o=0===f.length?"{}":gap?"{\n"+gap+f.join(",\n"+gap)+"\n"+a+"}":"{"+f.join(",")+"}",gap=a,o}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;r>n;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var r,n,o=t[e];if(o&&"object"==typeof o)for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n=walk(o,r),void 0!==n?o[r]=n:delete o[r]);return reviver.call(t,e,o)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();
|
||||
Reference in New Issue
Block a user