cinera: Replace all inline CSS and JS
We no longer prevent enforcement of strict server security policies (to be documented) Add bounds-checking to the Copy string functions, fixing buffer sizes Fix the marker skipping (e.g. :afk)
This commit is contained in:
parent
4a0630beb0
commit
be37ea234a
846
cinera/cinera.c
846
cinera/cinera.c
File diff suppressed because it is too large
Load Diff
|
@ -166,6 +166,14 @@
|
|||
margin: 2px;
|
||||
}
|
||||
|
||||
.cineraMenus .help .help_container .help_key.word {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.cineraMenus .help .help_container .help_key.modifer {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.cineraMenus .help .help_container .help_key.unavailable,
|
||||
.cineraMenus .help .help_container .help_text.unavailable,
|
||||
.cineraMenus .help .help_container h2 .unavailable {
|
||||
|
@ -544,6 +552,7 @@
|
|||
.cineraPlayerContainer .markers_container > .markers .marker .cineraContent sup {
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
vertical-align: super;
|
||||
}
|
||||
|
||||
.cineraPlayerContainer .markers_container > .markers .marker .progress {
|
||||
|
|
|
@ -83,6 +83,9 @@ if(filterMenu)
|
|||
|
||||
var filterMode = filterModeElement.classList[1];
|
||||
var filterItems = filter.querySelectorAll(".filter_content");
|
||||
|
||||
var filterInitState = new Object();
|
||||
var filterState = new Object();
|
||||
for(var i = 0; i < filterItems.length; ++i)
|
||||
{
|
||||
filterItems[i].addEventListener("mouseenter", function(ev) {
|
||||
|
@ -92,6 +95,18 @@ if(filterMenu)
|
|||
filterItems[i].addEventListener("click", function(ev) {
|
||||
filterItemToggle(this);
|
||||
});
|
||||
|
||||
var filterItemName = filterItems[i].classList.item(1);
|
||||
if(filterItems[i].parentNode.classList.contains("filter_topics"))
|
||||
{
|
||||
filterInitState[filterItemName] = { "type" : "topic", "off": (filterItems[i].classList.item(2) == "off") };
|
||||
filterState[filterItemName] = { "type" : "topic", "off": (filterItems[i].classList.item(2) == "off") };
|
||||
}
|
||||
else
|
||||
{
|
||||
filterInitState[filterItemName] = { "type" : "medium", "off": (filterItems[i].classList.item(2) == "off") };
|
||||
filterState[filterItemName] = { "type" : "medium", "off": (filterItems[i].classList.item(2) == "off") };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,6 +191,7 @@ if(creditsMenu)
|
|||
{
|
||||
for(var i = 0; i < supportIcons.length; ++i)
|
||||
{
|
||||
supportIcons[i].style.backgroundImage = "url(\"" + supportIcons[i].getAttribute("data-sprite") + "\")";
|
||||
setIconLightness(supportIcons[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1190,7 +1190,6 @@ function resetFade() {
|
|||
function onRefChanged(ref, element, player) {
|
||||
if(element.classList.contains("skip"))
|
||||
{
|
||||
var filterState;
|
||||
var ErrorCount = 0;
|
||||
if(!filter) { console.log("Missing filter_container div"); ErrorCount++; }
|
||||
if(!filterState) { console.log("Missing filterState object"); ErrorCount++; }
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
document.body.style.overflowY = "scroll";
|
||||
|
||||
if (location.hash && location.hash.length > 0) {
|
||||
var initialQuery = location.hash;
|
||||
if (initialQuery[0] == "#") {
|
||||
|
@ -7,6 +9,11 @@ if (location.hash && location.hash.length > 0) {
|
|||
}
|
||||
|
||||
var indexContainer = document.getElementById("cineraIndex");
|
||||
var projectID = indexContainer.attributes.getNamedItem("data-project").value;
|
||||
var theme = indexContainer.classList.item(0);
|
||||
var baseURL = indexContainer.attributes.getNamedItem("data-baseURL").value;
|
||||
var playerLocation = indexContainer.attributes.getNamedItem("data-playerLocation").value;
|
||||
|
||||
var indexSort = indexContainer.querySelector("#cineraIndexSort");
|
||||
var indexEntries = indexContainer.querySelector("#cineraIndexEntries");
|
||||
var indexSortChronological = true;
|
||||
|
@ -224,12 +231,7 @@ xhr.addEventListener("load", function() {
|
|||
episode = {};
|
||||
mode = "none";
|
||||
} else if (line.startsWith("name:")) {
|
||||
if(projectID != outputURLPrefix) {
|
||||
episode.name = line.slice(6).replace(projectID, outputURLPrefix);
|
||||
}
|
||||
else {
|
||||
episode.name = line.slice(6);
|
||||
}
|
||||
episode.name = line.slice(6);
|
||||
} else if (line.startsWith("title:")) {
|
||||
episode.title = line.slice(7).replace(/"/g, "");
|
||||
} else if (line.startsWith("markers")) {
|
||||
|
|
Loading…
Reference in New Issue