fix styles

This commit is contained in:
0chan 2024-02-14 00:45:59 +06:00
parent d81543e4d1
commit dfb0e80f66
3 changed files with 47 additions and 37 deletions

View file

@ -10,7 +10,7 @@ a {
h1, h2 { h1, h2 {
background: #DDDDEE; background: #DDDDEE;
text-align: left; text-align: left;
background-image: url(/web/20110328194504im_/http://www.0chan.ru/images/winter/topbar-center.png); background-image: url(/images/winter/topbar-center.png);
background-repeat: repeat-x; background-repeat: repeat-x;
} }
@ -32,7 +32,7 @@ h2 {
padding: 1px 4px 2px 4px; padding: 1px 4px 2px 4px;
margin: 0px 0px; margin: 0px 0px;
background: #8888FF; background: #8888FF;
background-image: url(/web/20110328194504im_/http://www.0chan.ru/images/winter/topbar-center.png); background-image: url(/images/winter/topbar-center.png);
background-repeat: repeat-x; background-repeat: repeat-x;
color: #000; color: #000;
border: 1px solid #00137F; border: 1px solid #00137F;

View file

@ -76,7 +76,7 @@
return E return E
}var D="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var E="";for(var C=0;C<8;C++){ }var D="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var E="";for(var C=0;C<8;C++){
var B=Math.floor(Math.random()*D.length);E+=D.substring(B,B+1) var B=Math.floor(Math.random()*D.length);E+=D.substring(B,B+1)
}set_cookie(A,E,365);return(E) }setCookie(A,E,365);return(E)
}function togglePassword(){ }function togglePassword(){
var C=(navigator.userAgent.indexOf("Safari")!=-1);var F=(navigator.userAgent.indexOf("Opera")!=-1);var B=(navigator.appName=="Netscape");var A=document.getElementById("passwordbox");var E;if((C)||(F)||(B)){ var C=(navigator.userAgent.indexOf("Safari")!=-1);var F=(navigator.userAgent.indexOf("Opera")!=-1);var B=(navigator.appName=="Netscape");var A=document.getElementById("passwordbox");var E;if((C)||(F)||(B)){
E=A.innerHTML E=A.innerHTML
@ -103,28 +103,36 @@
}A+="</span></td><td><input type=\"button\" value=\"Preview\" class=\"submit\" onclick=\"javascript:postpreview('preview"+D+"', '"+B+"', '"+D+"', document."+C+".message.value);\"></td>";document.getElementById("opt"+D).innerHTML=A;document.getElementById("opt"+D).style.display="" }A+="</span></td><td><input type=\"button\" value=\"Preview\" class=\"submit\" onclick=\"javascript:postpreview('preview"+D+"', '"+B+"', '"+D+"', document."+C+".message.value);\"></td>";document.getElementById("opt"+D).innerHTML=A;document.getElementById("opt"+D).style.display=""
} }
} }
}function getCookie(name){ }function getCookie(name) {
with(document.cookie){ var cookieValue = "";
var regexp=new RegExp("(^|;\\s+)"+name+"=(.*?)(;|$)");var hit=regexp.exec(document.cookie);if(hit&&hit.length>2){ var search = name + "=";
return Utf8.decode(unescape(replaceAll(hit[2],"+","%20"))) if (document.cookie.length > 0) {
}else{ var offset = document.cookie.indexOf(search);
return"" if (offset !== -1) {
} offset += search.length;
} var end = document.cookie.indexOf(";", offset);
}function set_cookie(C,D,E){ if (end === -1) end = document.cookie.length;
if(E){ cookieValue = document.cookie.substring(offset, end);
var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString() cookieValue = decodeURIComponent(cookieValue.replace(/\+/g, ' '));
}else{ }
A="" }
}document.cookie=C+"="+D+A+"; path=/" return cookieValue;
}function set_stylesheet(H,B,D){ }function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
}function set_stylesheet(H,B,D){
if(B){ if(B){
set_cookie("kustyle_txt",H,365) setCookie("kustyle_txt",H,365)
}else{ }else{
if((D)||(!D)){ if((D)||(!D)){
set_cookie("kustyle_site",H,365);set_cookie("kustyle",H,365) setCookie("kustyle_site",H,365);setCookie("kustyle",H,365)
}else{ }else{
set_cookie("kustyle",H,365) setCookie("kustyle",H,365)
} }
}var C=document.getElementsByTagName("link");var F=false;for(var E=0;E<C.length;E++){ }var C=document.getElementsByTagName("link");var F=false;for(var E=0;E<C.length;E++){
var A=C[E].getAttribute("rel");var G=C[E].getAttribute("title");if(A.indexOf("style")!=-1&&G){ var A=C[E].getAttribute("rel");var G=C[E].getAttribute("title");if(A.indexOf("style")!=-1&&G){
@ -173,20 +181,20 @@
} }
}function togglethread(A){ }function togglethread(A){
if(hiddenthreads.toString().indexOf(A)!==-1){ if(hiddenthreads.toString().indexOf(A)!==-1){
document.getElementById("unhidethread"+A).style.display="none";document.getElementById("thread"+A).style.display="block";hiddenthreads.splice(hiddenthreads.indexOf(A),1);set_cookie("hiddenthreads",hiddenthreads.join("!"),30) document.getElementById("unhidethread"+A).style.display="none";document.getElementById("thread"+A).style.display="block";hiddenthreads.splice(hiddenthreads.indexOf(A),1);setCookie("hiddenthreads",hiddenthreads.join("!"),30)
}else{ }else{
document.getElementById("unhidethread"+A).style.display="block";document.getElementById("thread"+A).style.display="none";hiddenthreads.push(A);set_cookie("hiddenthreads",hiddenthreads.join("!"),30) document.getElementById("unhidethread"+A).style.display="block";document.getElementById("thread"+A).style.display="none";hiddenthreads.push(A);setCookie("hiddenthreads",hiddenthreads.join("!"),30)
}return false }return false
}function toggleblotter(C){ }function toggleblotter(C){
var B=document.getElementsByTagName("li");var A=new Array();var D;for(i=0,iarr=0;i<B.length;i++){ var B=document.getElementsByTagName("li");var A=new Array();var D;for(i=0,iarr=0;i<B.length;i++){
att=B[i].getAttribute("class");if(att=="blotterentry"){ att=B[i].getAttribute("class");if(att=="blotterentry"){
D=B[i];if(D.style.display=="none"){ D=B[i];if(D.style.display=="none"){
D.style.display="";if(C){ D.style.display="";if(C){
set_cookie("ku_showblotter","1",365) setCookie("ku_showblotter","1",365)
} }
}else{ }else{
D.style.display="none";if(C){ D.style.display="none";if(C){
set_cookie("ku_showblotter","0",365) setCookie("ku_showblotter","0",365)
} }
} }
} }
@ -246,11 +254,11 @@
}) })
} }
}function hidewatchedthreads(){ }function hidewatchedthreads(){
set_cookie("showwatchedthreads","0",30);if(document.getElementById("watchedthreads")){ setCookie("showwatchedthreads","0",30);if(document.getElementById("watchedthreads")){
document.getElementById("watchedthreads").style.display="none" document.getElementById("watchedthreads").style.display="none"
} }
}function showwatchedthreads(){ }function showwatchedthreads(){
set_cookie("showwatchedthreads","1",30);window.location.reload(true) setCookie("showwatchedthreads","1",30);window.location.reload(true)
}function checkcaptcha(A){ }function checkcaptcha(A){
if(document.getElementById(A)){ if(document.getElementById(A)){
if(document.getElementById(A).captcha){ if(document.getElementById(A).captcha){
@ -327,7 +335,7 @@
} }
} }
} }
/*window.onunload=function(A){if(style_cookie){var B=get_active_stylesheet();set_cookie(style_cookie,B,365)}if(style_cookie_txt){var B=get_active_stylesheet();set_cookie(style_cookie_txt,B,365)}if(style_cookie_site){}};*/ /*window.onunload=function(A){if(style_cookie){var B=get_active_stylesheet();setCookie(style_cookie,B,365)}if(style_cookie_txt){var B=get_active_stylesheet();setCookie(style_cookie_txt,B,365)}if(style_cookie_site){}};*/
window.onload=function(D){/*addpreviewevents();*/ window.onload=function(D){/*addpreviewevents();*/
delandbanlinks(); delandbanlinks();
checkgotothread(); checkgotothread();
@ -344,9 +352,9 @@
B() B()
} }
});function E(){ });function E(){
set_cookie("watchedthreadstop",document.getElementById("watchedthreads").style.top,30);set_cookie("watchedthreadsleft",document.getElementById("watchedthreads").style.left,30) setCookie("watchedthreadstop",document.getElementById("watchedthreads").style.top,30);setCookie("watchedthreadsleft",document.getElementById("watchedthreads").style.left,30)
}function B(){ }function B(){
var F=document.getElementById("watchedthreads").offsetWidth;var G=document.getElementById("watchedthreads").offsetHeight;set_cookie("watchedthreadswidth",F,30);set_cookie("watchedthreadsheight",G,30) var F=document.getElementById("watchedthreads").offsetWidth;var G=document.getElementById("watchedthreads").offsetHeight;setCookie("watchedthreadswidth",F,30);setCookie("watchedthreadsheight",G,30)
} }
} }
@ -383,7 +391,7 @@ function updatenewpostscount() {
document.getElementById('newposts_' + pair[0]).innerHTML = ' (' + pair[1] + ')'; document.getElementById('newposts_' + pair[0]).innerHTML = ' (' + pair[1] + ')';
} }
} }
}document.getElementById('refreshnewposts').innerHTML = '<a href="#" onclick="javascript:updatenewpostscount();return false" target="_self">Обновить</a>';set_cookie('kus_lastvisit', resp[1], 365); }document.getElementById('refreshnewposts').innerHTML = '<a href="#" onclick="javascript:updatenewpostscount();return false" target="_self">Обновить</a>';setCookie('kus_lastvisit', resp[1], 365);
}, },
onFailure: function(){ onFailure: function(){
alert('Something went wrong...') alert('Something went wrong...')
@ -448,7 +456,9 @@ function checkgotothread(){
} else { } else {
checkd = false; checkd = false;
} }
document.getElementById('gotothread').checked = checkd; let gtt = document.getElementById('gotothread');
if (gtt)
gtt.checked = checkd;
} }
function navigatepages (event) function navigatepages (event)

View file

@ -17,9 +17,9 @@
<link rel="stylesheet" type="text/css" href="/css/sitemenu_autumn.css" title="Autumn"> <link rel="stylesheet" type="text/css" href="/css/sitemenu_autumn.css" title="Autumn">
<link rel="alternate stylesheet" type="text/css" href="/css/site_photon.css" title="Photon"> <link rel="alternate stylesheet" type="text/css" href="/css/site_photon.css" title="Photon">
<link rel="alternate stylesheet" type="text/css" href="/css/sitemenu_photon.css" title="Photon"> <link rel="alternate stylesheet" type="text/css" href="/css/sitemenu_photon.css" title="Photon">
<script type="text/javascript"><!-- <script type="text/javascript">
var style_cookie_site = "kustyle_site"; var style_cookie_site = "kustyle_site";
//--></script> </script>
<script type="text/javascript" src="/lib/javascript/kusaba.js"></script> <script type="text/javascript" src="/lib/javascript/kusaba.js"></script>
<link rel="shortcut icon" href="/favicon.ico"> <link rel="shortcut icon" href="/favicon.ico">
<script type="text/javascript"> <script type="text/javascript">
@ -31,7 +31,7 @@
tog.style.display="none"; tog.style.display="none";
} }
button.innerHTML=(tog.style.display)?'+':'&minus;'; button.innerHTML=(tog.style.display)?'+':'&minus;';
set_cookie('nav_show_'+area, tog.style.display?'0':'1', 30); setCookie('nav_show_'+area, tog.style.display?'0':'1', 30);
} }
function showstyleswitcher() { function showstyleswitcher() {
var switcher = document.getElementById('sitestyles'); var switcher = document.getElementById('sitestyles');
@ -51,11 +51,11 @@
} }
} }
function hidedirs() { function hidedirs() {
set_cookie('tcshowdirs', '', 30); setCookie('tcshowdirs', '', 30);
window.location = '/menu.html'; window.location = '/menu.html';
} }
function showdirs() { function showdirs() {
set_cookie('tcshowdirs', 'yes', 30); setCookie('tcshowdirs', 'yes', 30);
window.location = '/menu.html'; window.location = '/menu.html';
} }
if (getCookie('tcshowdirs') == 'yes') { if (getCookie('tcshowdirs') == 'yes') {