diff --git a/css/img_global.css b/css/img_global.css
index 2da3649..9e8987a 100644
--- a/css/img_global.css
+++ b/css/img_global.css
@@ -517,7 +517,7 @@ pre {
.closebox, .delete {
background-position: -16px 0px;
-}
+}
.ban {
background-position: 0px -32px;
@@ -627,16 +627,16 @@ border-radius: 5px;
}
/* Node insertion detection #snivystuff */
-@-o-keyframes nodeInserted {
+@-o-keyframes nodeInserted {
from { clip: rect(1px, auto, auto, auto); }
- to { clip: rect(0px, auto, auto, auto); }
+ to { clip: rect(0px, auto, auto, auto); }
}
-@keyframes nodeInserted {
+@keyframes nodeInserted {
from { clip: rect(1px, auto, auto, auto); }
- to { clip: rect(0px, auto, auto, auto); }
+ to { clip: rect(0px, auto, auto, auto); }
}
-@-webkit-keyframes nodeInserted {
+@-webkit-keyframes nodeInserted {
from { clip: rect(1px, auto, auto, auto); }
to { clip: rect(0px, auto, auto, auto); }
}
@@ -649,7 +649,7 @@ border-radius: 5px;
-webkit-animation-duration: 0.001s;
animation-name: nodeInserted;
-o-animation-name: nodeInserted;
- -ms-animation-name: nodeInserted;
+ -ms-animation-name: nodeInserted;
-moz-animation-name: nodeInserted;
-webkit-animation-name: nodeInserted;
}
@@ -909,7 +909,7 @@ border: none;
}
@media (min-width: 600px) {
.replymode, .passvalid, .catalogmode {
- margin-top: -20px;
+ margin-top: -20px;
}
}
.spin-around {
@@ -972,7 +972,7 @@ border: none;
.expand-on-hover-enabled .cat-entry:not(.thumbExpanded):hover .cat-card {
position: absolute;
height: auto;
-
+
top: 0px;
}
.expand-on-hover-enabled .ce-text.cat-entry:not(.thumbExpanded):hover .cat-card {
@@ -1160,7 +1160,7 @@ border: none;
}
.cat-entry:not(.thumbExpanded):hover:after {
opacity: 0;
-}/*
+}/*
.bigThumb .icon {
position: absolute;
bottom: 3px;
@@ -1252,16 +1252,16 @@ border: none;
}
/* cat-bt-embed insertion detection */
-@-o-keyframes embed-image-insert {
+@-o-keyframes embed-image-insert {
from { clip: rect(1px, auto, auto, auto); }
- to { clip: rect(0px, auto, auto, auto); }
+ to { clip: rect(0px, auto, auto, auto); }
}
-@keyframes embed-image-insert {
+@keyframes embed-image-insert {
from { clip: rect(1px, auto, auto, auto); }
- to { clip: rect(0px, auto, auto, auto); }
+ to { clip: rect(0px, auto, auto, auto); }
}
-@-webkit-keyframes embed-image-insert {
+@-webkit-keyframes embed-image-insert {
from { clip: rect(1px, auto, auto, auto); }
to { clip: rect(0px, auto, auto, auto); }
}
@@ -1273,7 +1273,7 @@ border: none;
-webkit-animation-duration: 0.001s;
animation-name: embed-image-insert;
-o-animation-name: embed-image-insert;
- -ms-animation-name: embed-image-insert;
+ -ms-animation-name: embed-image-insert;
-moz-animation-name: embed-image-insert;
-webkit-animation-name: embed-image-insert;
}
@@ -1352,7 +1352,7 @@ border: none;
pointer-events: none;
}
-input::-webkit-input-placeholder {opacity: 0; }
+input::-webkit-input-placeholder {opacity: 0; }
input:-moz-placeholder {opacity: 0; }
.onsmall-show {
@@ -1442,7 +1442,7 @@ input:-moz-placeholder {opacity: 0; }
.maintable hr {
margin:0;
}
- input::-webkit-input-placeholder {opacity: 1; }
+ input::-webkit-input-placeholder {opacity: 1; }
input:-moz-placeholder {opacity: 1; }
hr {
margin: 0!important;
@@ -1608,8 +1608,8 @@ input[readonly] {
padding: 0 10px;
}
.pmsg-form button {
- width: 40%;
- margin: 0 5%;
+ width: 40%;
+ margin: 0 5%;
max-width: 150px;
}
input:disabled {
@@ -1648,7 +1648,7 @@ td > .bubble {
width: 0;
z-index: 0;
border-width: 7px 12px 7px 0;
-}
+}
.bubble:not(.thought-bubble):after, .bubble:not(.thought-bubble):before {
border-style: solid;
}
@@ -1686,7 +1686,7 @@ td > .bubble {
}
.bubble:not(.thought-bubble):before {
content: none;
-}
+}
.emoji {
vertical-align: middle;
@@ -1698,7 +1698,7 @@ i .emoji {
transform: skewX(-20deg);
}
-.postbody::-webkit-scrollbar,
+.postbody::-webkit-scrollbar,
.prettyprint::-webkit-scrollbar,
.code_part::-webkit-scrollbar {
width: 8px;
@@ -2042,7 +2042,7 @@ blockquote {
display: none;
}
.add-embed:not(:checked) + label + br + .multiembedwrap,
-.add-embed:not(:checked) + label + br + .multiembedwrap + .add-embed,
+.add-embed:not(:checked) + label + br + .multiembedwrap + .add-embed,
.add-embed:not(:checked) + label + br + .multiembedwrap + .add-embed + label,
.add-embed:not(:checked) + label + br + .multiembedwrap + .add-embed + label + br {
display: none;
@@ -2056,7 +2056,7 @@ blockquote {
box-shadow: 0 0 3px 4px red;
}
-/*New embeds*/
+/*New embeds*/
.embed-wrap {
position: relative;
font-size: 0;
@@ -2108,7 +2108,7 @@ blockquote {
opacity: 0.8;
-webkit-transition: opacity 0.4s;
-o-transition: opacity 0.4s;
- transition:
+ transition:
opacity 0.4s;
z-index: 3;
/* height: 5.3rem; */
diff --git a/css/modern.css b/css/modern.css
index 0ebce10..7f4274b 100644
--- a/css/modern.css
+++ b/css/modern.css
@@ -16,7 +16,7 @@ a:visited {
}
a:hover {
color: rgb(23, 53, 85);
-}
+}
.adminbar {
clear:both;
float:right;
@@ -314,7 +314,7 @@ color: #000;
}
.bg-button:hover {
background-color: rgb(255, 255, 255);
- color: black;;
+ color: black;;
}
.bgb-selected, .bgb-selected:hover {
background: #BDD4EC;
diff --git a/css/newdark.css b/css/newdark.css
index b2c7dfa..c63cd6a 100644
--- a/css/newdark.css
+++ b/css/newdark.css
@@ -12,7 +12,7 @@ a:visited {
}
a:hover {
color: rgb(54, 171, 133);
-}
+}
.adminbar {
clear:both;
float:right;
@@ -122,7 +122,7 @@ a:visited {
}
.reply {
background: #363F4C;
- padding-right: 3px;
+ padding-right: 3px;
padding: 1px 3px 1px 1px;
border: 1px solid rgb(31, 37, 44);
}
@@ -352,7 +352,7 @@ color: rgb(55, 201, 153);
}
.bg-button:hover {
background-color: rgba(255, 255, 255, 0.12);
- color: #fff;
+ color: #fff;
}
.bgb-selected, .bgb-selected:hover {
background: #167355;
diff --git a/dwoo/templates/board_header.tpl b/dwoo/templates/board_header.tpl
index 33a8bfa..621015f 100644
--- a/dwoo/templates/board_header.tpl
+++ b/dwoo/templates/board_header.tpl
@@ -78,20 +78,20 @@
{/foreach}
diff --git a/dwoo/templates/board_post_box_wrapper.tpl b/dwoo/templates/board_post_box_wrapper.tpl
index 297de0a..95c05ab 100644
--- a/dwoo/templates/board_post_box_wrapper.tpl
+++ b/dwoo/templates/board_post_box_wrapper.tpl
@@ -14,7 +14,7 @@ class="reflinkpreview content-background qreplyform" style="display:none">
{if $topads neq ''}
-
+
{$topads}
diff --git a/inc/func/custom.php b/inc/func/custom.php
index a8b9df2..06899bb 100644
--- a/inc/func/custom.php
+++ b/inc/func/custom.php
@@ -7,7 +7,7 @@
$img = imagecreatetruecolor($width, $height);
imagealphablending($img, false);
imagesavealpha($img, true);
-
+
// Apply the transparent background
$trans = imagecolorallocatealpha($img, 0, 0, 0, 127);
for ($x = 0; $x < $width; $x++)
@@ -17,58 +17,58 @@
imagesetpixel($img, $x, $y, $trans);
}
}
-
+
return $img;
-}
-
+}
+
function rainbow ($ip, $threadno)
{
$size=16;
$steps=2;
$step=$size/$steps;
-
+
$string = $ip . $threadno;
-
+
$image = image_create_alpha($size, $size);
-
+
$n = 0;
$prev = 0;
-
+
$len = strlen($string);
$sum = 0;
for ($i=0;$i<$len;$i++) $sum += ord($string[$i]);
-
+
for ($i=0;$i<$steps;$i++) {
for ($j=0;$j<$steps;$j++) {
$letter = $string[$n++ % $len];
-
+
$u = ($n % (ord($letter)+$sum)) + ($prev % (ord($letter)+$len)) + (($sum-1) % ord($letter));
$color = imagecolorallocate($image, pow($u*$prev+$u+$prev+5,2)%256, pow($u*$prev+$u+$prev+3,2)%256, pow($u*$prev+$u+$prev+1,2)%256);
if (($u%2)==0)
imagefilledpolygon($image, array($i*$step, $j*$step, $i*$step+$step, $j*$step, $i*$step, $j*$step+$step), 3, $color);
$prev = $u;
-
+
$u = ($n % (ord($letter)+$len)) + ($prev % (ord($letter)+$sum)) + (($sum-1) % ord($letter));
if (($u%2)==0)
imagefilledpolygon($image, array($i*$step, $j*$step+$step, $i*$step+$step, $j*$step+$step, $i*$step+$step, $j*$step), 3, $color);
$prev = $u;
-
+
}
}
-
- ob_start ();
+
+ ob_start ();
imagepng ($image);
- $image_data = ob_get_contents ();
+ $image_data = ob_get_contents ();
- ob_end_clean ();
+ ob_end_clean ();
return base64_encode ($image_data);
-}
+}
function omitted_syntax($posts, $images) {
- $pd = declense($posts); $id = declense($images);
+ $pd = declense($posts); $id = declense($images);
if($pd == 0) $pw = 'постов';
elseif($pd == 1) $pw = 'пост';
else $pw = 'поста';
diff --git a/lib/javascript/es6/src/kusaba.new.js b/lib/javascript/es6/src/kusaba.new.js
index 1bbf9ac..83cd815 100644
--- a/lib/javascript/es6/src/kusaba.new.js
+++ b/lib/javascript/es6/src/kusaba.new.js
@@ -18,7 +18,7 @@ var _messages = {
NewThread: "New thread",
replyTo: "reply to",
cancel: "Cancel",
- update: "Update",
+ update: "Update",
updatingCounts: "Updating...",
couldntFetch: "Cold not fetch this post",
noNewPosts: "No new posts",
@@ -28,7 +28,7 @@ var _messages = {
settings_sfwMode: "NSFW mode",
settings_expandImgFull: "Expand images to full size",
settings_constrainWidth: "Constrain content width",
- delete: "Delete post",
+ delete: "Delete post",
deleteAndBan: "Delete post and ban poster",
enterCaptcha: "Please enter captcha.",
selectText: "Select some text",
@@ -103,7 +103,7 @@ var _messages = {
NewThread: "Создать тред",
replyTo: "ответ на",
cancel: "Отмена",
- update: "Обновить",
+ update: "Обновить",
updatingCounts: "Ищем новые посты...",
couldntFetch: "Не удалось загрузить этот пост",
noNewPosts: "Нет новых постов",
@@ -113,13 +113,13 @@ var _messages = {
settings_sfwMode: "Мамка в комнате",
settings_expandImgFull: "Разворачивать картинки до исходного размера",
settings_constrainWidth: "Ограничивать ширину контента",
- delete: "Удалить пост",
+ delete: "Удалить пост",
deleteAndBan: "Удалить пост и забанить постера",
enterCaptcha: "Пожалуйста, введите капчу.",
selectText: "Текст не выделен",
dcls: "Double click to show source",
watchOn: "Смотреть на",
- odc: "javascript:LatexIT.replaceWithSrc(this);",
+ odc: "javascript:LatexIT.replaceWithSrc(this);",
captcharot: "Капча протухла",
threadUpdationAutomatically: "Тред обновляется автоматически",
stopFuckingDolls: "Отключите AJAX-отправку постов и AJAX-обновление треда.
(Кликните, чтобы закрыть)",
@@ -184,18 +184,18 @@ var _l = (typeof locale !== 'undefined' && _messages.hasOwnProperty(locale)) ? _
function trace() {
if (!console.log) return;
-
+
var f = arguments.callee.caller;
var path = arguments[0];
if (path == '') path += "trace()";
-
+
while (f != null) {
var re = /function ([^\(]+)/;
var fname = re.exec(f.toString());
if (fname == null) fname = ''; else fname = fname[1];
var args = [];
for (var i = 0; i < f.arguments.length; i++) args.push(f.arguments[i]);
- fname += "(" + args.join(', ') + ")";
+ fname += "(" + args.join(', ') + ")";
path += ' <- ' + fname;
f = f.caller;
}
@@ -222,7 +222,7 @@ if (!Array.prototype.indexOf) {
return -1;
};
}
-
+
/* Utf8 strings de-/encoder */
var Utf8 = {
// public method for url encoding
@@ -291,7 +291,7 @@ function Cookie(name) {
document.cookie=name+"="+value+expires+"; path=/";
}
}
-
+
function replaceAll(str, from, to) {
var idx = str.indexOf( from );
@@ -306,10 +306,10 @@ function replaceAll(str, from, to) {
function insert(text) {
var textarea = (($('#postclone').length && $('#postclone').css('display') !== 'none') ? $('#postclone') : $('#postform')).find('textarea')[0];
if(textarea) {
- if(textarea.createTextRange && textarea.caretPos) { // IE
+ if(textarea.createTextRange && textarea.caretPos) { // IE
var caretPos=textarea.caretPos;
caretPos.text=caretPos.text.charAt(caretPos.text.length-1)==" "?text+" ":text;
- } else if(textarea.setSelectionRange) { // Firefox
+ } else if(textarea.setSelectionRange) { // Firefox
var start=textarea.selectionStart;
var end=textarea.selectionEnd;
textarea.value=textarea.value.substr(0,start)+text+textarea.value.substr(end);
@@ -355,14 +355,14 @@ function bullets($target, bullet, istart, iend) {
if(i < (selected.length - 1)) newtxt += '\n';
}
$area.val(
- $area.val().substring(0, startPos)
- + newtxt +
+ $area.val().substring(0, startPos)
+ + newtxt +
$area.val().substring(endPos)
- );
+ );
}
-}
-
-function quote(b, a) {
+}
+
+function quote(b, a) {
var v = eval("document." + a + ".message");
v.value += ">>" + b + "\n";
v.focus();
@@ -394,8 +394,8 @@ function highlight(id, offTimeout=0) {
, spaceAround = docHeight - bcr.height
window.scrollTo(0, postX - (spaceAround ? Math.ceil(spaceAround/2) : 0))
}
-}
-
+}
+
function get_password(name) {
var pass = getCookie(name);
if(pass) return pass;
@@ -425,8 +425,8 @@ function togglePassword() {
function toggleOptions(D,C,B){ trace('deprecated!') }
// proxied functions
-function getCookie(name) { return Cookie(name) }
-function set_cookie(name,value,days) { return Cookie(name,value,days) }
+function getCookie(name) { return Cookie(name) }
+function set_cookie(name,value,days) { return Cookie(name,value,days) }
var Styles = {
all: [], titles: [],
@@ -462,8 +462,8 @@ var Styles = {
})
this.$cancelLink = $('').append($clink)
return
- }
- if(this.hasOwnProperty('custom') && !this.customBypass)
+ }
+ if(this.hasOwnProperty('custom') && !this.customBypass)
return this.setCustom();
var sc = getCookie(style_cookie);
if(sc && in_array(sc, this.titles))
@@ -471,7 +471,7 @@ var Styles = {
else {
this.setDefault();
set_cookie("kustyle_site",this._default,365);
- set_cookie("kustyle",this._default,365);
+ set_cookie("kustyle",this._default,365);
}
},
change: function(stylename) {
@@ -484,7 +484,7 @@ var Styles = {
if(this.hasOwnProperty('custom'))
this.addBypass();
set_cookie("kustyle_site",stylename,365);
- set_cookie("kustyle",stylename,365);
+ set_cookie("kustyle",stylename,365);
}
},
removeBypass: function() {
@@ -575,13 +575,13 @@ function delandbanlinks($scope=$('body')) {
let dnbinfo = $(this).attr('id').split('-')
/*, newhtml = `
-
-
').appendTo('#postclone');
//Dollscript rape begins
- //Switch captcha language
+ //Switch captcha language
/*dcxt.addTask(function() {
dcxt.openSettings();
//Switch to "form" tab
$('.de-cfg-tab[info=form]')[0].click();
//Switch language if it's set wrong
if(captchalang == 'ru' && $('select[info=captchaLang] option:selected').val() !== $('select[info=captchaLang] option:contains(Rus)').val()) {
- $('select[info=captchaLang]').val($('select[info=captchaLang] option:contains(Rus)').val()).triggerNative('change');
+ $('select[info=captchaLang]').val($('select[info=captchaLang] option:contains(Rus)').val()).triggerNative('change');
}
if(captchalang == 'en' && $('select[info=captchaLang] option:selected').val() !== $('select[info=captchaLang] option:contains(Eng)').val()) {
- $('select[info=captchaLang]').val($('select[info=captchaLang] option:contains(Eng)').val()).triggerNative('change');
+ $('select[info=captchaLang]').val($('select[info=captchaLang] option:contains(Eng)').val()).triggerNative('change');
}
dcxt.closeSettings();
});*/
@@ -1733,7 +1733,7 @@ function readyset() {
var socket = io.connect(liveupd_api);
if(ispage) {
var subscribeTo = [liveupd_sitename+this_board_dir+':newthreads'];
- $('.op .reflink').children(':last-child').each(function() {
+ $('.op .reflink').children(':last-child').each(function() {
subscribeTo.push(liveupd_sitename+this_board_dir+':'+$(this).text());
});
socket.on('update', updater.bpageNotify)
@@ -1819,7 +1819,7 @@ function readyset() {
}
$('body').on('click', '.posttypeindicator a', function() {
- var xl = $(this);
+ var xl = $(this);
var offset = $('[name="' + xl.attr('href').substr(1) + '"]').offset() || $('[name="' + xl.text().split('>>')[1] + '"]').offset() || false;
if(offset) {
$('html, body').animate({
@@ -1845,19 +1845,19 @@ function readyset() {
$('#directLink, #quoteLink').on("click", function() { $(this).select(); });
//Ultimate YOBA Youtube embeds
- $('body').on('click','.embed-play-button', function(ev) {
+ $('body').on('click','.embed-play-button', function(ev) {
ev.preventDefault()
- unwrapEmbed($(this).parents('figure'))
+ unwrapEmbed($(this).parents('figure'))
});
- $('body').on('click','.collapse-video', function(ev) {
+ $('body').on('click','.collapse-video', function(ev) {
ev.preventDefault()
- wrapEmbed($(this).parents('figure'))
+ wrapEmbed($(this).parents('figure'))
});
// $('body').on('click','.embed', function() {$(this).unwrap() });
//detect node insertions and process them
$(document).on('animationstart webkitAnimationStart MSAnimationStart oanimationstart', function(event) {
var $target = $(event.target);
- if (event.originalEvent.animationName == "nodeInserted" && !$target.hasClass('_inserted_'))
+ if (event.originalEvent.animationName == "nodeInserted" && !$target.hasClass('_inserted_'))
processNodeInsertion($target);
});
$('body').on('mouseenter', '._country_', function() {
@@ -1967,13 +1967,13 @@ function readyset() {
// this will be applied to every new inserted node (post)
function processNodeInsertion($node) {
- if(typeof $node === 'undefined')
+ if(typeof $node === 'undefined')
$node = $('body');
else {
$node.addClass('_inserted_');
$node = $node.parents(":eq(1)");
}
- if($node.find('.prettyprint').length)
+ if($node.find('.prettyprint').length)
prettyPrint.apply(window);
LatexIT.render($node);
processEmbeds($node);
@@ -2070,7 +2070,7 @@ var updater = {
if (data) {
$target.append($(data));
replyMap.showReplies()
-
+
} else {
popupMessage(_l.noNewPosts);
}
@@ -2081,7 +2081,7 @@ var updater = {
}
});
});
- }
+ }
},
send: function($form) {
if(!this.ajaxPosting) {
@@ -2095,10 +2095,10 @@ function processEmbeds($scope) {
$scope.find('.embed:not(.title-given)').each(function() {
var container = $(this);
var vidID = container.data('id');
- if(container.data('site') === 'youtube') {
+ if(container.data('site') === 'youtube') {
$.get('https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet&id='+vidID+'&key='+ku_youtube_apikey, function(res) {
if(!res.error && res.items.length) {
- var videotitle = res.items[0].snippet.title;
+ var videotitle = res.items[0].snippet.title;
container.append($('').addClass('yt-title-overlay').text(videotitle).attr('href', 'http://www.youtube.com/watch?v='+vidID)
.click(function(ev) { ev.stopPropagation(); }));
}
@@ -2132,9 +2132,9 @@ if (+localStorage['localmod']) {
else {
let kumod = getCookie('kumod');
if (kumod !== '') {
- if (kumod === 'allboards')
+ if (kumod === 'allboards')
kumod_set = true
- else
+ else
kumod_set = in_array(this_board_dir, kumod.split('|'));
}
}
@@ -2186,7 +2186,7 @@ function expandwebm($mov, ev) {
//good luck understanding this shitcode :^)
let $reply = $mov.parents('.reply')
if($mov.data('expanded') !== '1') {
- ev.preventDefault();
+ ev.preventDefault();
var movieurl = $mov.attr('href'), imgh = $mov.data('height'), imgw = $mov.data('width'), dt = $mov.data('thumb'), postnum = $mov.data('id');
var uid = '_vframe_'+makeid()+(new Date().getTime());
$mov.replaceWith(function() {
@@ -2270,7 +2270,7 @@ function checknamesave(){
if (doc != null) doc.checked = checkd;
}
function checkgotothread(){
- var checkd;
+ var checkd;
if(getCookie('tothread') == 'on') {
checkd = true;
} else {
@@ -2359,7 +2359,7 @@ function navigatepages (event)
}
}
}
-
+
if (window.document.addEventListener) {
window.document.addEventListener("keydown", navigatepages, false);
@@ -2388,7 +2388,7 @@ var replyMap = {
if (links.length) links.forEach(link => {
let linkData = link.className.split(' ')[0].split('|')
, linkN = linkData[3]
- , href = linkData[2] !== ''
+ , href = linkData[2] !== ''
? `/${linkData[1]}/res/${linkData[2]}.html#${n}`
: `${ku_boardspath}/postbynumber.php?b=${linkData[1]}&p=${linkData[3]}`
, htm = `>>${n}`
@@ -2421,8 +2421,8 @@ var scrollAnchor = {
dimensions = dimensions || 'vh'
let mid = [window.innerWidth / 2, window.innerHeight / 2]
, elMap = []
- , parentBCR = (parent != window)
- ? parent.getBoundingClientRect()
+ , parentBCR = (parent != window)
+ ? parent.getBoundingClientRect()
: {
left: 0,
top: 0,
@@ -2432,9 +2432,9 @@ var scrollAnchor = {
if (
parent != window
&&
- (
- (parentBCR.left <= 0 && parentBCR.right <= 0)
- ||
+ (
+ (parentBCR.left <= 0 && parentBCR.right <= 0)
+ ||
(parentBCR.top <= 0 && parentBCR.bottom <= 0)
||
parentBCR.left >= window.innerWidth
@@ -2504,7 +2504,7 @@ Math.pos = x => x >= 0 ? x : 0;
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
}
-
+
if (!window.requestAnimationFrame)
window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime();
@@ -2513,7 +2513,7 @@ Math.pos = x => x >= 0 ? x : 0;
lastTime = currTime + timeToCall;
return id;
};
-
+
if (!window.cancelAnimationFrame)
window.cancelAnimationFrame = function(id) {
clearTimeout(id);
@@ -2544,7 +2544,7 @@ function menu_pin(){
if(document.getElementById('overlay_menu').style.position == 'absolute') {
document.getElementById('overlay_menu').style.position = 'fixed';
Cookie('ku_menutype', 'fixed', 365);
- } else {
+ } else {
document.getElementById('overlay_menu').style.position = 'absolute';
Cookie('ku_menutype', 'absolute', 365);
}
@@ -2568,7 +2568,7 @@ var LatexIT = {
this.mode='svg';
},
odc: "javascript:LatexIT.replaceWithSrc(this);",
- dcls: "Double click to show source",
+ dcls: "Double click to show source",
pre : function(eqn) {
var txt=eqn.innerHTML;
@@ -2576,7 +2576,7 @@ var LatexIT = {
{
//Clean code
txt=txt.replace(/
/gi,"").replace(/
/gi,"").replace(/&/mg,'&');
- var atxt = "[tex]"+txt+"[/tex]";
+ var atxt = "[tex]"+txt+"[/tex]";
txt=escape(txt.replace(/\\/mg,'\\'));
// Add coloring according to style of text
var c = eval("LatexIT.normalize"+$(eqn).parent().css('color'));
@@ -2585,7 +2585,7 @@ var LatexIT = {
}
return txt;
},
-
+
replaceWithSrc: function(eqn) {
var txt = $(eqn).attr('alt');
$(eqn).parent().html(txt);
@@ -2597,7 +2597,7 @@ var LatexIT = {
for (var i=0; i 1) {
_.each(data, function(bnr) {
@@ -3193,7 +3193,7 @@ var ffdata = {
$('#postclone').show();
}
else localStorage.removeItem(key);
-
+
}
catch(e) {
localStorage.removeItem(key);
@@ -3320,7 +3320,7 @@ var catalog = {
$(this).toggleClass('date-on name-on');
})
.on('click', '.ce-text .bigThumb', function(ev) {
- ev.stopPropagation(); ev.preventDefault();
+ ev.stopPropagation(); ev.preventDefault();
var $card = $(this).parents('.cat-entry');
$card.toggleClass('thumbExpanded');
})
@@ -3329,7 +3329,7 @@ var catalog = {
})
.on('animationstart webkitAnimationStart MSAnimationStart oanimationstart', (function(event) {
var $target = $(event.target);
- if (event.originalEvent.animationName == "embed-image-insert" && !$target.hasClass('_inserted_'))
+ if (event.originalEvent.animationName == "embed-image-insert" && !$target.hasClass('_inserted_'))
this.getEmbedThumb($target);
}).bind(this))
.on('mousedown', '.cat-prv', function(ev) {
@@ -3356,7 +3356,7 @@ var catalog = {
$target.html('');
HiddenThreads.hide(threadID);
$card.addClass('thread-hidden')
- }
+ }
else {
$target[0].classList.remove('hidden-on');
$target.html('');
@@ -3438,7 +3438,7 @@ var catalog = {
? ( (locale === 'ru')
? (dd+'.'+mo+'.'+yy+' в ')
: (mo+'/'+dd+'/'+yy+' @ ') )
- : ( (locale === 'ru')
+ : ( (locale === 'ru')
? (Dow+' '+dd+' '+Mon+'’'+yy+' в ')
: (mo+'/'+dd+'/'+yy+' ('+Dow+') @ ') )
) + hh+':'+mm+':'+ss;
@@ -3510,7 +3510,7 @@ var catalog = {
let embed = thread.embeds ? (thread.embeds.find(e => e.file != 'removed') || 'removed') : null
// for images
if(!embed || embed === 'removed') {
- thread.smallThumb =
+ thread.smallThumb =
'\
'+(embed === 'removed' ? 'Удалён' : 'No File')+'
'
+'';
@@ -3536,20 +3536,20 @@ var catalog = {
? `${embed.file_type}-${embed.file}-`
: embed.file
, vartype = embed.file_type == 'mp3' ? ' onerror="switchFileType(this)" extset="jpg,png,gif"' : ''
- thread.smallThumb =
+ thread.smallThumb =
'\
'
+'';
- thread.bigThumb =
+ thread.bigThumb =
'';
}
/*if(_.includes(this.fileTypes.image, thread.file_type)) {
thread.fileTypeClass = 'image';
- thread.smallThumb =
+ thread.smallThumb =
'\
'
+'';
- thread.bigThumb =
+ thread.bigThumb =
'';
}*/
// small thumbnail for embeds and generic files
@@ -3558,14 +3558,14 @@ var catalog = {
? '/inc/filetypes/'+embed.file_type+'.png'
: '/inc/filetypes/generic'+(_.includes(this.fileTypes.embed, embed.file_type) ? '-embed' : '')+'.png';
var expandable = _.includes(this.fileTypes.embed, embed.file_type) || _.includes(this.fileTypes.audio, embed.file_type);
- thread.smallThumb =
+ thread.smallThumb =
'\
' +
/*+ ''+(expandable ? playerBtn : '') +*/
'';
// for audios
if(_.includes(this.fileTypes.audio, embed.file_type)) {
- thread.bigThumb =
+ thread.bigThumb =
'';
}
}
@@ -3577,7 +3577,7 @@ var catalog = {
}
// for audios
if(_.includes(this.fileTypes.audio, thread.file_type)) {
- thread.bigThumb =
+ thread.bigThumb =
'';
}*/
thread.bigThumb = ''+thread.bigThumb+'';
@@ -3587,27 +3587,27 @@ var catalog = {
//OP
thread.op = '#'+thread.id+'';
-
+
//preview
- thread.preview =
+ thread.preview =
'\
\
';
-
+
//counters
- var repliesLabel =
+ var repliesLabel =
'\
'+thread.reply_count+'';
if(thread.last_reply)
repliesLabel = ''+repliesLabel+'';
- var replies =
+ var replies =
''+repliesLabel+'
',
- images =
+ images =
'\
\
'+thread.images+'\
',
- page =
+ page =
'\
\
\
@@ -3619,16 +3619,16 @@ var catalog = {
//Poster name+date
thread.posterauthority = +thread.posterauthority;
thread.nameDatePriority = 'date';
- if(localStorage['cat_nameDatePriority'] == 'name' ||
- (localStorage['cat_nameDatePriority'] != 'date' &&
- (thread.name || thread.tripcode || thread.posterauthority)
- )
+ if(localStorage['cat_nameDatePriority'] == 'name' ||
+ (localStorage['cat_nameDatePriority'] != 'date' &&
+ (thread.name || thread.tripcode || thread.posterauthority)
+ )
) thread.nameDatePriority = 'name';
-
+
// Poster name
- var poster =
- (thread.name ? ''+thread.name+'' : '') +
- (thread.tripcode ? '!'+thread.tripcode+'' : '') +
+ var poster =
+ (thread.name ? ''+thread.name+'' : '') +
+ (thread.tripcode ? '!'+thread.tripcode+'' : '') +
(thread.posterauthority ? ' ##'+this.authorities[thread.posterauthority]+'##' : '');
thread.poster = 'by '+ (poster || ''+(this_board_defaultName || _l.anonymous)+'')+'
';
@@ -3647,13 +3647,13 @@ var catalog = {
}
//indicators
thread = this.buildIndicators(thread);
-
+
var html = this.layouts[this.conf.layout].bind(this)(thread);
this.rendered[this.conf.layout][thread.id] = html;
return html
},
buildIndicators: function(thread) {
- // if(!thread.hasOwnProperty('hidden'))
+ // if(!thread.hasOwnProperty('hidden'))
thread.hidden = _.includes((localStorage['hiddenThreads.'+this_board_dir] || '').split(','), ''+thread.id);
var pin = thread.stickied ? '' : '',
lock = thread.locked ? '' : '',
@@ -3768,17 +3768,17 @@ var unreadCounter = {
var HTMLoader = {
loadThread: function(boardID, threadID, done, postID) {
- $.get(threadID === '?'
- ? `${ku_boardspath}/postbynumber.php?b=${boardID}&p=${postID}`
+ $.get(threadID === '?'
+ ? `${ku_boardspath}/postbynumber.php?b=${boardID}&p=${postID}`
: `${ku_boardspath}/${boardID}/res/${threadID}.html?${force_html_nocache ? Math.random() : ''}`)
.then(data => {
let posts = data.match(/!i0-pd:[0-9]+\s*?<\/div\s*?>[\s\S]+?
!i0-pd-end\s*?<\/div\s*?>/gi)
.map(match => {
- let res = match.match(/
!i0-pd:([0-9]+)\s*?<\/div\s*?>([\s\S]+?)
!i0-pd-end\s*?<\/div\s*?>/i);
+ let res = match.match(/
!i0-pd:([0-9]+)\s*?<\/div\s*?>([\s\S]+?)
!i0-pd-end\s*?<\/div\s*?>/i);
return {
- id: +res[1],
+ id: +res[1],
body: res[2]
- }
+ }
})
if (threadID === '?') {
let thrno = data.match(//) //wtf
diff --git a/postbynumber.php b/postbynumber.php
index 4db863c..a41780a 100644
--- a/postbynumber.php
+++ b/postbynumber.php
@@ -3,7 +3,7 @@ require 'config.php';
if (!isset($_GET['b']) || !isset($_GET['p'])) {
http_response_code(404);
-}
+}
else {
$board = $_GET['b'];
$post = $_GET['p'];