Whitespace purge

This commit is contained in:
Juribiyan 2018-05-02 17:36:50 +05:00
parent 277e17f688
commit 42ec5028f6
8 changed files with 211 additions and 211 deletions

View File

@ -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; */

View File

@ -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;

View File

@ -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;

View File

@ -78,20 +78,20 @@
<div id="overlay_menu" class="content-background overlay-menu">
<span style="display: none" class="olm-link mgoback">[<a href="{%KU_CGIPATH}/{$board.name}/"> &lt; </a>]</span>
<span class="olm-link">[<a href="{%KU_BOARDSFOLDER}">home</a>]</span>
<span class="mobile-nav" id="mn-normalboards" style="display:none">
<span class="mobile-nav" id="mn-normalboards" style="display:none">
<select onchange="javascript:if(selectedIndex != 0) location.href='{%KU_WEBPATH}/' + this.options[this.selectedIndex].value;">
<option><b>{t}Boards{/t}</b></option>
{foreach name=sections item=sect from=$boardlist}
{if $sect.abbreviation neq '20'}
{foreach name=brds item=brd from=$sect}
{if $sect.abbreviation neq '20'}
{foreach name=brds item=brd from=$sect}
{if $brd.name neq $board.name}
{if isset($brd.desc) and is_array($brd)}
{if isset($brd.desc) and is_array($brd)}
<option value="{$brd.name}">/{$brd.name}/ - {$brd.desc}</option>
{/if}
{/if}
{/foreach}
{/if}
{/foreach}
{/if}
{/foreach}
{/if}
{/foreach}
</select>
<select class="boardsel20" onchange="javascript:if(selectedIndex != 0) location.href='{%KU_WEBPATH}/' + this.options[this.selectedIndex].value;">
<option><b>2.0 {t}Boards{/t}</b></option>
@ -113,15 +113,15 @@
<input type="text" id="boardselect" placeholder="{t}Filter{/t}" />
<div id="boards20">
</div>
{/if}
{/if}
</div>
{/foreach}
<div class="menu-sect" id="ms-_options">
{t}Styles{/t}:
{t}Styles{/t}:
{loop $ku_styles}
[<a href="#" onclick="javascript:Styles.change('{$|capitalize}');return false;">{if $__.customstyle eq $}Custom{else}{$|capitalize}{/if}</a>]
{/loop}<br />
<a href="#" onclick="javascript:menu_pin();return false;">{t}Pin/Unpin{/t}</a> |
<a href="#" onclick="javascript:menu_pin();return false;">{t}Pin/Unpin{/t}</a> |
<a href="#" onclick="javascript:set_oldmenu(true);return false;">{t}Simple list{/t}</a>
<div id="js_settings"></div>
</div>

View File

@ -14,7 +14,7 @@ class="reflinkpreview content-background qreplyform" style="display:none">
<hr />
{if $topads neq ''}
<div class="content ads">
<center>
<center>
{$topads}
</center>
</div>

View File

@ -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 = 'поста';

View File

@ -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: "<b>Отключите AJAX-отправку постов и AJAX-обновление треда.</b><br />(Кликните, чтобы закрыть)",
@ -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 = $('<div style="font-weight: bold"></div>').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 = `
<span class="btngroup">
<a href="${ku_cgipath}/manage_page.php?action=delposts&amp;boarddir=${dnbinfo[1]}&amp;del${dnbinfo[3] == 'y' ? 'thread' : 'post'}id=${dnbinfo[2]}" title="${_l.del}"
<a href="${ku_cgipath}/manage_page.php?action=delposts&amp;boarddir=${dnbinfo[1]}&amp;del${dnbinfo[3] == 'y' ? 'thread' : 'post'}id=${dnbinfo[2]}" title="${_l.del}"
onclick="return confirm('${_l.delPost}?');">
<svg class="icon b-icon sb-l">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#i-x"></use>
</svg>
</a>
<a href="${ku_cgipath}/manage_page.php?action=delposts&amp;boarddir=${dnbinfo[1]}&amp;del${dnbinfo[3] == 'y' ? 'thread' : 'post'}id=${dnbinfo[2]}&amp;postid=${dnbinfo[2]}"
<a href="${ku_cgipath}/manage_page.php?action=delposts&amp;boarddir=${dnbinfo[1]}&amp;del${dnbinfo[3] == 'y' ? 'thread' : 'post'}id=${dnbinfo[2]}&amp;postid=${dnbinfo[2]}"
title="Удалить и забанить" onclick="return confirm('${_l.delAndBan}?');">
<svg class="icon b-icon sb-c">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#i-and"></use>
@ -604,25 +604,25 @@ function delandbanlinks($scope=$('body')) {
if (dnbinfo[3] == 'y') {
newhtml += `
<a class="stickypost-btn" onclick="Ajax.modThread(this, 'stickypost'); return false"
<a class="stickypost-btn" onclick="Ajax.modThread(this, 'stickypost'); return false"
href="${ku_cgipath}/manage_page.php?action=stickypost&amp;board=${dnbinfo[1]}&amp;postid=${dnbinfo[2]}" title="${_l.stickthread}">
<svg class="icon b-icon">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#i-pin"></use>
</svg>
</a>
<a class="unstickypost-btn" onclick="Ajax.modThread(this, 'unstickypost'); return false"
<a class="unstickypost-btn" onclick="Ajax.modThread(this, 'unstickypost'); return false"
href="${ku_cgipath}/manage_page.php?action=unstickypost&amp;board=${dnbinfo[1]}&amp;postid=${dnbinfo[2]}" title="${_l.unstickthread}">
<svg class="icon b-icon">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#i-unpin"></use>
</svg>
</a>
<a class="lockpost-btn" onclick="Ajax.modThread(this, 'lockpost'); return false"
<a class="lockpost-btn" onclick="Ajax.modThread(this, 'lockpost'); return false"
href="${ku_cgipath}/manage_page.php?action=lockpost&amp;board=${dnbinfo[1]}&amp;postid=${dnbinfo[2]}" title="${_l.lockthread}">
<svg class="icon b-icon">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#i-lock"></use>
</svg>
</a>
<a class="unlockpost-btn" onclick="Ajax.modThread(this, 'unlockpost'); return false"
<a class="unlockpost-btn" onclick="Ajax.modThread(this, 'unlockpost'); return false"
href="${ku_cgipath}/manage_page.php?action=unlockpost&amp;board=${dnbinfo[1]}&amp;postid=${dnbinfo[2]}" title="${_l.unlockthread}">
<svg class="icon b-icon">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#i-unlock"></use>
@ -646,7 +646,7 @@ var HiddenThreads = {
return list.split(',');
},
isHidden: function(threadid) { return HiddenThreads.list().indexOf(threadid) != -1 },
hide: function(threadid) {
hide: function(threadid) {
if (localStorage == null) alert(_l.noLocalStorage);
else {
var newlist = HiddenThreads.list();
@ -654,7 +654,7 @@ var HiddenThreads = {
localStorage.setItem('hiddenThreads.' + this_board_dir, newlist.join(','));
}
},
unhide: function(threadid) {
unhide: function(threadid) {
if (localStorage == null) alert(_l.noLocalStorage);
else {
var list = HiddenThreads.list();
@ -666,7 +666,7 @@ var HiddenThreads = {
}
}
}
function togglethread(threadid) {
if (HiddenThreads.isHidden(threadid)) {
$('#unhidethread' + threadid + this_board_dir).slideUp();
@ -679,7 +679,7 @@ function togglethread(threadid) {
}
return false;
}
function toggleblotter() {
$('.blotter-entries').each(function(index,element) {
$(this).slideToggle(function() {
@ -723,7 +723,7 @@ function expandthread(threadid, board, ev) {
})
}
return false;
}
}
function getnewposts(threadid=null, scrollToID=null, onError = () => 'error') {
if(threadid===null) {
@ -751,8 +751,8 @@ function getnewposts(threadid=null, scrollToID=null, onError = () => 'error') {
replies_container.insertAdjacentHTML('beforeend', posts)
if (scrollToID) {
let allPosts = replies_container.querySelectorAll('.reply')
, targetReply = scrollToID=='last'
? allPosts[allPosts.length-1]
, targetReply = scrollToID=='last'
? allPosts[allPosts.length-1]
: Array.prototype.find.call(allPosts, post => post.querySelector(`a[name="${scrollToID}"]`))
if (! targetReply) {
return onError();
@ -780,7 +780,7 @@ function showLinks(ev) {
left: $(this).offset().left
}).fadeIn('fast');
return false;
}
}
if(localStorage['pinPreference'] === 'pinned')
localStorage['pinForm'] = 0;
if(localStorage['pinPreference'] === 'unpinned')
@ -829,8 +829,8 @@ function quickreply(ev) {
}
insert('>>'+current+'\n');
return false;
}
}
function getwatchedthreads(threadid, board) {
if ($('#watchedthreadlist').get()!='') {
$('#watchedthreadlist').html(_l.loading + '...');
@ -844,7 +844,7 @@ function getwatchedthreads(threadid, board) {
}
});
}
}
}
function popupMessage(content, delay=1000) {
if ($('#popupMessage').get() == '') {
@ -874,7 +874,7 @@ function addtowatchedthreads(threadid, board) {
});
}
}
function removefromwatchedthreads(threadid, board) {
if ($('#watchedthreadlist').get()!='') {
$.ajax({
@ -889,12 +889,12 @@ function removefromwatchedthreads(threadid, board) {
});
}
}
function hidewatchedthreads() {
Cookie('showwatchedthreads','0',30);
$("#watchedthreads").fadeOut();
}
}
function showwatchedthreads() {
Cookie('showwatchedthreads','1',30);
window.location.reload(true);
@ -909,7 +909,7 @@ var Captcha = {
-o-animation-duration: ${captchaTimeout}s;
animation-duration: ${captchaTimeout}s;
}
.cw-running .captchaimage,
.cw-running .captchaimage,
.cw-running .rotten-msg {
-webkit-animation-delay: ${captchaTimeout}s;
-o-animation-delay: ${captchaTimeout}s;
@ -954,7 +954,7 @@ function handleSubmit(form) {
let captchafield = form.querySelector('input[name=captcha]')
if (captchafield && !captchafield.value.length)
return popupMessage(_l.enterCaptcha)
if (form.id === 'postclone')
if (form.id === 'postclone')
ffdata.save()
Ajax.submitPost(form)
}
@ -1032,7 +1032,7 @@ const Ajax = {
}
xr.send(fd)
},
deletePost: function(form) {
deletePost: function(form) {
let fd = new FormData(form)
, xr = new XMLHttpRequest()
fd.append('AJAX', 1)
@ -1099,7 +1099,7 @@ const Ajax = {
}
xr.send(fd)
},
reportPost: function(form) {
reportPost: function(form) {
let fd = new FormData(form)
, xr = new XMLHttpRequest()
fd.append('AJAX', 1)
@ -1259,7 +1259,7 @@ const Ajax = {
function inspectFormData(formData) {
for (var pair of formData.entries()) {
console.log(pair[0]+ ', ' + pair[1]);
console.log(pair[0]+ ', ' + pair[1]);
}
}
@ -1272,7 +1272,7 @@ function expandimg(postnum, imgurl, thumburl, imgw, imgh, thumbw, thumbh) {
, fc_width
if(typeof event !== 'undefined' && event.which === 2) return true;
if (element.getElementsByTagName('img')[0].getAttribute('alt').substring(0,4)!='full') {
$element.html('<img src="'+imgurl+'" alt="full'+postnum+'" class="thumb" height="'+imgh+'" width="'+imgw+'">');
$element.html('<img src="'+imgurl+'" alt="full'+postnum+'" class="thumb" height="'+imgh+'" width="'+imgw+'">');
if (! Settings.expandImgFull()) {
let img = element.getElementsByTagName('img')[0]
, max_w = document.documentElement?document.documentElement.clientWidth : document.body.clientWidth
@ -1290,9 +1290,9 @@ function expandimg(postnum, imgurl, thumburl, imgw, imgh, thumbw, thumbh) {
var new_h = new_w / ratio;
var notice = document.createElement('div');
notice.setAttribute('class', 'filesize');
notice.style.textDecoration = 'underline';
notice.style.textDecoration = 'underline';
var textNode = document.createTextNode(_l.imageDownscaledBy + " " + Math.round(zoom*100) + "% "+_l.toFit);
notice.appendChild(textNode);
notice.appendChild(textNode);
element.insertBefore(notice, img);
$(img).width(new_w);
$(img).height(new_h);
@ -1302,7 +1302,7 @@ function expandimg(postnum, imgurl, thumburl, imgw, imgh, thumbw, thumbh) {
else
fc_width = imgw
if ($postbody) $postbody.addClass('postbody-expanded')
}
}
else {
element.innerHTML = '<img src="' + thumburl + '" alt="' + postnum + '" class="thumb" height="' + thumbh + '" width="' + thumbw + '">';
fc_width = thumbw
@ -1342,7 +1342,7 @@ var PostPreviews = {
if (preview.length == 0) {
$('body').children().first().before('<div id="'+previewid+'"></div>');
preview = $('#' + previewid);
preview.addClass('reflinkpreview content-background pre-hidden actual-reflinkpreview');
preview.addClass('reflinkpreview content-background pre-hidden actual-reflinkpreview');
preview.mouseleave(PostPreviews._mouseout);
preview.mouseover(PostPreviews.onMouseOver);
}
@ -1351,23 +1351,23 @@ var PostPreviews = {
if (previewid == parent.attr('id')) return; // anti-recursion
for (var id in PostPreviews.parent) { if (id == previewid || PostPreviews.parent[id] == previewid) return }
PostPreviews.parent[previewid] = parent.attr('id');
}
}
else {
PostPreviews.parent = [];
}
let transformOrigin;
if(e.clientY < ($(window).height() / 1.5)) {
preview.css({top:e.pageY+5});
if(e.clientY < ($(window).height() / 1.5)) {
preview.css({top:e.pageY+5});
transformOrigin = "top "
} else {
preview.css({bottom:$(window).height()-e.pageY+5});
preview.css({bottom:$(window).height()-e.pageY+5});
transformOrigin = "bottom "
}
if(e.clientX < ($(window).width() / 1.5)) {
preview.css({left:e.pageX+15});
preview.css({left:e.pageX+15});
transformOrigin += "left"
} else {
preview.css({right:$(window).width()-e.pageX+15});
preview.css({right:$(window).width()-e.pageX+15});
transformOrigin += "right"
}
preview.css({zIndex: PostPreviews.zindex++, "transform-origin": transformOrigin});
@ -1419,7 +1419,7 @@ var PostPreviews = {
pre.remove();
}, PostPreviews._timings.transition)
}, PostPreviews._timings.fade)
preview = $('#' + PostPreviews.parent[preview.attr('id')]);
preview = $('#' + PostPreviews.parent[preview.attr('id')]);
}
},
@ -1432,7 +1432,7 @@ var PostPreviews = {
/* txt only. deleted. src in clean */
function postpreview(D,A,C,B){}
function set_inputs(id) {
let form = document.getElementById(id)
if (form) {
@ -1442,7 +1442,7 @@ function set_inputs(id) {
if(!form.postpassword.value) form.postpassword.value = get_password("postpassword");
}
}
function set_delpass(id) {
let form = document.getElementById(id)
if (! form) return;
@ -1450,7 +1450,7 @@ function set_delpass(id) {
if (postpassword && !postpassword.value) {
postpassword.value = get_password("postpassword");
}
}
}
(function ($) {
$.event.special.load = {
@ -1487,20 +1487,20 @@ var Settings = {
// update checkbox (called on load)
if (localStorage[settingName] == 'true')
$('#settings_' + settingName).attr("checked","checked");
else
else
$('#settings_' + settingName).removeAttr("checked");
}
return (localStorage[settingName] == 'true') || (localStorage[settingName] == true) ;
},
fxEnabled: function(changed) {
fxEnabled: function(changed) {
var enabled = Settings._checkbox(changed, 'fxEnabled', true);
if (changed != null) {
$.fx.off = !enabled;
}
return enabled;
},
showReplies: function(changed) {
var enabled = Settings._checkbox(changed, 'showReplies', true);
if (changed != null) {
@ -1516,7 +1516,7 @@ var Settings = {
}
return enabled;
},
sfwMode: function(changed) {
var enabled = Settings._checkbox(changed, 'sfwMode', false);
if (enabled) {
@ -1527,7 +1527,7 @@ var Settings = {
}
return enabled;
},
expandImgFull: function(changed) {
return Settings._checkbox(changed, 'expandImgFull', false);
},
@ -1587,7 +1587,7 @@ function readyset() {
if(Styles.$cancelLink)
$('#js_settings').prepend(Styles.$cancelLink)
LatexIT.init();
checkhighlight();
checkgotothread();
@ -1640,15 +1640,15 @@ function readyset() {
return false;
});
$('body').click(function(event) {
menu_show('_off_');
menu_show('_off_');
$('[id^=preview]').addClass('pre-hidden')
setTimeout(() => {
$('[id^=preview]').remove();
}, PostPreviews._timings.transition)
});
$('.mobile-nav').show();
$('body').on('click', "a[class^='ref']", PostPreviews._mouseover);
$('body').on('click', "a[class^='ref']", PostPreviews._mouseover);
injector.inject('mb', 'body {margin-bottom: 350px;}')
}
@ -1710,17 +1710,17 @@ function readyset() {
'</span>').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($('<a target="_blank" title="'+_l.watchOn+' Youtube"></a>').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 = `<a class="ref-reply" href="${href}">&gt;&gt;${n}</a>`
@ -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(/<br>/gi,"").replace(/<br \/>/gi,"").replace(/&amp;/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<eqn.length; i++) {
if(eqn[i].getAttribute("lang") == "latex" || eqn[i].getAttribute("xml:lang") == "latex")
eqn[i].innerHTML = this.pre(eqn[i]);
}
}
},
normalizergb : function(r, g, b) {
@ -2763,8 +2763,8 @@ function xsend(formid) {
popupMessage(resp.find('.big-shit').text());
clearfields($(formid), true);
}
}
});
}
});
return false;
}
@ -3120,7 +3120,7 @@ var countries = {
var bnrs = {
initiated: false,
init: function() {
$.getJSON(ku_boardspath+'/bnrs.json', function(data) {
$.getJSON(ku_boardspath+'/bnrs.json', function(data) {
var reduced = [];
if(data.length > 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('<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#i-unhide"></use>');
HiddenThreads.hide(threadID);
$card.addClass('thread-hidden')
}
}
else {
$target[0].classList.remove('hidden-on');
$target.html('<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#i-hide"></use>');
@ -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 =
'<a href="'+thread.url+'" class="smallThumb">\
<div class="nofile-removed ctx">'+(embed === 'removed' ? 'Удалён' : 'No File')+'</div>'
+'</a>';
@ -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 =
'<a href="'+thread.url+'" class="smallThumb">\
<img src="thumb/'+thumbURL+'c.'+ftype+'"'+vartype+'>'
+'</a>';
thread.bigThumb =
thread.bigThumb =
'<img src="thumb/'+thumbURL+'s.'+ftype+'"'+vartype+'>';
}
/*if(_.includes(this.fileTypes.image, thread.file_type)) {
thread.fileTypeClass = 'image';
thread.smallThumb =
thread.smallThumb =
'<a href="'+thread.url+'" class="smallThumb">\
<img src="thumb/'+thread.file+'c.'+(thread.file_type === 'webm' ? 'jpg' : thread.file_type)+'">'
+'</a>';
thread.bigThumb =
thread.bigThumb =
'<img src="thumb/'+thread.file+'s.'+(thread.file_type === 'webm' ? 'jpg' : thread.file_type)+'">';
}*/
// 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 =
'<a href="'+thread.url+'" class="smallThumb">\
<img src="'+smallSrc+'">' +
/*+ ''+(expandable ? playerBtn : '') +*/
'</a>';
// for audios
if(_.includes(this.fileTypes.audio, embed.file_type)) {
thread.bigThumb =
thread.bigThumb =
'<audio src="src/'+embed.file+'.'+embed.file_type+'" controls></audio>';
}
}
@ -3577,7 +3577,7 @@ var catalog = {
}
// for audios
if(_.includes(this.fileTypes.audio, thread.file_type)) {
thread.bigThumb =
thread.bigThumb =
'<audio src="src/'+thread.file+'.'+thread.file_type+'" controls></audio>';
}*/
thread.bigThumb = '<a target="_blank" href="'+thread.url+'" class="bigThumb">'+thread.bigThumb+'</a>';
@ -3587,27 +3587,27 @@ var catalog = {
//OP
thread.op = '<a target="_blank" title="'+_l.goToThread+'" target="_blank" href="'+thread.url+'" class="op-number ctx">#'+thread.id+'</a>';
//preview
thread.preview =
thread.preview =
'<a href="'+thread.url+'#'+thread.id+'" class="actor cat-prv">\
<svg class="icon"><use xlink:href="#i-eye"></use></svg>\
</a>';
//counters
var repliesLabel =
var repliesLabel =
'<svg class="icon"><use xlink:href="#i-reply"></use></svg>\
<span class="ctx reply-count">'+thread.reply_count+'</span>';
if(thread.last_reply)
repliesLabel = '<a href="'+thread.url+'#'+thread.last_reply+'" class="actor cat-prv">'+repliesLabel+'</a>';
var replies =
var replies =
'<div class="infolabel">'+repliesLabel+'</div>',
images =
images =
'<div class="infolabel">\
<svg class="icon"><use xlink:href="#i-picture"></use></svg>\
<span class="ctx image-count">'+thread.images+'</span>\
</div>',
page =
page =
'<div class="infolabel il-page">\
<a title="'+_l.threadOnPage+' '+thread.page+'" target="_blank" href="/'+this_board_dir+'/' + ((thread.page > 0) ? thread.page+'.html' : '')+'#'+thread.id+'" class="actor">\
<svg class="icon"><use xlink:href="#i-page"></use></svg>\
@ -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 ? '<span class="ctx postername">'+thread.name+'</span>' : '') +
(thread.tripcode ? '<span class="ctx postertrip">!'+thread.tripcode+'</span>' : '') +
var poster =
(thread.name ? '<span class="ctx postername">'+thread.name+'</span>' : '') +
(thread.tripcode ? '<span class="ctx postertrip">!'+thread.tripcode+'</span>' : '') +
(thread.posterauthority ? '<span class="ctx admin">&nbsp;##'+this.authorities[thread.posterauthority]+'##</span>' : '');
thread.poster = '<div class="cat-poster"><span class="ctx">by&nbsp;</span>'+ (poster || '<span class="ctx c-postername">'+(this_board_defaultName || _l.anonymous)+'</span>')+'</div>';
@ -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 ? '<svg class="foradmin-act icon i-layer-1 i-pin"><use xlink:href="#i-pin"></use></svg>' : '',
lock = thread.locked ? '<svg class="foradmin-act icon i-layer-1 i-lock"><use xlink:href="#i-lock"></use></svg>' : '',
@ -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(/<div\s*?class\s*?=\s*?"[^"]*?i0svcel[^"]*?"\s*?>!i0-pd:[0-9]+\s*?<\/div\s*?>[\s\S]+?<div\s*?class\s*?=\s*?"[^"]*?i0svcel[^"]*?"\s*?>!i0-pd-end\s*?<\/div\s*?>/gi)
.map(match => {
let res = match.match(/<div\s*?class\s*?=\s*?"[^"]*?i0svcel[^"]*?"\s*?>!i0-pd:([0-9]+)\s*?<\/div\s*?>([\s\S]+?)<div\s*?class\s*?=\s*?"[^"]*?i0svcel[^"]*?"\s*?>!i0-pd-end\s*?<\/div\s*?>/i);
let res = match.match(/<div\s*?class\s*?=\s*?"[^"]*?i0svcel[^"]*?"\s*?>!i0-pd:([0-9]+)\s*?<\/div\s*?>([\s\S]+?)<div\s*?class\s*?=\s*?"[^"]*?i0svcel[^"]*?"\s*?>!i0-pd-end\s*?<\/div\s*?>/i);
return {
id: +res[1],
id: +res[1],
body: res[2]
}
}
})
if (threadID === '?') {
let thrno = data.match(/<!--i0:thrno=([0-9]+)-->/) //wtf

View File

@ -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'];