Fix login page to load user theme

This commit is contained in:
calzoneman 2013-05-14 18:07:55 -04:00
parent ad54cffee1
commit 25a2c053e9
1 changed files with 19 additions and 0 deletions

View File

@ -57,6 +57,25 @@
<script src="assets/js/jquery.js" type="text/javascript"></script> <script src="assets/js/jquery.js" type="text/javascript"></script>
<script src="assets/js/iourl.js" type="text/javascript"></script> <script src="assets/js/iourl.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(";");
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==" ") c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
var theme = readCookie("cytube_theme") || "default";
if(theme != "default") {
$("<link/>").attr("rel", "stylesheet")
.attr("type", "text/css")
.attr("id", "usertheme")
.attr("href", theme)
.appendTo($("head"));
}
var source; var source;
var respond = function(e) { var respond = function(e) {
if(e.data == "cytube-syn") { if(e.data == "cytube-syn") {