[http deprecation] enforce HTTPS for externalcss URLs
This commit is contained in:
parent
e8d39850c5
commit
453ed607ba
5 changed files with 125 additions and 50 deletions
|
|
@ -49,7 +49,6 @@ Callbacks = {
|
|||
},
|
||||
|
||||
costanza: function (data) {
|
||||
hidePlayer();
|
||||
$("#costanza-modal").modal("hide");
|
||||
var modal = makeModal();
|
||||
modal.attr("id", "costanza-modal")
|
||||
|
|
@ -61,7 +60,6 @@ Callbacks = {
|
|||
.appendTo(body);
|
||||
|
||||
$("<strong/>").text(data.msg).appendTo(body);
|
||||
hidePlayer();
|
||||
modal.modal();
|
||||
},
|
||||
|
||||
|
|
@ -1052,6 +1050,38 @@ Callbacks = {
|
|||
HAS_CONNECTED_BEFORE = false;
|
||||
ioServerConnect(socketConfig);
|
||||
setupCallbacks();
|
||||
},
|
||||
|
||||
validationError: function (error) {
|
||||
var target = $(error.target);
|
||||
target.parent().find(".text-danger").remove();
|
||||
|
||||
var formGroup = target.parent();
|
||||
while (!formGroup.hasClass("form-group") && formGroup.length > 0) {
|
||||
formGroup = formGroup.parent();
|
||||
}
|
||||
|
||||
if (formGroup.length > 0) {
|
||||
formGroup.addClass("has-error");
|
||||
}
|
||||
|
||||
$("<p/>").addClass("text-danger")
|
||||
.text(error.message)
|
||||
.insertAfter(target);
|
||||
},
|
||||
|
||||
validationPassed: function (data) {
|
||||
var target = $(data.target);
|
||||
target.parent().find(".text-danger").remove();
|
||||
|
||||
var formGroup = target.parent();
|
||||
while (!formGroup.hasClass("form-group") && formGroup.length > 0) {
|
||||
formGroup = formGroup.parent();
|
||||
}
|
||||
|
||||
if (formGroup.length > 0) {
|
||||
formGroup.removeClass("has-error");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -488,7 +488,6 @@ $("#voteskip").click(function() {
|
|||
|
||||
$("#getplaylist").click(function() {
|
||||
var callback = function(data) {
|
||||
hidePlayer();
|
||||
var idx = socket.listeners("errorMsg").indexOf(errCallback);
|
||||
if (idx >= 0) {
|
||||
socket.listeners("errorMsg").splice(idx);
|
||||
|
|
@ -523,7 +522,6 @@ $("#getplaylist").click(function() {
|
|||
$("<div/>").addClass("modal-footer").appendTo(modal);
|
||||
outer.on("hidden.bs.modal", function() {
|
||||
outer.remove();
|
||||
unhidePlayer();
|
||||
});
|
||||
outer.modal();
|
||||
};
|
||||
|
|
@ -862,7 +860,6 @@ applyOpts();
|
|||
})();
|
||||
|
||||
var EMOTELISTMODAL = $("#emotelist");
|
||||
EMOTELISTMODAL.on("hidden.bs.modal", unhidePlayer);
|
||||
$("#emotelistbtn").click(function () {
|
||||
EMOTELISTMODAL.modal();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -616,11 +616,6 @@ function rebuildPlaylist() {
|
|||
|
||||
/* user settings menu */
|
||||
function showUserOptions() {
|
||||
hidePlayer();
|
||||
$("#useroptions").on("hidden.bs.modal", function () {
|
||||
unhidePlayer();
|
||||
});
|
||||
|
||||
if (CLIENT.rank < 2) {
|
||||
$("a[href='#us-mod']").parent().hide();
|
||||
} else {
|
||||
|
|
@ -2046,21 +2041,6 @@ function waitUntilDefined(obj, key, fn) {
|
|||
fn();
|
||||
}
|
||||
|
||||
function hidePlayer() {
|
||||
/* 2015-09-16
|
||||
* Originally used to hide the player while a modal was open because of
|
||||
* certain flash videos that always rendered on top. Seems to no longer
|
||||
* be an issue. Uncomment this if it is.
|
||||
if (!PLAYER) return;
|
||||
|
||||
$("#ytapiplayer").hide();
|
||||
*/
|
||||
}
|
||||
|
||||
function unhidePlayer() {
|
||||
//$("#ytapiplayer").show();
|
||||
}
|
||||
|
||||
function chatDialog(div) {
|
||||
var parent = $("<div/>").addClass("profile-box")
|
||||
.css({
|
||||
|
|
@ -2103,6 +2083,44 @@ function errDialog(err) {
|
|||
return div;
|
||||
}
|
||||
|
||||
/**
|
||||
* 2016-12-08
|
||||
* I *promise* that one day I will actually split this file into submodules
|
||||
* -cal
|
||||
*/
|
||||
function modalAlert(options) {
|
||||
if (typeof options !== "object" || options === null) {
|
||||
throw new Error("modalAlert() called without required parameter");
|
||||
}
|
||||
|
||||
var modal = makeModal();
|
||||
modal.addClass("cytube-modal-alert");
|
||||
modal.removeClass("fade");
|
||||
modal.find(".modal-dialog").addClass("modal-dialog-nonfluid");
|
||||
|
||||
if (options.title) {
|
||||
$("<h3/>").text(options.title).appendTo(modal.find(".modal-header"));
|
||||
}
|
||||
|
||||
var contentDiv = $("<div/>").addClass("modal-body");
|
||||
if (options.htmlContent) {
|
||||
contentDiv.html(options.htmlContent);
|
||||
} else if (options.textContent) {
|
||||
contentDiv.text(options.textContent);
|
||||
}
|
||||
|
||||
contentDiv.appendTo(modal.find(".modal-content"));
|
||||
|
||||
var footer = $("<div/>").addClass("modal-footer");
|
||||
var okButton = $("<button/>").addClass("btn btn-primary")
|
||||
.attr({ "data-dismiss": "modal"})
|
||||
.text("OK")
|
||||
.appendTo(footer);
|
||||
footer.appendTo(modal.find(".modal-content"));
|
||||
modal.appendTo(document.body);
|
||||
modal.modal();
|
||||
}
|
||||
|
||||
function queueMessage(data, type) {
|
||||
if (!data)
|
||||
data = { link: null };
|
||||
|
|
@ -2237,7 +2255,6 @@ function makeModal() {
|
|||
.appendTo(head);
|
||||
|
||||
wrap.on("hidden.bs.modal", function () {
|
||||
unhidePlayer();
|
||||
wrap.remove();
|
||||
});
|
||||
return wrap;
|
||||
|
|
@ -3160,11 +3177,6 @@ window.CSEMOTELIST = new CSEmoteList("#cs-emotes");
|
|||
window.CSEMOTELIST.sortAlphabetical = USEROPTS.emotelist_sort;
|
||||
|
||||
function showChannelSettings() {
|
||||
hidePlayer();
|
||||
$("#channeloptions").on("hidden.bs.modal", function () {
|
||||
unhidePlayer();
|
||||
});
|
||||
|
||||
$("#channeloptions").modal();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue