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 {
background: #DDDDEE;
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;
}
@ -32,7 +32,7 @@ h2 {
padding: 1px 4px 2px 4px;
margin: 0px 0px;
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;
color: #000;
border: 1px solid #00137F;

View File

@ -76,7 +76,7 @@
return E
}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)
}set_cookie(A,E,365);return(E)
}setCookie(A,E,365);return(E)
}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)){
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=""
}
}
}function getCookie(name){
with(document.cookie){
var regexp=new RegExp("(^|;\\s+)"+name+"=(.*?)(;|$)");var hit=regexp.exec(document.cookie);if(hit&&hit.length>2){
return Utf8.decode(unescape(replaceAll(hit[2],"+","%20")))
}else{
return""
}
}
}function set_cookie(C,D,E){
if(E){
var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString()
}else{
A=""
}document.cookie=C+"="+D+A+"; path=/"
}function set_stylesheet(H,B,D){
}function getCookie(name) {
var cookieValue = "";
var search = name + "=";
if (document.cookie.length > 0) {
var offset = document.cookie.indexOf(search);
if (offset !== -1) {
offset += search.length;
var end = document.cookie.indexOf(";", offset);
if (end === -1) end = document.cookie.length;
cookieValue = document.cookie.substring(offset, end);
cookieValue = decodeURIComponent(cookieValue.replace(/\+/g, ' '));
}
}
return cookieValue;
}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){
set_cookie("kustyle_txt",H,365)
setCookie("kustyle_txt",H,365)
}else{
if((D)||(!D)){
set_cookie("kustyle_site",H,365);set_cookie("kustyle",H,365)
setCookie("kustyle_site",H,365);setCookie("kustyle",H,365)
}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 A=C[E].getAttribute("rel");var G=C[E].getAttribute("title");if(A.indexOf("style")!=-1&&G){
@ -173,20 +181,20 @@
}
}function togglethread(A){
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{
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
}function toggleblotter(C){
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"){
D=B[i];if(D.style.display=="none"){
D.style.display="";if(C){
set_cookie("ku_showblotter","1",365)
setCookie("ku_showblotter","1",365)
}
}else{
D.style.display="none";if(C){
set_cookie("ku_showblotter","0",365)
setCookie("ku_showblotter","0",365)
}
}
}
@ -246,11 +254,11 @@
})
}
}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"
}
}function showwatchedthreads(){
set_cookie("showwatchedthreads","1",30);window.location.reload(true)
setCookie("showwatchedthreads","1",30);window.location.reload(true)
}function checkcaptcha(A){
if(document.getElementById(A)){
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();*/
delandbanlinks();
checkgotothread();
@ -344,9 +352,9 @@
B()
}
});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(){
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('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(){
alert('Something went wrong...')
@ -448,7 +456,9 @@ function checkgotothread(){
} else {
checkd = false;
}
document.getElementById('gotothread').checked = checkd;
let gtt = document.getElementById('gotothread');
if (gtt)
gtt.checked = checkd;
}
function navigatepages (event)

View File

@ -17,9 +17,9 @@
<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/sitemenu_photon.css" title="Photon">
<script type="text/javascript"><!--
<script type="text/javascript">
var style_cookie_site = "kustyle_site";
//--></script>
</script>
<script type="text/javascript" src="/lib/javascript/kusaba.js"></script>
<link rel="shortcut icon" href="/favicon.ico">
<script type="text/javascript">
@ -31,7 +31,7 @@
tog.style.display="none";
}
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() {
var switcher = document.getElementById('sitestyles');
@ -51,11 +51,11 @@
}
}
function hidedirs() {
set_cookie('tcshowdirs', '', 30);
setCookie('tcshowdirs', '', 30);
window.location = '/menu.html';
}
function showdirs() {
set_cookie('tcshowdirs', 'yes', 30);
setCookie('tcshowdirs', 'yes', 30);
window.location = '/menu.html';
}
if (getCookie('tcshowdirs') == 'yes') {