mirror of https://github.com/calzoneman/sync.git
Fix login page to load user theme
This commit is contained in:
parent
ad54cffee1
commit
25a2c053e9
|
@ -57,6 +57,25 @@
|
|||
<script src="assets/js/jquery.js" type="text/javascript"></script>
|
||||
<script src="assets/js/iourl.js" type="text/javascript"></script>
|
||||
<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 respond = function(e) {
|
||||
if(e.data == "cytube-syn") {
|
||||
|
|
Loading…
Reference in New Issue