GOONCHAT IS DEAD! LONG LIVE THE KING!

This commit is contained in:
Letter N
2020-08-18 10:51:13 +08:00
parent 90cb13f6af
commit 83df9159de
19 changed files with 737 additions and 4837 deletions

View File

@@ -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

View File

@@ -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;}

View File

@@ -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;}

View File

@@ -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;}

View File

@@ -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

View File

@@ -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")})}();

View File

@@ -71,7 +71,7 @@
return
var/static/issue_template = file2text(".github/ISSUE_TEMPLATE.md")
var/servername = CONFIG_GET(string/servername)
var/url_params = "Reporting client version: [byond_version]\n\n[issue_template]"
var/url_params = "Reporting client version: [byond_version].[byond_build]\n\n[issue_template]"
if(GLOB.round_id || servername)
url_params = "Issue reported from [GLOB.round_id ? " Round ID: [GLOB.round_id][servername ? " ([servername])" : ""]" : servername]\n\n[url_params]"
DIRECT_OUTPUT(src, link("[githuburl]/issues/new?body=[url_encode(url_params)]"))
@@ -79,151 +79,13 @@
to_chat(src, "<span class='danger'>The Github URL is not set in the server configuration.</span>")
return
/client/verb/hotkeys_help()
set name = "hotkeys-help"
set category = "OOC"
var/adminhotkeys = {"<font color='purple'>
Admin:
\tF3 = asay
\tF5 = Aghost (admin-ghost)
\tF6 = player-panel
\tF7 = Buildmode
\tF8 = Invisimin
\tCtrl+F8 = Stealthmin
</font>"}
mob.hotkey_help()
if(holder)
to_chat(src, adminhotkeys)
/client/verb/changelog()
set name = "Changelog"
set category = "OOC"
var/datum/asset/changelog = get_asset_datum(/datum/asset/simple/changelog)
var/datum/asset/simple/namespaced/changelog = get_asset_datum(/datum/asset/simple/namespaced/changelog)
changelog.send(src)
src << browse('html/changelog.html', "window=changes;size=675x650")
src << browse(changelog.get_htmlloader("changelog.html"), "window=changes;size=675x650")
if(prefs.lastchangelog != GLOB.changelog_hash)
prefs.lastchangelog = GLOB.changelog_hash
prefs.save_preferences()
winset(src, "infowindow.changelog", "font-style=;")
/mob/proc/hotkey_help()
var/hotkey_mode = {"<font color='purple'>
Hotkey-Mode: (hotkey-mode must be on)
\tTAB = toggle hotkey-mode
\ta = left
\ts = down
\td = right
\tw = up
\tq = drop
\te = equip
\tr = throw
\tm = me
\tt = say
\to = OOC
\tb = resist
\tv = rest
\t<B></B>h = stop pulling
\tx = swap-hand
\tz = activate held object (or y)
\tShift+e = Put held item into belt or take out most recent item added to belt.
\tShift+b = Put held item into backpack or take out most recent item added to backpack.
\tf = cycle-intents-left
\tg = cycle-intents-right
\t1 = help-intent
\t2 = disarm-intent
\t3 = grab-intent
\t4 = harm-intent
\tNumpad = Body target selection (Press 8 repeatedly for Head->Eyes->Mouth)
\tAlt(HOLD) = Alter movement intent
</font>"}
var/other = {"<font color='purple'>
Any-Mode: (hotkey doesn't need to be on)
\tCtrl+a = left
\tCtrl+s = down
\tCtrl+d = right
\tCtrl+w = up
\tCtrl+q = drop
\tCtrl+e = equip
\tCtrl+r = throw
\tCtrl+b = resist
\tCtrl+h = stop pulling
\tCtrl+o = OOC
\tCtrl+x = swap-hand
\tCtrl+z = activate held object (or Ctrl+y)
\tCtrl+f = cycle-intents-left
\tCtrl+g = cycle-intents-right
\tCtrl+1 = help-intent
\tCtrl+2 = disarm-intent
\tCtrl+3 = grab-intent
\tCtrl+4 = harm-intent
\tCtrl+'+/-' OR
\tShift+Mousewheel = Ghost zoom in/out
\tDEL = stop pulling
\tINS = cycle-intents-right
\tHOME = drop
\tPGUP = swap-hand
\tPGDN = activate held object
\tEND = throw
\tCtrl+Numpad = Body target selection (Press 8 repeatedly for Head->Eyes->Mouth)
</font>"}
to_chat(src, hotkey_mode)
to_chat(src, other)
/mob/living/silicon/robot/hotkey_help()
//h = talk-wheel has a nonsense tag in it because \th is an escape sequence in BYOND.
var/hotkey_mode = {"<font color='purple'>
Hotkey-Mode: (hotkey-mode must be on)
\tTAB = toggle hotkey-mode
\ta = left
\ts = down
\td = right
\tw = up
\tq = unequip active module
\tv = rest
\t<B></B>h = stop pulling
\tm = me
\tt = say
\to = OOC
\tx = cycle active modules
\tb = resist
\tz = activate held object (or y)
\tf = cycle-intents-left
\tg = cycle-intents-right
\t1 = activate module 1
\t2 = activate module 2
\t3 = activate module 3
\t4 = toggle intents
</font>"}
var/other = {"<font color='purple'>
Any-Mode: (hotkey doesn't need to be on)
\tCtrl+a = left
\tCtrl+s = down
\tCtrl+d = right
\tCtrl+w = up
\tCtrl+q = unequip active module
\tCtrl+x = cycle active modules
\tCtrl+b = resist
\tCtrl+h = stop pulling
\tCtrl+o = OOC
\tCtrl+z = activate held object (or Ctrl+y)
\tCtrl+f = cycle-intents-left
\tCtrl+g = cycle-intents-right
\tCtrl+1 = activate module 1
\tCtrl+2 = activate module 2
\tCtrl+3 = activate module 3
\tCtrl+4 = toggle intents
\tDEL = stop pulling
\tINS = toggle intents
\tPGUP = cycle active modules
\tPGDN = activate held object
</font>"}
to_chat(src, hotkey_mode)
to_chat(src, other)

View File

@@ -63,7 +63,6 @@ GLOBAL_LIST_EMPTY(menulist)
return
M.Set_checked(src, verbpath)
/datum/verbs/menu/Icon/Load_checked(client/C) //So we can be lazy, we invoke the "checked" menu item on menu load.
var/procpath/verbpath = Get_checked(C)
if (!verbpath || !(verbpath in typesof("[type]/verb")))
@@ -115,4 +114,3 @@ GLOBAL_LIST_EMPTY(menulist)
/datum/verbs/menu/Icon/Scaling/verb/BL()
set name = "@.winset \"mapwindow.map.zoom-mode=blur\""
set desc = "Bilinear"

View File

@@ -1,320 +1,334 @@
macro "default"
menu "menu"
elem
name = "&File"
command = ""
saved-params = "is-checked"
elem
name = "&Quick screenshot\tF2"
command = ".screenshot auto"
category = "&File"
saved-params = "is-checked"
elem
name = "&Save screenshot as...\tShift+F2"
command = ".screenshot"
category = "&File"
saved-params = "is-checked"
elem
name = ""
command = ""
category = "&File"
saved-params = "is-checked"
elem "reconnectbutton"
name = "&Reconnect"
command = ".reconnect"
category = "&File"
saved-params = "is-checked"
elem
name = "&Quit\tAlt-F4"
command = ".quit"
category = "&File"
saved-params = "is-checked"
elem
name = "&Help"
command = ""
saved-params = "is-checked"
elem
name = "&Admin Help\tF1"
command = "adminhelp"
category = "&Help"
saved-params = "is-checked"
elem
name = "&Hotkeys"
command = "hotkeys-help"
category = "&Help"
saved-params = "is-checked"
window "mainwindow"
elem "mainwindow"
type = MAIN
pos = 0,0
size = 640x440
anchor1 = none
anchor2 = none
background-color = #242424
is-default = true
saved-params = "pos;size;is-minimized;is-maximized"
icon = 'icons\\ss13_64.png'
macro = "default"
menu = "menu"
elem "split"
type = CHILD
pos = 0,0
size = 637x440
anchor1 = 0,0
anchor2 = 100,100
background-color = #272727
saved-params = "splitter"
left = "mapwindow"
right = "infowindow"
is-vert = true
splitter = 75
elem "asset_cache_browser"
type = BROWSER
pos = 0,0
size = 200x200
anchor1 = none
anchor2 = none
background-color = #272727
is-visible = false
auto-format = false
saved-params = ""
elem "tooltip"
type = BROWSER
pos = 0,0
size = 999x999
anchor1 = none
anchor2 = none
background-color = #272727
is-visible = false
saved-params = ""
window "mapwindow"
elem "mapwindow"
type = MAIN
pos = 418,0
size = 1024x1024
anchor1 = none
anchor2 = none
background-color = none
saved-params = "pos;size;is-minimized;is-maximized"
statusbar = false
is-pane = true
outer-size = 684x617
inner-size = 662x561
elem "map"
type = MAP
pos = 0,0
size = 1024x1024
anchor1 = 0,0
anchor2 = 100,100
font-family = "Arial"
font-size = 7
is-default = true
saved-params = "icon-size"
zoom-mode = distort
style = ".center { text-align: center; }\n.maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; }\n.command_headset { font-weight: bold;\tfont-size: 8px; } .small { font-size: 6px; }\n.big { font-size: 8px; }\n.reallybig { font-size: 8px; }\n.extremelybig { font-size: 8px; }\n.greentext { color: #00ff00; font-size: 7px; }\n.redtext { color: #ff0000; font-size: 7px; }\n.clown { color: #ff69bf; font-size: 7px; font-weight: bold; }\n.his_grace { color: #15d512; }\n.hypnophrase { color: #0d0d0d; font-weight: bold; }\n.yell { font-weight: bold; }\n.italics { font-size: 6px; }"
window "infowindow"
elem "infowindow"
type = MAIN
pos = 0,0
size = 640x480
anchor1 = none
anchor2 = none
background-color = #242424
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
elem "info"
type = CHILD
pos = 0,30
size = 640x445
anchor1 = 0,0
anchor2 = 100,100
background-color = #272727
saved-params = "splitter"
left = "statwindow"
right = "outputwindow"
is-vert = false
elem "changelog"
type = BUTTON
pos = 16,5
size = 104x20
anchor1 = 3,0
anchor2 = 19,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "Changelog"
command = "changelog"
elem "rules"
type = BUTTON
pos = 120,5
size = 100x20
anchor1 = 19,0
anchor2 = 34,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "Rules"
command = "rules"
elem "wiki"
type = BUTTON
pos = 220,5
size = 100x20
anchor1 = 34,0
anchor2 = 50,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "Wiki"
command = "wiki"
elem "forum"
type = BUTTON
pos = 320,5
size = 100x20
anchor1 = 50,0
anchor2 = 66,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "Forum"
command = "forum"
elem "github"
type = BUTTON
pos = 420,5
size = 100x20
anchor1 = 66,0
anchor2 = 81,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "GitHub"
command = "github"
elem "report-issue"
type = BUTTON
pos = 520,5
size = 100x20
anchor1 = 81,0
anchor2 = 97,0
font-size = 8
text-color = #e0e0e0
background-color = #a92c2c
saved-params = "is-checked"
text = "Report Issue"
command = "report-issue"
window "outputwindow"
elem "outputwindow"
type = MAIN
pos = 0,0
size = 640x480
anchor1 = none
anchor2 = none
background-color = #272727
saved-params = "pos;size;is-minimized;is-maximized"
titlebar = false
statusbar = false
can-close = false
can-minimize = false
can-resize = false
is-pane = true
elem "input"
type = INPUT
pos = 2,460
size = 595x20
anchor1 = 0,100
anchor2 = 100,100
background-color = #d3b5b5
is-default = true
border = sunken
saved-params = "command"
elem "say"
type = BUTTON
pos = 600,460
size = 37x20
anchor1 = 100,100
anchor2 = none
text-color = #e0e0e0
background-color = #272727
saved-params = "is-checked"
text = "Chat"
command = ".winset \"say.is-checked=true ? input.command=\"!say \\\"\" : input.command=\""
is-flat = true
button-type = pushbox
elem "browseroutput"
type = BROWSER
pos = 0,0
size = 640x456
anchor1 = 0,0
anchor2 = 100,100
background-color = #272727
is-visible = false
is-disabled = true
saved-params = ""
auto-format = false
elem "output"
type = OUTPUT
pos = 0,0
size = 640x456
anchor1 = 0,0
anchor2 = 100,100
text-color = #e0e0e0
background-color = #272727
is-default = true
saved-params = ""
window "statwindow"
elem "statwindow"
type = MAIN
pos = 281,0
size = 640x480
anchor1 = none
anchor2 = none
background-color = #242424
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
elem "stat"
type = INFO
pos = 0,0
size = 640x480
anchor1 = 0,0
anchor2 = 100,100
text-color = #e0e0e0
background-color = #272727
is-default = true
saved-params = ""
tab-text-color = #e0e0e0
tab-background-color = #242424
prefix-color = #e0e0e0
suffix-color = #e0e0e0
window "preferences_window"
elem "preferences_window"
type = MAIN
pos = 372,0
size = 1280x1000
anchor1 = none
anchor2 = none
is-visible = false
saved-params = "pos;size;is-minimized;is-maximized"
statusbar = false
elem "preferences_browser"
type = BROWSER
pos = 0,0
size = 960x1000
anchor1 = 0,0
anchor2 = 75,100
saved-params = ""
elem "character_preview_map"
type = MAP
pos = 960,0
size = 320x1000
anchor1 = 75,0
anchor2 = 100,100
right-click = true
saved-params = "zoom;letterbox;zoom-mode"
macro "default"
menu "menu"
elem
name = "&File"
command = ""
saved-params = "is-checked"
elem
name = "&Quick screenshot\tF2"
command = ".screenshot auto"
category = "&File"
saved-params = "is-checked"
elem
name = "&Save screenshot as...\tShift+F2"
command = ".screenshot"
category = "&File"
saved-params = "is-checked"
elem
name = ""
command = ""
category = "&File"
saved-params = "is-checked"
elem "reconnectbutton"
name = "&Reconnect"
command = ".reconnect"
category = "&File"
saved-params = "is-checked"
elem
name = "&Quit\tAlt-F4"
command = ".quit"
category = "&File"
saved-params = "is-checked"
elem
name = "&Help"
command = ""
saved-params = "is-checked"
elem
name = "&Admin Help\tF1"
command = "adminhelp"
category = "&Help"
saved-params = "is-checked"
elem
name = "&Hotkeys"
command = "hotkeys-help"
category = "&Help"
saved-params = "is-checked"
window "mainwindow"
elem "mainwindow"
type = MAIN
pos = 0,0
size = 640x440
anchor1 = none
anchor2 = none
background-color = #242424
is-default = true
saved-params = "pos;size;is-minimized;is-maximized"
icon = 'icons\\ss13_64.png'
macro = "default"
menu = "menu"
elem "split"
type = CHILD
pos = 3,0
size = 634x417
anchor1 = 0,0
anchor2 = 100,100
background-color = #272727
saved-params = "splitter"
left = "mapwindow"
right = "infowindow"
is-vert = true
elem "input"
type = INPUT
pos = 3,420
size = 517x20
anchor1 = 0,100
anchor2 = 100,100
background-color = #d3b5b5
is-default = true
border = sunken
saved-params = "command"
elem "saybutton"
type = BUTTON
pos = 600,420
size = 40x20
anchor1 = 100,100
anchor2 = none
text-color = #e0e0e0
background-color = #272727
saved-params = "is-checked"
text = "Chat"
command = ".winset \"saybutton.is-checked=true ? input.command=\"!say \\\"\" : input.command=\"\"saybutton.is-checked=true ? mebutton.is-checked=false\"\"saybutton.is-checked=true ? oocbutton.is-checked=false\""
button-type = pushbox
elem "oocbutton"
type = BUTTON
pos = 520,420
size = 40x20
anchor1 = 100,100
anchor2 = none
text-color = #e0e0e0
background-color = #272727
saved-params = "is-checked"
text = "OOC"
command = ".winset \"oocbutton.is-checked=true ? input.command=\"!ooc \\\"\" : input.command=\"\"oocbutton.is-checked=true ? mebutton.is-checked=false\"\"oocbutton.is-checked=true ? saybutton.is-checked=false\""
button-type = pushbox
elem "mebutton"
type = BUTTON
pos = 560,420
size = 40x20
anchor1 = 100,100
anchor2 = none
text-color = #e0e0e0
background-color = #272727
saved-params = "is-checked"
text = "Me"
command = ".winset \"mebutton.is-checked=true ? input.command=\"!me \\\"\" : input.command=\"\"mebutton.is-checked=true ? saybutton.is-checked=false\"\"mebutton.is-checked=true ? oocbutton.is-checked=false\""
button-type = pushbox
elem "asset_cache_browser"
type = BROWSER
pos = 0,0
size = 200x200
anchor1 = none
anchor2 = none
is-visible = false
auto-format = false
saved-params = ""
elem "tooltip"
type = BROWSER
pos = 0,0
size = 999x999
anchor1 = none
anchor2 = none
is-visible = false
saved-params = ""
window "mapwindow"
elem "mapwindow"
type = MAIN
pos = 0,0
size = 640x480
anchor1 = none
anchor2 = none
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
elem "map"
type = MAP
pos = 0,0
size = 640x480
anchor1 = 0,0
anchor2 = 100,100
font-family = "Arial"
font-size = 7
text-color = none
is-default = true
style=".center { text-align: center; } .maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; } .command_headset { font-weight: bold; font-size: 8px; } .small { font-size: 6px; } .big { font-size: 8px; } .reallybig { font-size: 8px; } .extremelybig { font-size: 8px; } .greentext { color: #00FF00; font-size: 7px; } .redtext { color: #FF0000; font-size: 7px; } .clown { color: #FF69Bf; font-size: 7px; font-weight: bold; } .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; } .italics { font-size: 6px; }"
window "infowindow"
elem "infowindow"
type = MAIN
pos = 0,0
size = 640x480
anchor1 = none
anchor2 = none
background-color = #242424
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
elem "info"
type = CHILD
pos = 0,30
size = 640x445
anchor1 = 0,0
anchor2 = 100,100
background-color = #272727
saved-params = "splitter"
left = "statwindow"
right = "outputwindow"
is-vert = false
elem "changelog"
type = BUTTON
pos = 16,5
size = 104x20
anchor1 = 3,0
anchor2 = 19,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "Changelog"
command = "changelog"
elem "rules"
type = BUTTON
pos = 120,5
size = 100x20
anchor1 = 19,0
anchor2 = 34,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "Rules"
command = "rules"
elem "wiki"
type = BUTTON
pos = 220,5
size = 100x20
anchor1 = 34,0
anchor2 = 50,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "Wiki"
command = "wiki"
elem "forum"
type = BUTTON
pos = 320,5
size = 100x20
anchor1 = 50,0
anchor2 = 66,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "Forum"
command = "forum"
elem "github"
type = BUTTON
pos = 420,5
size = 100x20
anchor1 = 66,0
anchor2 = 81,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "Github"
command = "github"
elem "report-issue"
type = BUTTON
pos = 520,5
size = 100x20
anchor1 = 81,0
anchor2 = 97,0
text-color = #e0e0e0
background-color = #40628a
saved-params = "is-checked"
text = "Report Issue"
command = "report-issue"
window "outputwindow"
elem "outputwindow"
type = MAIN
pos = 0,0
size = 640x480
anchor1 = none
anchor2 = none
background-color = #272727
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
elem "browseroutput"
type = BROWSER
pos = 0,0
size = 640x480
anchor1 = 0,0
anchor2 = 100,100
background-color = #272727
is-visible = false
is-disabled = true
saved-params = ""
auto-format = false
elem "output"
type = OUTPUT
pos = 0,0
size = 640x480
anchor1 = 0,0
anchor2 = 100,100
text-color = #e0e0e0
background-color = #272727
is-default = true
saved-params = ""
window "popupwindow"
elem "popupwindow"
type = MAIN
pos = 281,0
size = 120x120
anchor1 = none
anchor2 = none
background-color = none
is-visible = false
saved-params = "pos;size;is-minimized;is-maximized"
statusbar = false
can-resize = false
window "preferences_window"
elem "preferences_window"
type = MAIN
pos = 281,0
size = 1280x1000
anchor1 = none
anchor2 = none
is-visible = false
saved-params = "pos;size;is-minimized;is-maximized"
statusbar = false
elem "preferences_browser"
type = BROWSER
pos = 0,0
size = 960x1000
anchor1 = 0,0
anchor2 = 75,100
saved-params = ""
elem "character_preview_map"
type = MAP
pos = 960,0
size = 320x1000
anchor1 = 75,0
anchor2 = 100,100
right-click = true
saved-params = "zoom;letterbox;zoom-mode"
window "statwindow"
elem "statwindow"
type = MAIN
pos = 281,0
size = 640x480
anchor1 = none
anchor2 = none
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
elem "stat"
type = INFO
pos = 0,0
size = 640x480
anchor1 = 0,0
anchor2 = 100,100
is-default = true
saved-params = ""

View File

@@ -2,7 +2,7 @@
/// !!!!!!!!!!HEY LISTEN!!!!!!!!!!!!!!!!!!!!!!!!
/// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// If you modify this file you ALSO need to modify code/modules/goonchat/browserAssets/browserOutput.css
// If you modify this file you ALSO need to modify code/modules/goonchat/browserAssets/browserOutput.css and browserOutput_white.css
// BUT you have to use PX font sizes with are on a x8 scale of these font sizes
// Sample font-size: DM: 8 CSS: 64px
@@ -30,14 +30,15 @@ em {font-style: normal; font-weight: bold;}
.adminooc {color: #700038; font-weight: bold;}
.adminobserver {color: #996600; font-weight: bold;}
.adminsay {color: #FF4500; font-weight: bold;}
.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 {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;}
@@ -50,8 +51,8 @@ em {font-style: normal; font-weight: bold;}
.syndradio {color: #6d3f40;}
.centcomradio {color: #686868;}
.aiprivradio {color: #ff00ff;}
.redteamradio {color: #ff0000;}
.blueteamradio {color: #0000ff;}
.redteamradio {color: #ff0000;}
.blueteamradio {color: #0000ff;}
.yell { font-weight: bold;}
@@ -65,13 +66,13 @@ h1.alert, h2.alert {color: #000000;}
.disarm {color: #990000;}
.passive {color: #660000;}
.userdanger {color: #ff0000; font-weight: bold; font-size: 3;}
.userdanger {color: #ff0000; font-weight: bold; font-size: 3;}
.danger {color: #ff0000; font-weight: bold;}
.tinydanger {color: #ff0000; font-size: 85%;}
.smalldanger {color: #ff0000; font-size: 90%;}
.warning {color: #ff0000; font-style: italic;}
.boldwarning {color: #ff0000; font-style: italic; font-weight: bold}
.announce {color: #228b22; font-weight: bold;}
.announce {color: #228b22; font-weight: bold;}
.boldannounce {color: #ff0000; font-weight: bold;}
.greenannounce {color: #00ff00; font-weight: bold;}
.rose {color: #ff5050;}
@@ -81,29 +82,31 @@ h1.alert, h2.alert {color: #000000;}
.smallnotice {color: #000099; font-size: 90%;}
.smallnoticeital {color: #000099; font-style: italic; font-size: 90%;}
.boldnotice {color: #000099; font-weight: bold;}
.hear {color: #000099; font-style: italic;}
.adminnotice {color: #0000ff;}
.adminhelp {color: #ff0000; font-weight: bold;}
.adminhelp {color: #ff0000; font-weight: bold;}
.unconscious {color: #0000ff; font-weight: bold;}
.suicide {color: #ff5050; font-style: italic;}
.green {color: #03ff39;}
.nicegreen {color: #14a833;}
.nicegreen {color: #14a833;}
.shadowling {color: #3b2769;}
.cult {color: #960000;}
.cultlarge {color: #960000; font-weight: bold; font-size: 3;}
.narsie {color: #960000; font-weight: bold; font-size: 15;}
.narsiesmall {color: #960000; font-weight: bold; font-size: 6;}
.colossus {color: #7F282A; font-size: 5;}
.hierophant {color: #660099; font-weight: bold; font-style: italic;}
.hierophant_warning {color: #660099; font-style: italic;}
.cultlarge {color: #960000; font-weight: bold; font-size: 3;}
.narsie {color: #960000; font-weight: bold; font-size: 15;}
.narsiesmall {color: #960000; font-weight: bold; font-size: 6;}
.colossus {color: #7F282A; font-size: 5;}
.hierophant {color: #660099; font-weight: bold; font-style: italic;}
.hierophant_warning {color: #660099; font-style: italic;}
.purple {color: #5e2d79;}
.holoparasite {color: #35333a;}
.bounty {color: #ab6613; font-style: italic;}
.revennotice {color: #1d2953;}
.revenboldnotice {color: #1d2953; font-weight: bold;}
.revenbignotice {color: #1d2953; font-weight: bold; font-size: 3;}
.revenbignotice {color: #1d2953; font-weight: bold; font-size: 3;}
.revenminor {color: #823abb}
.revenwarning {color: #760fbb; font-style: italic;}
.revendanger {color: #760fbb; font-weight: bold; font-size: 3;}
.revendanger {color: #760fbb; font-weight: bold; font-size: 3;}
.umbra {color: #5000A0;}
.umbra_emphasis {color: #5000A0; font-weight: bold; font-style: italic;}
.umbra_large {color: #5000A0; font-size: 3; font-weight: bold; font-style: italic;}
@@ -133,8 +136,7 @@ h1.alert, h2.alert {color: #000000;}
.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;}
.ghostalert {color: #5c00e6; font-style: italic; font-weight: bold;}
.alien {color: #543354;}
.noticealien {color: #00c000;}
@@ -149,7 +151,7 @@ h1.alert, h2.alert {color: #000000;}
.papyrus {font-family: "Papyrus", cursive, sans-serif;}
.robot {font-family: "Courier New", cursive, sans-serif;}
.command_headset {font-weight: bold; font-size: 3;}
.command_headset {font-weight: bold; font-size: 3;}
.small {font-size: 1;}
.big {font-size: 3;}
.reallybig {font-size: 4;}
@@ -157,9 +159,9 @@ h1.alert, h2.alert {color: #000000;}
.greentext {color: #00FF00; font-size: 3;}
.redtext {color: #FF0000; font-size: 3;}
.yellowtext {color: #FFCC00; font-size: 3;}
.clown {color: #FF69Bf; font-size: 3; 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: #FF9100;}
.clown {color: #FF69Bf; font-size: 3; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;}
.singing {font-family: "Trebuchet MS", cursive, sans-serif; font-style: italic;}
.his_grace {color: #15D512; font-family: "Courier New", cursive, sans-serif; font-style: italic;}
.velvet {color: #660015; font-weight: bold; animation: velvet 5000ms infinite;}
@keyframes velvet {
0% { color: #400020; }
@@ -169,28 +171,29 @@ h1.alert, h2.alert {color: #000000;}
100% { color: #400020; }
}
.hypnophrase {color: #3bb5d3; font-weight: bold; animation: hypnocolor 1500ms infinite;}
@keyframes hypnocolor {
0% { color: #0d0d0d; }
25% { color: #410194; }
50% { color: #7f17d8; }
75% { color: #410194; }
100% { color: #3bb5d3; }
.hypnophrase {color: #3bb5d3; font-weight: bold; animation: hypnocolor 1500ms infinite; animation-direction: alternate;}
@keyframes hypnocolor {
0% {color: #0d0d0d;}
25% {color: #410194;}
50% {color: #7f17d8;}
75% {color: #410194;}
100% {color: #3bb5d3;}
}
.phobia {color: #dd0000; font-weight: bold; animation: phobia 750ms infinite;}
.phobia {color: #dd0000; font-weight: bold; animation: phobia 750ms infinite;}
@keyframes phobia {
0% { color: #0d0d0d; }
50% { color: #dd0000; }
100% { color: #0d0d0d; }
0% {color: #0d0d0d;}
50% {color: #dd0000;}
100% {color: #0d0d0d;}
}
.icon {height: 1em; width: auto;}
.icon {height: 1em; width: auto;}
.memo {color: #638500; text-align: center;}
.memoedit {text-align: center; font-size: 2;}
.abductor {color: #800080; font-style: italic;}
.mind_control {color: #A00D6F; font-size: 3; font-weight: bold; font-style: italic;}
.abductor {color: #800080; font-style: italic;}
.mind_control {color: #A00D6F; font-size: 3; font-weight: bold; font-style: italic;}
.slime {color: #00CED1;}
.drone {color: #848482;}
.monkey {color: #975032;}

View File

@@ -301,6 +301,12 @@ em {
font-weight: bold;
}
/* @adminobserver compatability*/
.adminobserver {
color: #996600;
font-weight: bold;
}
.admin {
color: #5975da;
font-weight: bold;
@@ -596,12 +602,155 @@ em {
font-size: 185%;
}
.umbra {
color: #5000A0;
}
.umbra_emphasis {
color: #5000A0;
font-weight: bold;
font-style: italic;
}
.umbra_large {
color: #5000A0;
font-weight: bold;
font-style: italic;
font-size: 3;
}
.deconversion_message {
color: #a947ff;
color: #5000A0;
font-size: 185%;
font-style: italic;
}
/* coggers dosen't exist on tg :( */
/* from decon_msg: font-size: 185% == font-size 3*/
.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: 6;
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;
}
.ghostalert {
color: #6600ff;
font-style: italic;
@@ -685,6 +834,11 @@ em {
font-size: 185%;
}
.yellowtext {
color: #FFCC00;
font-size: 185%;
}
.clown {
color: #ff70c1;
font-size: 160%;
@@ -732,6 +886,31 @@ em {
}
}
.velvet {
color: #660015;
font-weight: bold;
animation: velvet 5000ms infinite;
animation-direction: alternate;
}
@keyframes velvet {
0% {
color: #400020;
}
40% {
color: #FF0000;
}
50% {
color: #FF8888;
}
60% {
color: #FF0000;
}
100% {
color: #400020;
}
}
.phobia {
color: #dd0000;
font-weight: bold;

View File

@@ -3,7 +3,7 @@
* SPDX-License-Identifier: MIT
*/
html, body {
html, body {
padding: 0;
margin: 0;
height: 100%;
@@ -297,6 +297,12 @@ em {
font-weight: bold;
}
/* @adminobserver compatability*/
.adminobserver {
color: #996600;
font-weight: bold;
}
.admin {
color: #4473ff;
font-weight: bold;
@@ -618,12 +624,155 @@ h1.alert, h2.alert {
font-size: 185%;
}
.umbra {
color: #5000A0;
}
.umbra_emphasis {
color: #5000A0;
font-weight: bold;
font-style: italic;
}
.umbra_large {
color: #5000A0;
font-weight: bold;
font-style: italic;
font-size: 3;
}
.deconversion_message {
color: #5000A0;
font-size: 185%;
font-style: italic;
}
/* coggers dosen't exist on tg :( */
/* from decon_msg: font-size: 185% == font-size 3*/
.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: 6;
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;
}
.ghostalert {
color: #5c00e6;
font-style: italic;
@@ -707,6 +856,11 @@ h1.alert, h2.alert {
font-size: 185%;
}
.yellowtext {
color: #FFCC00;
font-size: 185%;
}
.clown {
color: #FF69Bf;
font-size: 160%;
@@ -754,6 +908,31 @@ h1.alert, h2.alert {
}
}
.velvet {
color: #660015;
font-weight: bold;
animation: velvet 5000ms infinite;
animation-direction: alternate;
}
@keyframes velvet {
0% {
color: #400020;
}
40% {
color: #FF0000;
}
50% {
color: #FF8888;
}
60% {
color: #FF0000;
}
100% {
color: #400020;
}
}
.phobia {
color: #dd0000;
font-weight: bold;

View File

@@ -1,44 +0,0 @@
/**
* CSS Object Model patches
*
* Adapted from: https://github.com/shawnbot/aight
*
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
/* eslint-disable */
(function(Proto) {
'use strict';
if (typeof Proto.setAttribute !== 'undefined') {
function toAttr(prop) {
return prop.replace(/-[a-z]/g, function (bit) {
return bit[1].toUpperCase();
});
}
Proto.setProperty = function (prop, value) {
var attr = toAttr(prop);
if (!value) {
return this.removeAttribute(attr);
}
var str = String(value);
return this.setAttribute(attr, str);
};
Proto.getPropertyValue = function (prop) {
var attr = toAttr(prop);
return this.getAttribute(attr) || null;
};
Proto.removeProperty = function (prop) {
var attr = toAttr(prop);
var value = this.getAttribute(attr);
this.removeAttribute(attr);
return value;
};
}
})(CSSStyleDeclaration.prototype);

View File

@@ -1,970 +0,0 @@
/**
* @file
* @copyright 2013 Andrea Giammarchi, WebReflection
* @license MIT
*/
/* eslint-disable */
(function(window){
'use strict';
/* jshint loopfunc: true, noempty: false*/
// http://www.w3.org/TR/dom/#element
function createDocumentFragment() {
return document.createDocumentFragment();
}
function createElement(nodeName) {
return document.createElement(nodeName);
}
function enoughArguments(length, name) {
if (!length) throw new Error(
'Failed to construct ' +
name +
': 1 argument required, but only 0 present.'
);
}
function mutationMacro(nodes) {
if (nodes.length === 1) {
return textNodeIfPrimitive(nodes[0]);
}
for (var
fragment = createDocumentFragment(),
list = slice.call(nodes),
i = 0; i < nodes.length; i++
) {
fragment.appendChild(textNodeIfPrimitive(list[i]));
}
return fragment;
}
function textNodeIfPrimitive(node) {
return typeof node === 'object' ? node : document.createTextNode(node);
}
for(var
head,
property,
TemporaryPrototype,
TemporaryTokenList,
wrapVerifyToken,
document = window.document,
hOP = Object.prototype.hasOwnProperty,
defineProperty = Object.defineProperty || function (object, property, descriptor) {
if (hOP.call(descriptor, 'value')) {
object[property] = descriptor.value;
} else {
if (hOP.call(descriptor, 'get'))
object.__defineGetter__(property, descriptor.get);
if (hOP.call(descriptor, 'set'))
object.__defineSetter__(property, descriptor.set);
}
return object;
},
indexOf = [].indexOf || function indexOf(value){
var length = this.length;
while(length--) {
if (this[length] === value) {
break;
}
}
return length;
},
// http://www.w3.org/TR/domcore/#domtokenlist
verifyToken = function (token) {
if (!token) {
throw 'SyntaxError';
} else if (spaces.test(token)) {
throw 'InvalidCharacterError';
}
return token;
},
DOMTokenList = function (node) {
var
noClassName = typeof node.className === 'undefined',
className = noClassName ?
(node.getAttribute('class') || '') : node.className,
isSVG = noClassName || typeof className === 'object',
value = (isSVG ?
(noClassName ? className : className.baseVal) :
className
).replace(trim, '')
;
if (value.length) {
properties.push.apply(
this,
value.split(spaces)
);
}
this._isSVG = isSVG;
this._ = node;
},
classListDescriptor = {
get: function get() {
return new DOMTokenList(this);
},
set: function(){}
},
trim = /^\s+|\s+$/g,
spaces = /\s+/,
SPACE = '\x20',
CLASS_LIST = 'classList',
toggle = function toggle(token, force) {
if (this.contains(token)) {
if (!force) {
// force is not true (either false or omitted)
this.remove(token);
}
} else if(force === undefined || force) {
force = true;
this.add(token);
}
return !!force;
},
DocumentFragmentPrototype = window.DocumentFragment && DocumentFragment.prototype,
Node = window.Node,
NodePrototype = (Node || Element).prototype,
CharacterData = window.CharacterData || Node,
CharacterDataPrototype = CharacterData && CharacterData.prototype,
DocumentType = window.DocumentType,
DocumentTypePrototype = DocumentType && DocumentType.prototype,
ElementPrototype = (window.Element || Node || window.HTMLElement).prototype,
HTMLSelectElement = window.HTMLSelectElement || createElement('select').constructor,
selectRemove = HTMLSelectElement.prototype.remove,
SVGElement = window.SVGElement,
properties = [
'matches', (
ElementPrototype.matchesSelector ||
ElementPrototype.webkitMatchesSelector ||
ElementPrototype.khtmlMatchesSelector ||
ElementPrototype.mozMatchesSelector ||
ElementPrototype.msMatchesSelector ||
ElementPrototype.oMatchesSelector ||
function matches(selector) {
var parentNode = this.parentNode;
return !!parentNode && -1 < indexOf.call(
parentNode.querySelectorAll(selector),
this
);
}
),
'closest', function closest(selector) {
var parentNode = this, matches;
while (
// document has no .matches
(matches = parentNode && parentNode.matches) &&
!parentNode.matches(selector)
) {
parentNode = parentNode.parentNode;
}
return matches ? parentNode : null;
},
'prepend', function prepend() {
var firstChild = this.firstChild,
node = mutationMacro(arguments);
if (firstChild) {
this.insertBefore(node, firstChild);
} else {
this.appendChild(node);
}
},
'append', function append() {
this.appendChild(mutationMacro(arguments));
},
'before', function before() {
var parentNode = this.parentNode;
if (parentNode) {
parentNode.insertBefore(
mutationMacro(arguments), this
);
}
},
'after', function after() {
var parentNode = this.parentNode,
nextSibling = this.nextSibling,
node = mutationMacro(arguments);
if (parentNode) {
if (nextSibling) {
parentNode.insertBefore(node, nextSibling);
} else {
parentNode.appendChild(node);
}
}
},
// https://dom.spec.whatwg.org/#dom-element-toggleattribute
'toggleAttribute', function toggleAttribute(name, force) {
var had = this.hasAttribute(name);
if (1 < arguments.length) {
if (had && !force)
this.removeAttribute(name);
else if (force && !had)
this.setAttribute(name, "");
}
else if (had)
this.removeAttribute(name);
else
this.setAttribute(name, "");
return this.hasAttribute(name);
},
// WARNING - DEPRECATED - use .replaceWith() instead
'replace', function replace() {
this.replaceWith.apply(this, arguments);
},
'replaceWith', function replaceWith() {
var parentNode = this.parentNode;
if (parentNode) {
parentNode.replaceChild(
mutationMacro(arguments),
this
);
}
},
'remove', function remove() {
var parentNode = this.parentNode;
if (parentNode) {
parentNode.removeChild(this);
}
}
],
slice = properties.slice,
i = properties.length; i; i -= 2
) {
property = properties[i - 2];
if (!(property in ElementPrototype)) {
ElementPrototype[property] = properties[i - 1];
}
// avoid unnecessary re-patch when the script is included
// gazillion times without any reason whatsoever
// https://github.com/WebReflection/dom4/pull/48
if (property === 'remove' && !selectRemove._dom4) {
// see https://github.com/WebReflection/dom4/issues/19
(HTMLSelectElement.prototype[property] = function () {
return 0 < arguments.length ?
selectRemove.apply(this, arguments) :
ElementPrototype.remove.call(this);
})._dom4 = true;
}
// see https://github.com/WebReflection/dom4/issues/18
if (/^(?:before|after|replace|replaceWith|remove)$/.test(property)) {
if (CharacterData && !(property in CharacterDataPrototype)) {
CharacterDataPrototype[property] = properties[i - 1];
}
if (DocumentType && !(property in DocumentTypePrototype)) {
DocumentTypePrototype[property] = properties[i - 1];
}
}
// see https://github.com/WebReflection/dom4/pull/26
if (/^(?:append|prepend)$/.test(property)) {
if (DocumentFragmentPrototype) {
if (!(property in DocumentFragmentPrototype)) {
DocumentFragmentPrototype[property] = properties[i - 1];
}
} else {
try {
createDocumentFragment().constructor.prototype[property] = properties[i - 1];
} catch(o_O) {}
}
}
}
// most likely an IE9 only issue
// see https://github.com/WebReflection/dom4/issues/6
if (!createElement('a').matches('a')) {
ElementPrototype[property] = function(matches){
return function (selector) {
return matches.call(
this.parentNode ?
this :
createDocumentFragment().appendChild(this),
selector
);
};
}(ElementPrototype[property]);
}
// used to fix both old webkit and SVG
DOMTokenList.prototype = {
length: 0,
add: function add() {
for(var j = 0, token; j < arguments.length; j++) {
token = arguments[j];
if(!this.contains(token)) {
properties.push.call(this, property);
}
}
if (this._isSVG) {
this._.setAttribute('class', '' + this);
} else {
this._.className = '' + this;
}
},
contains: (function(indexOf){
return function contains(token) {
i = indexOf.call(this, property = verifyToken(token));
return -1 < i;
};
}([].indexOf || function (token) {
i = this.length;
while(i-- && this[i] !== token){}
return i;
})),
item: function item(i) {
return this[i] || null;
},
remove: function remove() {
for(var j = 0, token; j < arguments.length; j++) {
token = arguments[j];
if(this.contains(token)) {
properties.splice.call(this, i, 1);
}
}
if (this._isSVG) {
this._.setAttribute('class', '' + this);
} else {
this._.className = '' + this;
}
},
toggle: toggle,
toString: function toString() {
return properties.join.call(this, SPACE);
}
};
if (SVGElement && !(CLASS_LIST in SVGElement.prototype)) {
defineProperty(SVGElement.prototype, CLASS_LIST, classListDescriptor);
}
// http://www.w3.org/TR/dom/#domtokenlist
// iOS 5.1 has completely screwed this property
// classList in ElementPrototype is false
// but it's actually there as getter
if (!(CLASS_LIST in document.documentElement)) {
defineProperty(ElementPrototype, CLASS_LIST, classListDescriptor);
} else {
// iOS 5.1 and Nokia ASHA do not support multiple add or remove
// trying to detect and fix that in here
TemporaryTokenList = createElement('div')[CLASS_LIST];
TemporaryTokenList.add('a', 'b', 'a');
if ('a\x20b' != TemporaryTokenList) {
// no other way to reach original methods in iOS 5.1
TemporaryPrototype = TemporaryTokenList.constructor.prototype;
if (!('add' in TemporaryPrototype)) {
// ASHA double fails in here
TemporaryPrototype = window.TemporaryTokenList.prototype;
}
wrapVerifyToken = function (original) {
return function () {
var i = 0;
while (i < arguments.length) {
original.call(this, arguments[i++]);
}
};
};
TemporaryPrototype.add = wrapVerifyToken(TemporaryPrototype.add);
TemporaryPrototype.remove = wrapVerifyToken(TemporaryPrototype.remove);
// toggle is broken too ^_^ ... let's fix it
TemporaryPrototype.toggle = toggle;
}
}
if (!('contains' in NodePrototype)) {
defineProperty(NodePrototype, 'contains', {
value: function (el) {
while (el && el !== this) el = el.parentNode;
return this === el;
}
});
}
if (!('head' in document)) {
defineProperty(document, 'head', {
get: function () {
return head || (
head = document.getElementsByTagName('head')[0]
);
}
});
}
// requestAnimationFrame partial polyfill
(function () {
for (var
raf,
rAF = window.requestAnimationFrame,
cAF = window.cancelAnimationFrame,
prefixes = ['o', 'ms', 'moz', 'webkit'],
i = prefixes.length;
!cAF && i--;
) {
rAF = rAF || window[prefixes[i] + 'RequestAnimationFrame'];
cAF = window[prefixes[i] + 'CancelAnimationFrame'] ||
window[prefixes[i] + 'CancelRequestAnimationFrame'];
}
if (!cAF) {
// some FF apparently implemented rAF but no cAF
if (rAF) {
raf = rAF;
rAF = function (callback) {
var goOn = true;
raf(function () {
if (goOn) callback.apply(this, arguments);
});
return function () {
goOn = false;
};
};
cAF = function (id) {
id();
};
} else {
rAF = function (callback) {
return setTimeout(callback, 15, 15);
};
cAF = function (id) {
clearTimeout(id);
};
}
}
window.requestAnimationFrame = rAF;
window.cancelAnimationFrame = cAF;
}());
// http://www.w3.org/TR/dom/#customevent
try{new window.CustomEvent('?');}catch(o_O){
window.CustomEvent = function(
eventName,
defaultInitDict
){
// the infamous substitute
function CustomEvent(type, eventInitDict) {
/*jshint eqnull:true */
var event = document.createEvent(eventName);
if (typeof type != 'string') {
throw new Error('An event name must be provided');
}
if (eventName == 'Event') {
event.initCustomEvent = initCustomEvent;
}
if (eventInitDict == null) {
eventInitDict = defaultInitDict;
}
event.initCustomEvent(
type,
eventInitDict.bubbles,
eventInitDict.cancelable,
eventInitDict.detail
);
return event;
}
// attached at runtime
function initCustomEvent(
type, bubbles, cancelable, detail
) {
/*jshint validthis:true*/
this.initEvent(type, bubbles, cancelable);
this.detail = detail;
}
// that's it
return CustomEvent;
}(
// is this IE9 or IE10 ?
// where CustomEvent is there
// but not usable as construtor ?
window.CustomEvent ?
// use the CustomEvent interface in such case
'CustomEvent' : 'Event',
// otherwise the common compatible one
{
bubbles: false,
cancelable: false,
detail: null
}
);
}
// window.Event as constructor
try { new Event('_'); } catch (o_O) {
/* jshint -W022 */
o_O = (function ($Event) {
function Event(type, init) {
enoughArguments(arguments.length, 'Event');
var out = document.createEvent('Event');
if (!init) init = {};
out.initEvent(
type,
!!init.bubbles,
!!init.cancelable
);
return out;
}
Event.prototype = $Event.prototype;
return Event;
}(window.Event || function Event() {}));
defineProperty(window, 'Event', {value: o_O});
// Android 4 gotcha
if (Event !== o_O) Event = o_O;
}
// window.KeyboardEvent as constructor
try { new KeyboardEvent('_', {}); } catch (o_O) {
/* jshint -W022 */
o_O = (function ($KeyboardEvent) {
// code inspired by https://gist.github.com/termi/4654819
var
initType = 0,
defaults = {
char: '',
key: '',
location: 0,
ctrlKey: false,
shiftKey: false,
altKey: false,
metaKey: false,
altGraphKey: false,
repeat: false,
locale: navigator.language,
detail: 0,
bubbles: false,
cancelable: false,
keyCode: 0,
charCode: 0,
which: 0
},
eventType
;
try {
var e = document.createEvent('KeyboardEvent');
e.initKeyboardEvent(
'keyup', false, false, window, '+', 3,
true, false, true, false, false
);
initType = (
(e.keyIdentifier || e.key) == '+' &&
(e.keyLocation || e.location) == 3
) && (
e.ctrlKey ? e.altKey ? 1 : 3 : e.shiftKey ? 2 : 4
) || 9;
} catch(o_O) {}
eventType = 0 < initType ? 'KeyboardEvent' : 'Event';
function getModifier(init) {
for (var
out = [],
keys = [
'ctrlKey',
'Control',
'shiftKey',
'Shift',
'altKey',
'Alt',
'metaKey',
'Meta',
'altGraphKey',
'AltGraph'
],
i = 0; i < keys.length; i += 2
) {
if (init[keys[i]])
out.push(keys[i + 1]);
}
return out.join(' ');
}
function withDefaults(target, source) {
for (var key in source) {
if (
source.hasOwnProperty(key) &&
!source.hasOwnProperty.call(target, key)
) target[key] = source[key];
}
return target;
}
function withInitValues(key, out, init) {
try {
out[key] = init[key];
} catch(o_O) {}
}
function KeyboardEvent(type, init) {
enoughArguments(arguments.length, 'KeyboardEvent');
init = withDefaults(init || {}, defaults);
var
out = document.createEvent(eventType),
ctrlKey = init.ctrlKey,
shiftKey = init.shiftKey,
altKey = init.altKey,
metaKey = init.metaKey,
altGraphKey = init.altGraphKey,
modifiers = initType > 3 ? getModifier(init) : null,
key = String(init.key),
chr = String(init.char),
location = init.location,
keyCode = init.keyCode || (
(init.keyCode = key) &&
key.charCodeAt(0)
) || 0,
charCode = init.charCode || (
(init.charCode = chr) &&
chr.charCodeAt(0)
) || 0,
bubbles = init.bubbles,
cancelable = init.cancelable,
repeat = init.repeat,
locale = init.locale,
view = init.view || window,
args
;
if (!init.which) init.which = init.keyCode;
if ('initKeyEvent' in out) {
out.initKeyEvent(
type, bubbles, cancelable, view,
ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode
);
} else if (0 < initType && 'initKeyboardEvent' in out) {
args = [type, bubbles, cancelable, view];
switch (initType) {
case 1:
args.push(key, location, ctrlKey, shiftKey, altKey, metaKey, altGraphKey);
break;
case 2:
args.push(ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode);
break;
case 3:
args.push(key, location, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
break;
case 4:
args.push(key, location, modifiers, repeat, locale);
break;
default:
args.push(char, key, location, modifiers, repeat, locale);
}
out.initKeyboardEvent.apply(out, args);
} else {
out.initEvent(type, bubbles, cancelable);
}
for (key in out) {
if (defaults.hasOwnProperty(key) && out[key] !== init[key]) {
withInitValues(key, out, init);
}
}
return out;
}
KeyboardEvent.prototype = $KeyboardEvent.prototype;
return KeyboardEvent;
}(window.KeyboardEvent || function KeyboardEvent() {}));
defineProperty(window, 'KeyboardEvent', {value: o_O});
// Android 4 gotcha
if (KeyboardEvent !== o_O) KeyboardEvent = o_O;
}
// window.MouseEvent as constructor
try { new MouseEvent('_', {}); } catch (o_O) {
/* jshint -W022 */
o_O = (function ($MouseEvent) {
function MouseEvent(type, init) {
enoughArguments(arguments.length, 'MouseEvent');
var out = document.createEvent('MouseEvent');
if (!init) init = {};
out.initMouseEvent(
type,
!!init.bubbles,
!!init.cancelable,
init.view || window,
init.detail || 1,
init.screenX || 0,
init.screenY || 0,
init.clientX || 0,
init.clientY || 0,
!!init.ctrlKey,
!!init.altKey,
!!init.shiftKey,
!!init.metaKey,
init.button || 0,
init.relatedTarget || null
);
return out;
}
MouseEvent.prototype = $MouseEvent.prototype;
return MouseEvent;
}(window.MouseEvent || function MouseEvent() {}));
defineProperty(window, 'MouseEvent', {value: o_O});
// Android 4 gotcha
if (MouseEvent !== o_O) MouseEvent = o_O;
}
if (!document.querySelectorAll('*').forEach) {
(function () {
function patch(what) {
var querySelectorAll = what.querySelectorAll;
what.querySelectorAll = function qSA(css) {
var result = querySelectorAll.call(this, css);
result.forEach = Array.prototype.forEach;
return result;
};
}
patch(document);
patch(Element.prototype);
}());
}
try {
// https://drafts.csswg.org/selectors-4/#the-scope-pseudo
document.querySelector(':scope *');
} catch(o_O) {
(function () {
var dataScope = 'data-scope-' + (Math.random() * 1e9 >>> 0);
var proto = Element.prototype;
var querySelector = proto.querySelector;
var querySelectorAll = proto.querySelectorAll;
proto.querySelector = function qS(css) {
return find(this, querySelector, css);
};
proto.querySelectorAll = function qSA(css) {
return find(this, querySelectorAll, css);
};
function find(node, method, css) {
node.setAttribute(dataScope, null);
var result = method.call(
node,
String(css).replace(
/(^|,\s*)(:scope([ >]|$))/g,
function ($0, $1, $2, $3) {
return $1 + '[' + dataScope + ']' + ($3 || ' ');
}
)
);
node.removeAttribute(dataScope);
return result;
}
}());
}
}(window));
(function (global){'use strict';
// a WeakMap fallback for DOM nodes only used as key
var DOMMap = global.WeakMap || (function () {
var
counter = 0,
dispatched = false,
drop = false,
value
;
function dispatch(key, ce, shouldDrop) {
drop = shouldDrop;
dispatched = false;
value = undefined;
key.dispatchEvent(ce);
}
function Handler(value) {
this.value = value;
}
Handler.prototype.handleEvent = function handleEvent(e) {
dispatched = true;
if (drop) {
e.currentTarget.removeEventListener(e.type, this, false);
} else {
value = this.value;
}
};
function DOMMap() {
counter++; // make id clashing highly improbable
this.__ce__ = new Event(('@DOMMap:' + counter) + Math.random());
}
DOMMap.prototype = {
'constructor': DOMMap,
'delete': function del(key) {
return dispatch(key, this.__ce__, true), dispatched;
},
'get': function get(key) {
dispatch(key, this.__ce__, false);
var v = value;
value = undefined;
return v;
},
'has': function has(key) {
return dispatch(key, this.__ce__, false), dispatched;
},
'set': function set(key, value) {
dispatch(key, this.__ce__, true);
key.addEventListener(this.__ce__.type, new Handler(value), false);
return this;
},
};
return DOMMap;
}());
function Dict() {}
Dict.prototype = (Object.create || Object)(null);
// https://dom.spec.whatwg.org/#interface-eventtarget
function createEventListener(type, callback, options) {
function eventListener(e) {
if (eventListener.once) {
e.currentTarget.removeEventListener(
e.type,
callback,
eventListener
);
eventListener.removed = true;
}
if (eventListener.passive) {
e.preventDefault = createEventListener.preventDefault;
}
if (typeof eventListener.callback === 'function') {
/* jshint validthis: true */
eventListener.callback.call(this, e);
} else if (eventListener.callback) {
eventListener.callback.handleEvent(e);
}
if (eventListener.passive) {
delete e.preventDefault;
}
}
eventListener.type = type;
eventListener.callback = callback;
eventListener.capture = !!options.capture;
eventListener.passive = !!options.passive;
eventListener.once = !!options.once;
// currently pointless but specs say to use it, so ...
eventListener.removed = false;
return eventListener;
}
createEventListener.preventDefault = function preventDefault() {};
var
Event = global.CustomEvent,
dE = global.dispatchEvent,
aEL = global.addEventListener,
rEL = global.removeEventListener,
counter = 0,
increment = function () { counter++; },
indexOf = [].indexOf || function indexOf(value){
var length = this.length;
while(length--) {
if (this[length] === value) {
break;
}
}
return length;
},
getListenerKey = function (options) {
return ''.concat(
options.capture ? '1' : '0',
options.passive ? '1' : '0',
options.once ? '1' : '0'
);
},
augment
;
try {
aEL('_', increment, {once: true});
dE(new Event('_'));
dE(new Event('_'));
rEL('_', increment, {once: true});
} catch(o_O) {}
if (counter !== 1) {
(function () {
var dm = new DOMMap();
function createAEL(aEL) {
return function addEventListener(type, handler, options) {
if (options && typeof options !== 'boolean') {
var
info = dm.get(this),
key = getListenerKey(options),
i, tmp, wrap
;
if (!info) dm.set(this, (info = new Dict()));
if (!(type in info)) info[type] = {
handler: [],
wrap: []
};
tmp = info[type];
i = indexOf.call(tmp.handler, handler);
if (i < 0) {
i = tmp.handler.push(handler) - 1;
tmp.wrap[i] = (wrap = new Dict());
} else {
wrap = tmp.wrap[i];
}
if (!(key in wrap)) {
wrap[key] = createEventListener(type, handler, options);
aEL.call(this, type, wrap[key], wrap[key].capture);
}
} else {
aEL.call(this, type, handler, options);
}
};
}
function createREL(rEL) {
return function removeEventListener(type, handler, options) {
if (options && typeof options !== 'boolean') {
var
info = dm.get(this),
key, i, tmp, wrap
;
if (info && (type in info)) {
tmp = info[type];
i = indexOf.call(tmp.handler, handler);
if (-1 < i) {
key = getListenerKey(options);
wrap = tmp.wrap[i];
if (key in wrap) {
rEL.call(this, type, wrap[key], wrap[key].capture);
delete wrap[key];
// return if there are other wraps
for (key in wrap) return;
// otherwise remove all the things
tmp.handler.splice(i, 1);
tmp.wrap.splice(i, 1);
// if there are no other handlers
if (tmp.handler.length === 0)
// drop the info[type] entirely
delete info[type];
}
}
}
} else {
rEL.call(this, type, handler, options);
}
};
}
augment = function (Constructor) {
if (!Constructor) return;
var proto = Constructor.prototype;
proto.addEventListener = createAEL(proto.addEventListener);
proto.removeEventListener = createREL(proto.removeEventListener);
};
if (global.EventTarget) {
augment(EventTarget);
} else {
augment(global.Text);
augment(global.Element || global.HTMLElement);
augment(global.HTMLDocument);
augment(global.Window || {prototype:global});
augment(global.XMLHttpRequest);
}
}());
}
}(window));

View File

@@ -1,330 +0,0 @@
/**
* @file
* @copyright 2014 Alexander Farkas
* @license MIT
*/
/* eslint-disable */
(function(window, document) {
/*jshint evil:true */
/** version */
var version = '3.7.3';
/** Preset options */
var options = window.html5 || {};
/** Used to skip problem elements */
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
/** Not all elements can be cloned in IE **/
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
/** Detect whether the browser supports default html5 styles */
var supportsHtml5Styles;
/** Name of the expando, to work with multiple documents or to re-shiv one document */
var expando = '_html5shiv';
/** The id for the the documents expando */
var expanID = 0;
/** Cached data for each document */
var expandoData = {};
/** Detect whether the browser supports unknown elements */
var supportsUnknownElements;
(function() {
try {
var a = document.createElement('a');
a.innerHTML = '<xyz></xyz>';
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
supportsHtml5Styles = ('hidden' in a);
supportsUnknownElements = a.childNodes.length == 1 || (function() {
// assign a false positive if unable to shiv
(document.createElement)('a');
var frag = document.createDocumentFragment();
return (
typeof frag.cloneNode == 'undefined' ||
typeof frag.createDocumentFragment == 'undefined' ||
typeof frag.createElement == 'undefined'
);
}());
} catch(e) {
// assign a false positive if detection fails => unable to shiv
supportsHtml5Styles = true;
supportsUnknownElements = true;
}
}());
/*--------------------------------------------------------------------------*/
/**
* Creates a style sheet with the given CSS text and adds it to the document.
* @private
* @param {Document} ownerDocument The document.
* @param {String} cssText The CSS text.
* @returns {StyleSheet} The style element.
*/
function addStyleSheet(ownerDocument, cssText) {
var p = ownerDocument.createElement('p'),
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
p.innerHTML = 'x<style>' + cssText + '</style>';
return parent.insertBefore(p.lastChild, parent.firstChild);
}
/**
* Returns the value of `html5.elements` as an array.
* @private
* @returns {Array} An array of shived element node names.
*/
function getElements() {
var elements = html5.elements;
return typeof elements == 'string' ? elements.split(' ') : elements;
}
/**
* Extends the built-in list of html5 elements
* @memberOf html5
* @param {String|Array} newElements whitespace separated list or array of new element names to shiv
* @param {Document} ownerDocument The context document.
*/
function addElements(newElements, ownerDocument) {
var elements = html5.elements;
if(typeof elements != 'string'){
elements = elements.join(' ');
}
if(typeof newElements != 'string'){
newElements = newElements.join(' ');
}
html5.elements = elements +' '+ newElements;
shivDocument(ownerDocument);
}
/**
* Returns the data associated to the given document
* @private
* @param {Document} ownerDocument The document.
* @returns {Object} An object of data.
*/
function getExpandoData(ownerDocument) {
var data = expandoData[ownerDocument[expando]];
if (!data) {
data = {};
expanID++;
ownerDocument[expando] = expanID;
expandoData[expanID] = data;
}
return data;
}
/**
* returns a shived element for the given nodeName and document
* @memberOf html5
* @param {String} nodeName name of the element
* @param {Document|DocumentFragment} ownerDocument The context document.
* @returns {Object} The shived element.
*/
function createElement(nodeName, ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createElement(nodeName);
}
if (!data) {
data = getExpandoData(ownerDocument);
}
var node;
if (data.cache[nodeName]) {
node = data.cache[nodeName].cloneNode();
} else if (saveClones.test(nodeName)) {
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
} else {
node = data.createElem(nodeName);
}
// Avoid adding some elements to fragments in IE < 9 because
// * Attributes like `name` or `type` cannot be set/changed once an element
// is inserted into a document/fragment
// * Link elements with `src` attributes that are inaccessible, as with
// a 403 response, will cause the tab/window to crash
// * Script elements appended to fragments will execute when their `src`
// or `text` property is set
return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
}
/**
* returns a shived DocumentFragment for the given document
* @memberOf html5
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived DocumentFragment.
*/
function createDocumentFragment(ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createDocumentFragment();
}
data = data || getExpandoData(ownerDocument);
var clone = data.frag.cloneNode(),
i = 0,
elems = getElements(),
l = elems.length;
for(;i<l;i++){
clone.createElement(elems[i]);
}
return clone;
}
/**
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
* @private
* @param {Document|DocumentFragment} ownerDocument The document.
* @param {Object} data of the document.
*/
function shivMethods(ownerDocument, data) {
if (!data.cache) {
data.cache = {};
data.createElem = ownerDocument.createElement;
data.createFrag = ownerDocument.createDocumentFragment;
data.frag = data.createFrag();
}
ownerDocument.createElement = function(nodeName) {
//abort shiv
if (!html5.shivMethods) {
return data.createElem(nodeName);
}
return createElement(nodeName, ownerDocument, data);
};
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
'var n=f.cloneNode(),c=n.createElement;' +
'h.shivMethods&&(' +
// unroll the `createElement` calls
getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
data.createElem(nodeName);
data.frag.createElement(nodeName);
return 'c("' + nodeName + '")';
}) +
');return n}'
)(html5, data.frag);
}
/*--------------------------------------------------------------------------*/
/**
* Shivs the given document.
* @memberOf html5
* @param {Document} ownerDocument The document to shiv.
* @returns {Document} The shived document.
*/
function shivDocument(ownerDocument) {
if (!ownerDocument) {
ownerDocument = document;
}
var data = getExpandoData(ownerDocument);
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
data.hasCSS = !!addStyleSheet(ownerDocument,
// corrects block display not defined in IE6/7/8/9
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
// adds styling not present in IE6/7/8/9
'mark{background:#FF0;color:#000}' +
// hides non-rendered elements
'template{display:none}'
);
}
if (!supportsUnknownElements) {
shivMethods(ownerDocument, data);
}
return ownerDocument;
}
/*--------------------------------------------------------------------------*/
/**
* The `html5` object is exposed so that more elements can be shived and
* existing shiving can be detected on iframes.
* @type Object
* @example
*
* // options can be changed before the script is included
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
*/
var html5 = {
/**
* An array or space separated string of node names of the elements to shiv.
* @memberOf html5
* @type Array|String
*/
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
/**
* current version of html5shiv
*/
'version': version,
/**
* A flag to indicate that the HTML5 style sheet should be inserted.
* @memberOf html5
* @type Boolean
*/
'shivCSS': (options.shivCSS !== false),
/**
* Is equal to true if a browser supports creating unknown/HTML5 elements
* @memberOf html5
* @type boolean
*/
'supportsUnknownElements': supportsUnknownElements,
/**
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
* methods should be overwritten.
* @memberOf html5
* @type Boolean
*/
'shivMethods': (options.shivMethods !== false),
/**
* A string to describe the type of `html5` object ("default" or "default print").
* @memberOf html5
* @type String
*/
'type': 'default',
// shivs the document according to the specified `html5` object options
'shivDocument': shivDocument,
//creates a shived element
createElement: createElement,
//creates a shived documentFragment
createDocumentFragment: createDocumentFragment,
//extends list of elements
addElements: addElements
};
/*--------------------------------------------------------------------------*/
// expose html5
window.html5 = html5;
// shiv the document
shivDocument(document);
if(typeof module == 'object' && module.exports){
module.exports = html5;
}
}(window, document));

View File

@@ -1,836 +0,0 @@
/**
* @file
* @copyright 2013 Andrea Giammarchi, WebReflection
* @license MIT
*/
/* eslint-disable */
(function(window){
/*! (C) WebReflection Mit Style License */
if (document.createEvent) return;
var
DUNNOABOUTDOMLOADED = true,
READYEVENTDISPATCHED = false,
ONREADYSTATECHANGE = 'onreadystatechange',
DOMCONTENTLOADED = 'DOMContentLoaded',
SECRET = '__IE8__' + Math.random(),
// Object = window.Object,
defineProperty = Object.defineProperty ||
// just in case ...
function (object, property, descriptor) {
object[property] = descriptor.value;
},
defineProperties = Object.defineProperties ||
// IE8 implemented defineProperty but not the plural...
function (object, descriptors) {
for(var key in descriptors) {
if (hasOwnProperty.call(descriptors, key)) {
try {
defineProperty(object, key, descriptors[key]);
} catch(o_O) {
if (window.console) {
console.log(key + ' failed on object:', object, o_O.message);
}
}
}
}
},
getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
hasOwnProperty = Object.prototype.hasOwnProperty,
// here IE7 will break like a charm
ElementPrototype = window.Element.prototype,
TextPrototype = window.Text.prototype,
// none of above native constructors exist/are exposed
possiblyNativeEvent = /^[a-z]+$/,
// ^ actually could probably be just /^[a-z]+$/
readyStateOK = /loaded|complete/,
types = {},
div = document.createElement('div'),
html = document.documentElement,
removeAttribute = html.removeAttribute,
setAttribute = html.setAttribute,
valueDesc = function (value) {
return {
enumerable: true,
writable: true,
configurable: true,
value: value
};
}
;
function commonEventLoop(currentTarget, e, $handlers, synthetic) {
for(var
handler,
continuePropagation,
handlers = $handlers.slice(),
evt = enrich(e, currentTarget),
i = 0, length = handlers.length; i < length; i++
) {
handler = handlers[i];
if (typeof handler === 'object') {
if (typeof handler.handleEvent === 'function') {
handler.handleEvent(evt);
}
} else {
handler.call(currentTarget, evt);
}
if (evt.stoppedImmediatePropagation) break;
}
continuePropagation = !evt.stoppedPropagation;
/*
if (continuePropagation && !synthetic && !live(currentTarget)) {
evt.cancelBubble = true;
}
*/
return (
synthetic &&
continuePropagation &&
currentTarget.parentNode
) ?
currentTarget.parentNode.dispatchEvent(evt) :
!evt.defaultPrevented
;
}
function commonDescriptor(get, set) {
return {
// if you try with enumerable: true
// IE8 will miserably fail
configurable: true,
get: get,
set: set
};
}
function commonTextContent(protoDest, protoSource, property) {
var descriptor = getOwnPropertyDescriptor(
protoSource || protoDest, property
);
defineProperty(
protoDest,
'textContent',
commonDescriptor(
function () {
return descriptor.get.call(this);
},
function (textContent) {
descriptor.set.call(this, textContent);
}
)
);
}
function enrich(e, currentTarget) {
e.currentTarget = currentTarget;
e.eventPhase = (
// AT_TARGET : BUBBLING_PHASE
e.target === e.currentTarget ? 2 : 3
);
return e;
}
function find(array, value) {
var i = array.length;
while(i-- && array[i] !== value);
return i;
}
function getTextContent() {
if (this.tagName === 'BR') return '\n';
var
textNode = this.firstChild,
arrayContent = []
;
while(textNode) {
if (textNode.nodeType !== 8 && textNode.nodeType !== 7) {
arrayContent.push(textNode.textContent);
}
textNode = textNode.nextSibling;
}
return arrayContent.join('');
}
function live(self) {
return self.nodeType !== 9 && html.contains(self);
}
function onkeyup(e) {
var evt = document.createEvent('Event');
evt.initEvent('input', true, true);
(e.srcElement || e.fromElement || document).dispatchEvent(evt);
}
function onReadyState(e) {
if (!READYEVENTDISPATCHED && readyStateOK.test(
document.readyState
)) {
READYEVENTDISPATCHED = !READYEVENTDISPATCHED;
document.detachEvent(ONREADYSTATECHANGE, onReadyState);
e = document.createEvent('Event');
e.initEvent(DOMCONTENTLOADED, true, true);
document.dispatchEvent(e);
}
}
function getter(attr) {
return function() {
return html[attr] || (document.body && document.body[attr]) || 0;
};
}
function setTextContent(textContent) {
var node;
while ((node = this.lastChild)) {
this.removeChild(node);
}
/*jshint eqnull:true */
if (textContent != null) {
this.appendChild(document.createTextNode(textContent));
}
}
function verify(self, e) {
if (!e) {
e = window.event;
}
if (!e.target) {
e.target = e.srcElement || e.fromElement || document;
}
if (!e.timeStamp) {
e.timeStamp = (new Date()).getTime();
}
return e;
}
// normalized textContent for:
// comment, script, style, text, title
commonTextContent(
window.HTMLCommentElement.prototype,
ElementPrototype,
'nodeValue'
);
commonTextContent(
window.HTMLScriptElement.prototype,
null,
'text'
);
commonTextContent(
TextPrototype,
null,
'nodeValue'
);
commonTextContent(
window.HTMLTitleElement.prototype,
null,
'text'
);
defineProperty(
window.HTMLStyleElement.prototype,
'textContent',
(function(descriptor){
return commonDescriptor(
function () {
return descriptor.get.call(this.styleSheet);
},
function (textContent) {
descriptor.set.call(this.styleSheet, textContent);
}
);
}(getOwnPropertyDescriptor(window.CSSStyleSheet.prototype, 'cssText')))
);
var opacityre = /\b\s*alpha\s*\(\s*opacity\s*=\s*(\d+)\s*\)/;
defineProperty(
window.CSSStyleDeclaration.prototype,
'opacity', {
get: function() {
var m = this.filter.match(opacityre);
return m ? (m[1] / 100).toString() : '';
},
set: function(value) {
this.zoom = 1;
var found = false;
if (value < 1) {
value = ' alpha(opacity=' + Math.round(value * 100) + ')';
}
else {
value = '';
}
this.filter = this.filter.replace(opacityre,
function() { found = true; return value; });
if (!found && value) {
this.filter += value;
}
}
}
);
defineProperties(
ElementPrototype,
{
// bonus
textContent: {
get: getTextContent,
set: setTextContent
},
// http://www.w3.org/TR/ElementTraversal/#interface-elementTraversal
firstElementChild: {
get: function () {
for(var
childNodes = this.childNodes || [],
i = 0, length = childNodes.length;
i < length; i++
) {
if (childNodes[i].nodeType == 1) return childNodes[i];
}
}
},
lastElementChild: {
get: function () {
for(var
childNodes = this.childNodes || [],
i = childNodes.length;
i--;
) {
if (childNodes[i].nodeType == 1) return childNodes[i];
}
}
},
oninput: {
get: function () {
return this._oninput || null;
},
set: function (oninput) {
if (this._oninput) {
this.removeEventListener('input', this._oninput);
this._oninput = oninput;
if (oninput) {
this.addEventListener('input', oninput);
}
}
}
},
previousElementSibling: {
get: function () {
var previousElementSibling = this.previousSibling;
while (previousElementSibling && previousElementSibling.nodeType != 1) {
previousElementSibling = previousElementSibling.previousSibling;
}
return previousElementSibling;
}
},
nextElementSibling: {
get: function () {
var nextElementSibling = this.nextSibling;
while (nextElementSibling && nextElementSibling.nodeType != 1) {
nextElementSibling = nextElementSibling.nextSibling;
}
return nextElementSibling;
}
},
childElementCount: {
get: function () {
for(var
count = 0,
childNodes = this.childNodes || [],
i = childNodes.length; i--; count += childNodes[i].nodeType == 1
);
return count;
}
},
/*
// children would be an override
// IE8 already supports them but with comments too
// not just nodeType 1
children: {
get: function () {
for(var
children = [],
childNodes = this.childNodes || [],
i = 0, length = childNodes.length;
i < length; i++
) {
if (childNodes[i].nodeType == 1) {
children.push(childNodes[i]);
}
}
return children;
}
},
*/
// DOM Level 2 EventTarget methods and events
addEventListener: valueDesc(function (type, handler, capture) {
if (typeof handler !== 'function' && typeof handler !== 'object') return;
var
self = this,
ontype = 'on' + type,
temple = self[SECRET] ||
defineProperty(
self, SECRET, {value: {}}
)[SECRET],
currentType = temple[ontype] || (temple[ontype] = {}),
handlers = currentType.h || (currentType.h = []),
e, attr
;
if (!hasOwnProperty.call(currentType, 'w')) {
currentType.w = function (e) {
// e[SECRET] is a silent notification needed to avoid
// fired events during live test
return e[SECRET] || commonEventLoop(self, verify(self, e), handlers, false);
};
// if not detected yet
if (!hasOwnProperty.call(types, ontype)) {
// and potentially a native event
if(possiblyNativeEvent.test(type)) {
// do this heavy thing
try {
// TODO: should I consider tagName too so that
// INPUT[ontype] could be different ?
e = document.createEventObject();
// do not clone ever a node
// specially a document one ...
// use the secret to ignore them all
e[SECRET] = true;
// document a part if a node has never been
// added to any other node, fireEvent might
// behave very weirdly (read: trigger unspecified errors)
if (self.nodeType != 9) {
/*jshint eqnull:true */
if (self.parentNode == null) {
div.appendChild(self);
}
if ((attr = self.getAttribute(ontype))) {
removeAttribute.call(self, ontype);
}
}
self.fireEvent(ontype, e);
types[ontype] = true;
} catch(meh) {
types[ontype] = false;
while (div.hasChildNodes()) {
div.removeChild(div.firstChild);
}
}
if (attr != null) {
setAttribute.call(self, ontype, attr);
}
} else {
// no need to bother since
// 'x-event' ain't native for sure
types[ontype] = false;
}
}
if ((currentType.n = types[ontype])) {
self.attachEvent(ontype, currentType.w);
}
}
if (find(handlers, handler) < 0) {
handlers[capture ? 'unshift' : 'push'](handler);
}
if (type === 'input') {
self.attachEvent('onkeyup', onkeyup);
}
}),
dispatchEvent: valueDesc(function (e) {
var
self = this,
ontype = 'on' + e.type,
temple = self[SECRET],
currentType = temple && temple[ontype],
valid = !!currentType,
parentNode
;
if (!e.target) e.target = self;
return (valid ? (
currentType.n /* && live(self) */ ?
self.fireEvent(ontype, e) :
commonEventLoop(
self,
e,
currentType.h,
true
)
) : (
(parentNode = self.parentNode) /* && live(self) */ ?
parentNode.dispatchEvent(e) :
true
)), !e.defaultPrevented;
}),
removeEventListener: valueDesc(function (type, handler, capture) {
if (typeof handler !== 'function' && typeof handler !== 'object') return;
var
self = this,
ontype = 'on' + type,
temple = self[SECRET],
currentType = temple && temple[ontype],
handlers = currentType && currentType.h,
i = handlers ? find(handlers, handler) : -1
;
if (-1 < i) handlers.splice(i, 1);
})
}
);
/* this is not needed in IE8
defineProperties(window.HTMLSelectElement.prototype, {
value: {
get: function () {
return this.options[this.selectedIndex].value;
}
}
});
//*/
// EventTarget methods for Text nodes too
defineProperties(TextPrototype, {
addEventListener: valueDesc(ElementPrototype.addEventListener),
dispatchEvent: valueDesc(ElementPrototype.dispatchEvent),
removeEventListener: valueDesc(ElementPrototype.removeEventListener)
});
defineProperties(
window.XMLHttpRequest.prototype,
{
addEventListener: valueDesc(function (type, handler, capture) {
var
self = this,
ontype = 'on' + type,
temple = self[SECRET] ||
defineProperty(
self, SECRET, {value: {}}
)[SECRET],
currentType = temple[ontype] || (temple[ontype] = {}),
handlers = currentType.h || (currentType.h = [])
;
if (find(handlers, handler) < 0) {
if (!self[ontype]) {
self[ontype] = function () {
var e = document.createEvent('Event');
e.initEvent(type, true, true);
self.dispatchEvent(e);
};
}
handlers[capture ? 'unshift' : 'push'](handler);
}
}),
dispatchEvent: valueDesc(function (e) {
var
self = this,
ontype = 'on' + e.type,
temple = self[SECRET],
currentType = temple && temple[ontype],
valid = !!currentType
;
return valid && (
currentType.n /* && live(self) */ ?
self.fireEvent(ontype, e) :
commonEventLoop(
self,
e,
currentType.h,
true
)
);
}),
removeEventListener: valueDesc(ElementPrototype.removeEventListener)
}
);
var buttonGetter = getOwnPropertyDescriptor(Event.prototype, 'button').get;
defineProperties(
window.Event.prototype,
{
bubbles: valueDesc(true),
cancelable: valueDesc(true),
preventDefault: valueDesc(function () {
if (this.cancelable) {
this.returnValue = false;
}
}),
stopPropagation: valueDesc(function () {
this.stoppedPropagation = true;
this.cancelBubble = true;
}),
stopImmediatePropagation: valueDesc(function () {
this.stoppedImmediatePropagation = true;
this.stopPropagation();
}),
initEvent: valueDesc(function(type, bubbles, cancelable){
this.type = type;
this.bubbles = !!bubbles;
this.cancelable = !!cancelable;
if (!this.bubbles) {
this.stopPropagation();
}
}),
pageX: {get: function(){ return this._pageX || (this._pageX = this.clientX + window.scrollX - (html.clientLeft || 0)); }},
pageY: {get: function(){ return this._pageY || (this._pageY = this.clientY + window.scrollY - (html.clientTop || 0)); }},
which: {get: function(){ return this.keyCode ? this.keyCode : (isNaN(this.button) ? undefined : this.button + 1); }},
charCode: {get: function(){ return (this.keyCode && this.type == 'keypress') ? this.keyCode : 0; }},
buttons: {get: function(){ return buttonGetter.call(this); }},
button: {get: function() {
var buttons = this.buttons;
return (buttons & 1 ? 0 : (buttons & 2 ? 2 : (buttons & 4 ? 1 : undefined)));
}},
defaultPrevented: {get: function() {
// if preventDefault() was never called, or returnValue not given a value
// then returnValue is undefined
var returnValue = this.returnValue, undef;
return !(returnValue === undef || returnValue);
}},
relatedTarget: {get: function() {
var type = this.type;
if (type === 'mouseover') {
return this.fromElement;
} else if (type === 'mouseout') {
return this.toElement;
} else {
return null;
}
}}
}
);
defineProperties(
window.HTMLDocument.prototype,
{
defaultView: {
get: function () {
return this.parentWindow;
}
},
textContent: {
get: function () {
return this.nodeType === 11 ? getTextContent.call(this) : null;
},
set: function (textContent) {
if (this.nodeType === 11) {
setTextContent.call(this, textContent);
}
}
},
addEventListener: valueDesc(function(type, handler, capture) {
var self = this;
ElementPrototype.addEventListener.call(self, type, handler, capture);
// NOTE: it won't fire if already loaded, this is NOT a $.ready() shim!
// this behaves just like standard browsers
if (
DUNNOABOUTDOMLOADED &&
type === DOMCONTENTLOADED &&
!readyStateOK.test(
self.readyState
)
) {
DUNNOABOUTDOMLOADED = false;
self.attachEvent(ONREADYSTATECHANGE, onReadyState);
/* global top */
if (window == top) {
(function gonna(e){try{
self.documentElement.doScroll('left');
onReadyState();
}catch(o_O){
setTimeout(gonna, 50);
}}());
}
}
}),
dispatchEvent: valueDesc(ElementPrototype.dispatchEvent),
removeEventListener: valueDesc(ElementPrototype.removeEventListener),
createEvent: valueDesc(function(Class){
var e;
if (Class !== 'Event') throw new Error('unsupported ' + Class);
e = document.createEventObject();
e.timeStamp = (new Date()).getTime();
return e;
})
}
);
defineProperties(
window.Window.prototype,
{
getComputedStyle: valueDesc(function(){
var // partially grabbed from jQuery and Dean's hack
notpixel = /^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,
position = /^(top|right|bottom|left)$/,
re = /\-([a-z])/g,
place = function (match, $1) {
return $1.toUpperCase();
}
;
function ComputedStyle(_) {
this._ = _;
}
ComputedStyle.prototype.getPropertyValue = function (name) {
var
el = this._,
style = el.style,
currentStyle = el.currentStyle,
runtimeStyle = el.runtimeStyle,
result,
left,
rtLeft
;
if (name == 'opacity') {
return style.opacity || '1';
}
name = (name === 'float' ? 'style-float' : name).replace(re, place);
result = currentStyle ? currentStyle[name] : style[name];
if (notpixel.test(result) && !position.test(name)) {
left = style.left;
rtLeft = runtimeStyle && runtimeStyle.left;
if (rtLeft) {
runtimeStyle.left = currentStyle.left;
}
style.left = name === 'fontSize' ? '1em' : result;
result = style.pixelLeft + 'px';
style.left = left;
if (rtLeft) {
runtimeStyle.left = rtLeft;
}
}
/*jshint eqnull:true */
return result == null ?
result : ((result + '') || 'auto');
};
// unsupported
function PseudoComputedStyle() {}
PseudoComputedStyle.prototype.getPropertyValue = function () {
return null;
};
return function (el, pseudo) {
return pseudo ?
new PseudoComputedStyle(el) :
new ComputedStyle(el);
};
}()),
addEventListener: valueDesc(function (type, handler, capture) {
var
self = window,
ontype = 'on' + type,
handlers
;
if (!self[ontype]) {
self[ontype] = function(e) {
return commonEventLoop(self, verify(self, e), handlers, false) && undefined;
};
}
handlers = self[ontype][SECRET] || (
self[ontype][SECRET] = []
);
if (find(handlers, handler) < 0) {
handlers[capture ? 'unshift' : 'push'](handler);
}
}),
dispatchEvent: valueDesc(function (e) {
var method = window['on' + e.type];
return method ? method.call(window, e) !== false && !e.defaultPrevented : true;
}),
removeEventListener: valueDesc(function (type, handler, capture) {
var
ontype = 'on' + type,
handlers = (window[ontype] || Object)[SECRET],
i = handlers ? find(handlers, handler) : -1
;
if (-1 < i) handlers.splice(i, 1);
}),
pageXOffset: {get: getter('scrollLeft')},
pageYOffset: {get: getter('scrollTop')},
scrollX: {get: getter('scrollLeft')},
scrollY: {get: getter('scrollTop')},
innerWidth: {get: getter('clientWidth')},
innerHeight: {get: getter('clientHeight')}
}
);
window.HTMLElement = window.Element;
(function (styleSheets, HTML5Element, i) {
for (i = 0; i < HTML5Element.length; i++) document.createElement(HTML5Element[i]);
if (!styleSheets.length) document.createStyleSheet('');
styleSheets[0].addRule(HTML5Element.join(','), 'display:block;');
}(document.styleSheets, ['header', 'nav', 'section', 'article', 'aside', 'footer']));
(function () {
if (document.createRange) return;
document.createRange = function createRange() {
return new Range();
};
function getContents(start, end) {
var nodes = [start];
while (start !== end) {
nodes.push(start = start.nextSibling);
}
return nodes;
}
function Range() {}
var proto = Range.prototype;
proto.cloneContents = function cloneContents() {
for (var
fragment = this._start.ownerDocument.createDocumentFragment(),
nodes = getContents(this._start, this._end),
i = 0,
length = nodes.length;
i < length; i++
) {
fragment.appendChild(nodes[i].cloneNode(true));
}
return fragment;
};
proto.cloneRange = function cloneRange() {
var range = new Range();
range._start = this._start;
range._end = this._end;
return range;
};
proto.deleteContents = function deleteContents() {
for (var
parentNode = this._start.parentNode,
nodes = getContents(this._start, this._end),
i = 0,
length = nodes.length;
i < length; i++
) {
parentNode.removeChild(nodes[i]);
}
};
proto.extractContents = function extractContents() {
for (var
fragment = this._start.ownerDocument.createDocumentFragment(),
nodes = getContents(this._start, this._end),
i = 0,
length = nodes.length;
i < length; i++
) {
fragment.appendChild(nodes[i]);
}
return fragment;
};
proto.setEndAfter = function setEndAfter(node) {
this._end = node;
};
proto.setEndBefore = function setEndBefore(node) {
this._end = node.previousSibling;
};
proto.setStartAfter = function setStartAfter(node) {
this._start = node.nextSibling;
};
proto.setStartBefore = function setStartBefore(node) {
this._start = node;
};
}());
}(window));

View File

@@ -1,10 +0,0 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
// Inferno needs Int32Array, and it is not covered by core-js.
if (!window.Int32Array) {
window.Int32Array = Array;
}