Compare commits

..

No commits in common. "bf30cfaeebb8258734d590ec6bf8844607d335a4" and "1bf662c5e2a13d43eec2dd5cea5a661e31d13143" have entirely different histories.

25 changed files with 60 additions and 181 deletions

View file

@ -56,7 +56,7 @@ final class Board extends VKAPIRequestHandler
$comment->save(); $comment->save();
} }
} catch (\Throwable $e) { } catch(\Throwable $e) {
return $topic->getId(); return $topic->getId();
} }
@ -183,7 +183,7 @@ final class Board extends VKAPIRequestHandler
} }
$obj = (object) [ $obj = (object) [
"items" => [], "items" => []
]; ];
if ($extended) { if ($extended) {
@ -222,7 +222,7 @@ final class Board extends VKAPIRequestHandler
$this->fail(4, "Invalid count"); $this->fail(4, "Invalid count");
} }
$obj = (object) []; $obj = (object)[];
$club = (new ClubsRepo())->get($group_id); $club = (new ClubsRepo())->get($group_id);

View file

@ -411,7 +411,7 @@ final class Groups extends VKAPIRequestHandler
$obj = (object) [ $obj = (object) [
"count" => sizeof($members), "count" => sizeof($members),
"items" => [], "items" => []
]; ];
foreach ($members as $member) { foreach ($members as $member) {

View file

@ -75,9 +75,9 @@ abstract class Postable extends Attachable
return new DateTime($edited); return new DateTime($edited);
} }
public function getComments(int $page, ?int $perPage = null, string $sort = "ASC"): \Traversable public function getComments(int $page, ?int $perPage = null): \Traversable
{ {
return (new Comments())->getCommentsByTarget($this, $page, $perPage, $sort); return (new Comments())->getCommentsByTarget($this, $page, $perPage);
} }
public function getCommentsCount(): int public function getCommentsCount(): int

View file

@ -135,7 +135,7 @@ final class GroupPresenter extends OpenVKPresenter
$this->template->paginatorConf = (object) [ $this->template->paginatorConf = (object) [
"count" => $this->template->count, "count" => $this->template->count,
"page" => (int)($this->queryParam("p") ?? 1), "page" => $this->queryParam("p") ?? 1,
"amount" => 10, "amount" => 10,
"perPage" => OPENVK_DEFAULT_PER_PAGE, "perPage" => OPENVK_DEFAULT_PER_PAGE,
]; ];

View file

@ -146,7 +146,7 @@ final class InternalAPIPresenter extends OpenVKPresenter
{ {
if ($_SERVER["REQUEST_METHOD"] !== "POST") { if ($_SERVER["REQUEST_METHOD"] !== "POST") {
header("HTTP/1.1 405 Method Not Allowed"); header("HTTP/1.1 405 Method Not Allowed");
$this->redirect("/"); exit("ты‍ не по адресу");
} }
$type = $this->queryParam("type", false); $type = $this->queryParam("type", false);
@ -165,7 +165,7 @@ final class InternalAPIPresenter extends OpenVKPresenter
if ($type == 'post') { if ($type == 'post') {
$this->template->_template = 'components/post.xml'; $this->template->_template = 'components/post.xml';
$this->template->post = $post; $this->template->post = $post;
$this->template->commentSection = $this->queryParam("from_page") == "another"; $this->template->commentSection = true;
} elseif ($type == 'comment') { } elseif ($type == 'comment') {
$this->template->_template = 'components/comment.xml'; $this->template->_template = 'components/comment.xml';
$this->template->comment = $post; $this->template->comment = $post;

View file

@ -102,7 +102,7 @@ final class NoSpamPresenter extends OpenVKPresenter
$item = new $model($item); $item = new $model($item);
if (property_exists($item->unwrap(), "deleted") && $item->isDeleted()) { if (key_exists("deleted", $item->unwrap()) && $item->isDeleted()) {
$item->setDeleted(0); $item->setDeleted(0);
$item->save(); $item->save();
} }

View file

@ -133,7 +133,6 @@ final class VideosPresenter extends OpenVKPresenter
if ($_SERVER["REQUEST_METHOD"] === "POST") { if ($_SERVER["REQUEST_METHOD"] === "POST") {
$video->setName(empty($this->postParam("name")) ? null : $this->postParam("name")); $video->setName(empty($this->postParam("name")) ? null : $this->postParam("name"));
$video->setDescription(empty($this->postParam("desc")) ? null : $this->postParam("desc")); $video->setDescription(empty($this->postParam("desc")) ? null : $this->postParam("desc"));
$video->setUnlisted(false);
$video->save(); $video->save();
$this->flash("succ", tr("changes_saved"), tr("changes_saved_video_comment")); $this->flash("succ", tr("changes_saved"), tr("changes_saved_video_comment"));

View file

@ -469,11 +469,7 @@ final class WallPresenter extends OpenVKPresenter
} }
$this->template->cCount = $post->getCommentsCount(); $this->template->cCount = $post->getCommentsCount();
$this->template->cPage = (int) ($_GET["p"] ?? 1); $this->template->cPage = (int) ($_GET["p"] ?? 1);
$this->template->sort = $this->queryParam("sort") ?? "asc"; $this->template->comments = iterator_to_array($post->getComments($this->template->cPage));
$input_sort = $this->template->sort == "asc" ? "ASC" : "DESC";
$this->template->comments = iterator_to_array($post->getComments($this->template->cPage, null, $input_sort));
} }
public function renderLike(int $wall, int $post_id): void public function renderLike(int $wall, int $post_id): void

View file

@ -210,7 +210,7 @@
{var $menuLinksAvaiable = sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0 && $thisUser->getLeftMenuItemStatus('links')} {var $menuLinksAvaiable = sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0 && $thisUser->getLeftMenuItemStatus('links')}
<div n:if="$canAccessAdminPanel || $canAccessHelpdesk || $menuLinksAvaiable" class="menu_divider"></div> <div n:if="$canAccessAdminPanel || $canAccessHelpdesk || $menuLinksAvaiable" class="menu_divider"></div>
<a href="/admin" class="link" n:if="$canAccessAdminPanel" title="{_admin} [Alt+Shift+A]" accesskey="a" rel="nofollow">{_admin}</a> <a href="/admin" class="link" n:if="$canAccessAdminPanel" title="{_admin} [Alt+Shift+A]" accesskey="a" rel="nofollow">{_admin}</a>
<a href="/support/tickets" class="link" n:if="$canAccessHelpdesk">{_helpdesk} <a href="/support/tickets" class="link" n:if="$canAccessHelpdesk" rel="nofollow">{_helpdesk}
{if $helpdeskTicketNotAnsweredCount > 0} {if $helpdeskTicketNotAnsweredCount > 0}
(<b>{$helpdeskTicketNotAnsweredCount}</b>) (<b>{$helpdeskTicketNotAnsweredCount}</b>)
{/if} {/if}

View file

@ -55,7 +55,7 @@
<tbody> <tbody>
<tr> <tr>
<td width="120" valign="top"><span class="nobold">{_pronouns}: </span></td> <td width="120" valign="top"><span class="nobold">{_pronouns}: </span></td>
<td>{$user->isFemale() ? tr("female") : ($user->isNeutral() ? tr("neutral") : tr("male"))}</td> <td>{$x->isFemale() ? tr("female") : ($x->isNeutral() ? tr("neutral") : tr("male"))}</td>
</tr> </tr>
<tr> <tr>
<td width="120" valign="top"><span class="nobold">{_registration_date}: </span></td> <td width="120" valign="top"><span class="nobold">{_registration_date}: </span></td>

View file

@ -269,13 +269,7 @@
search(); search();
} }
}); });
$("#apply").on("click", (e) => { $("#apply").on("click", () => { search(Number($("#noSpam-ban-type").val())); })
e.preventDefault()
MessageBox(tr("warning"), tr("nospam_prevention"), [tr("no"), tr("yes")], [Function.noop, () => {
search(Number($("#noSpam-ban-type").val()));
}]);
})
async function selectChange(value) { async function selectChange(value) {
console.log(value); console.log(value);

View file

@ -42,6 +42,6 @@
{block description} {block description}
{var $author = $x->getUser()} {var $author = $x->getUser()}
{ovk_proc_strtr($x->getContext(), 200)}<br/> {ovk_proc_strtr($x->getContext(), 50)}<br/>
<span class="nobold">{_author}: </span> <a href="{$author->getURL()}">{$author->getCanonicalName()}</a> <span class="nobold">{_author}: </span> <a href="{$author->getURL()}">{$author->getCanonicalName()}</a>
{/block} {/block}

View file

@ -40,7 +40,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<a id="_anotherDelete" class="button" href="/topic{$topic->getPrettyId()}/delete?hash={urlencode($csrfToken)}">{_delete_topic}</a> <a class="button" href="/topic{$topic->getPrettyId()}/delete?hash={urlencode($csrfToken)}">{_delete_topic}</a>
</td> </td>
<td> <td>
<input type="hidden" name="hash" value="{$csrfToken}" /> <input type="hidden" name="hash" value="{$csrfToken}" />

View file

@ -36,10 +36,9 @@
count => $cCount, count => $cCount,
page => $cPage, page => $cPage,
model => "posts", model => "posts",
parent => $post, parent => $post }
sort => $sort}
</div> </div>
<div style="float: left; min-height: 100px; width: 32%;padding-left: 10px;width: 30%;"> <div style="float: left; min-height: 100px; width: 32%;">
<h4>{_actions}</h4> <h4>{_actions}</h4>
{if isset($thisUser)} {if isset($thisUser)}
{var $canDelete = $post->canBeDeletedBy($thisUser)} {var $canDelete = $post->canBeDeletedBy($thisUser)}
@ -48,7 +47,7 @@
{/if} {/if}
{/if} {/if}
<a n:if="$canDelete ?? false" id="_ajaxDelete" class="profile_link" style="display:block;width:96%;" href="/wall{$post->getPrettyId()}/delete">{_delete}</a> <a n:if="$canDelete ?? false" class="profile_link" style="display:block;width:96%;" href="/wall{$post->getPrettyId()}/delete">{_delete}</a>
<a <a
n:if="isset($thisUser) && $thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL) AND $post->getEditTime()" n:if="isset($thisUser) && $thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL) AND $post->getEditTime()"
style="display:block;width:96%;" style="display:block;width:96%;"

View file

@ -44,7 +44,7 @@
{if !$timeOnly} {if !$timeOnly}
{if $comment->canBeDeletedBy($thisUser)} {if $comment->canBeDeletedBy($thisUser)}
| |
<a href="/comment{$comment->getId()}/delete" id="_ajaxDelete">{_delete}</a> <a href="/comment{$comment->getId()}/delete">{_delete}</a>
{/if} {/if}
{if $comment->canBeEditedBy($thisUser)} {if $comment->canBeEditedBy($thisUser)}
| |

View file

@ -1,18 +1,5 @@
<div> <h4 n:if="$showTitle ?? true">{_comments} ({$count})</h4>
<h4 n:if="$showTitle ?? true">{_comments} ({$count})</h4>
{if !is_null($sort) && $count > 5}
<a class="sort_link" n:attr="href => $sort == 'desc' ? '?sort=asc' : '?sort=desc'">
{if $sort == 'desc'}
{_new_first}
{else}
{_old_first}
{/if}
<div n:class="sort_link_icon, $sort == 'desc' ? sort_link_icon_desc : sort_link_icon_asc"></div>
</a>
{/if}
</div>
<div n:ifset="$thisUser" id="standaloneCommentBox"> <div n:ifset="$thisUser" id="standaloneCommentBox">
{var $commentsURL = "/al_comments/create/$model/" . $parent->getId()} {var $commentsURL = "/al_comments/create/$model/" . $parent->getId()}
{var $club = $parent instanceof \openvk\Web\Models\Entities\Post && $parent->getTargetWall() < 0 ? (new openvk\Web\Models\Repositories\Clubs)->get(abs($parent->getTargetWall())) : $club} {var $club = $parent instanceof \openvk\Web\Models\Entities\Post && $parent->getTargetWall() < 0 ? (new openvk\Web\Models\Repositories\Clubs)->get(abs($parent->getTargetWall())) : $club}

View file

@ -148,7 +148,7 @@
{/if} {/if}
</div> </div>
<div n:if="!($forceNoCommentsLink ?? false) && $commentSection == true && $compact == false" class="post-menu-s"> <div n:if="!($forceNoCommentsLink ?? false) && $commentSection == true && $compact == false" class="post-menu-s">
<a n:if="$commentsCount > 3" href="/wall{$post->getPrettyId()}" class="expand_button">{_view_other_comments} ({$commentsCount - 3})</a> <a n:if="$commentsCount > 3" href="/wall{$post->getPrettyId()}" class="expand_button">{_view_other_comments}</a>
{foreach $comments as $comment} {foreach $comments as $comment}
{include "../comment.xml", comment => $comment, $compact => true} {include "../comment.xml", comment => $comment, $compact => true}
{/foreach} {/foreach}

View file

@ -49,7 +49,7 @@ body.dimmed > .dimmer #absolute_territory {
.ovk-diag-body { .ovk-diag-body {
padding: 20px; padding: 20px;
overflow-y: auto; overflow-y: auto;
max-height: 83vh max-height: 80vh
} }
.ovk-diag-action { .ovk-diag-action {

View file

@ -880,7 +880,7 @@ h4 {
} }
.post-geo { .post-geo {
margin: 8px 0px 2px -3px; margin: 1px 0px;
padding: 0 4px; padding: 0 4px;
} }
@ -1570,10 +1570,6 @@ body.scrolled .toTop:hover, .toTop.has_down:hover {
color: #3c3c3c; color: #3c3c3c;
} }
.post-has-geo.appended-geo {
padding: 6px 0px;
}
.post-source #remove_source_button, #small_remove_button { .post-source #remove_source_button, #small_remove_button {
display: inline-block; display: inline-block;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -1888,7 +1884,6 @@ body.scrolled .toTop:hover, .toTop.has_down:hover {
#ovkDraw { #ovkDraw {
border: 1px solid #757575; border: 1px solid #757575;
min-height: 510px;
} }
#ovkDraw .lc-drawing.with-gui { #ovkDraw .lc-drawing.with-gui {
@ -1897,7 +1892,6 @@ body.scrolled .toTop:hover, .toTop.has_down:hover {
#ovkDraw .literally { #ovkDraw .literally {
border-radius: 0; border-radius: 0;
height: 510px;
} }
#ovkDraw .literally .lc-picker, #ovkDraw .literally .lc-picker,
@ -2676,8 +2670,7 @@ a.poll-retract-vote {
} }
.post-buttons .vertical-attachment .vertical-attachment-content { .post-buttons .vertical-attachment .vertical-attachment-content {
/*max-height: 27px;*/ max-height: 27px;
padding: 3px 2px;
} }
.vertical-attachment .vertical-attachment-content .overflowedName { .vertical-attachment .vertical-attachment-content .overflowedName {
@ -3208,11 +3201,6 @@ a.poll-retract-vote {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 1px; gap: 1px;
padding: 5px 9px;
}
.post-buttons .attachment_note {
padding: 3px 0px;
} }
.attachment_note svg { .attachment_note svg {
@ -3228,10 +3216,6 @@ a.poll-retract-vote {
height: 12px; height: 12px;
} }
.attachments .attachment_note {
padding: 5px 5px;
}
#notesList #notesList
{ {
overflow-y: scroll; overflow-y: scroll;
@ -3268,7 +3252,7 @@ body.article .floating_sidebar, body.article .page_content {
display: none; display: none;
position: absolute; position: absolute;
z-index: 128; z-index: 128;
width: 98%; width: 100%;
min-height: 100vh; min-height: 100vh;
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
@ -3302,7 +3286,6 @@ body.article .floating_sidebar, body.article .page_content {
.articleView_author > div { .articleView_author > div {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: 3px;
} }
.articleView_author > div > span { .articleView_author > div > span {
@ -3400,7 +3383,6 @@ body.article .floating_sidebar, body.article .page_content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 22px; gap: 22px;
padding: 5px 10px;
} }
.sugglist { .sugglist {
@ -3674,7 +3656,7 @@ hr {
.entity_vertical_list { .entity_vertical_list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10px; gap: 3px;
height: 197px; height: 197px;
overflow-y: auto; overflow-y: auto;
} }
@ -3682,7 +3664,6 @@ hr {
.entity_vertical_list.scroll_container { .entity_vertical_list.scroll_container {
height: unset; height: unset;
overflow-y: unset; overflow-y: unset;
padding: 5px;
} }
.entity_vertical_list .entity_vertical_list_item { .entity_vertical_list .entity_vertical_list_item {
@ -3700,16 +3681,12 @@ hr {
} }
.entity_vertical_list.m_mini .entity_vertical_list_item .first_column { .entity_vertical_list.m_mini .entity_vertical_list_item .first_column {
gap: 13px; gap: 10px;
}
.entity_vertical_list.m_mini .entity_vertical_list_item:hover .first_column a {
text-decoration: underline;
} }
.entity_vertical_list.m_mini .entity_vertical_list_item .first_column .avatar img { .entity_vertical_list.m_mini .entity_vertical_list_item .first_column .avatar img {
width: 40px; width: 30px;
height: 40px; height: 30px;
} }
.entity_vertical_list .entity_vertical_list_item .avatar { .entity_vertical_list .entity_vertical_list_item .avatar {
@ -4292,8 +4269,8 @@ hr {
.attachments .docGalleryItem { .attachments .docGalleryItem {
display: block; display: block;
min-width: 170px; min-width: 170px;
min-height: 170px; height: 170px;
width: 60%; width: 50%;
margin-bottom: 4px; margin-bottom: 4px;
} }
@ -4319,23 +4296,3 @@ hr {
.deleted_mark_average { .deleted_mark_average {
padding: 5px 61px; padding: 5px 61px;
} }
.sort_link {
padding: 5px 2px;
display: inline-block;
}
.sort_link_icon {
background: url(/assets/packages/static/openvk/img/wall.png?v=3) no-repeat;
display: inline-block;
height: 11px;
width: 9px;
}
.sort_link_icon_desc {
background-position: 0px -15px;
}
.sort_link_icon_asc {
background-position: -11px -15px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -845,14 +845,22 @@ u(document).on('click', '.audioEntry .playerButton > .playIcon', async (e) => {
if(!window.player.hasTrackWithId(id) && !window.player.isAtAudiosPage()) { if(!window.player.hasTrackWithId(id) && !window.player.isAtAudiosPage()) {
let _nodes = null let _nodes = null
if(u(e.target).closest('.attachments').length > 0) {
try_these_containers = [".attachments", ".content_list", ".generic_audio_list", ".audiosInsert", ".scroll_container", ".container_gray"] window.player.connectionType = '.attachments'
try_these_containers.forEach(__container => { _nodes = u(e.target).closest('.attachments').find('.audioEmbed').nodes
if(u(e.target).closest(__container).length > 0) { } else if(u(e.target).closest('.content_list').length > 0) {
window.player.connectionType = __container window.player.connectionType = '.content_list'
_nodes = u(e.target).closest(__container).find('.audioEmbed').nodes _nodes = u(e.target).closest('.content_list').find('.audioEmbed').nodes
} } else if(u(e.target).closest('.generic_audio_list').length > 0) {
}) window.player.connectionType = '.generic_audio_list'
_nodes = u(e.target).closest('.generic_audio_list').find('.audioEmbed').nodes
} else if(u(e.target).closest('.audiosInsert').length > 0) {
window.player.connectionType = '.audiosInsert'
_nodes = u(e.target).closest('.audiosInsert').find('.audioEmbed').nodes
} else if(u(e.target).closest('.scroll_container').length > 0) {
window.player.connectionType = '.scroll_container'
_nodes = u(e.target).closest('.scroll_container').find('.audioEmbed').nodes
}
window.player.tracks = [] window.player.tracks = []
_nodes.forEach(el => { _nodes.forEach(el => {
@ -1851,7 +1859,7 @@ function showAudioAttachment(type = 'form', form = null)
} }
let is_attached = false let is_attached = false
if(type == 'form') { if(type == 'form') {
is_attached = (u(form).find(`.post-vertical .vertical-attachment[data-type='audio'][data-id='${id}']`)).length > 0 is_attached = (u(form).find(`.post-vertical .vertical-attachment[data-id='${id}']`)).length > 0
} else { } else {
is_attached = (u(form).find(`.PE_audios .vertical-attachment[data-id='${id}']`)).length > 0 is_attached = (u(form).find(`.PE_audios .vertical-attachment[data-id='${id}']`)).length > 0
} }

View file

@ -606,22 +606,7 @@ function reportClub(club_id) {
]); ]);
} }
$(document).on("click", "#_ajaxDelete", function(e) { $(document).on("click", "#_photoDelete, #_videoDelete", function(e) {
MessageBox(tr('warning'), tr('question_confirm'), [
tr('yes'),
tr('no')
], [
() => {
window.router.route(e.target.href)
},
Function.noop
]);
e.stopPropagation()
return e.preventDefault();
});
$(document).on("click", "#_photoDelete, #_videoDelete, #_anotherDelete", function(e) {
var formHtml = "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' >"; var formHtml = "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' >";
formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />"; formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />";
formHtml += "</form>"; formHtml += "</form>";
@ -1140,14 +1125,7 @@ u(document).on("click", "#editPost", async (e) => {
return return
} }
let is_at_post_page = false const new_post_html = await (await fetch(`/iapi/getPostTemplate/${id[0]}_${id[1]}?type=${type}`, {
try {
if(location.pathname.indexOf("wall") != -1 && location.pathname.split("_").length == 2) {
is_at_post_page = true
}
} catch(e) {}
const new_post_html = await (await fetch(`/iapi/getPostTemplate/${id[0]}_${id[1]}?type=${type}&from_page=${is_at_post_page ? "post" : "another"}`, {
'method': 'POST' 'method': 'POST'
})).text() })).text()
u(ev.target).removeClass('lagged') u(ev.target).removeClass('lagged')
@ -1669,7 +1647,7 @@ u(document).on('click', '#__notesAttachment', async (e) => {
insert_place.append(tr('no_notes')) insert_place.append(tr('no_notes'))
} }
notes.items.forEach(note => { notes.notes.forEach(note => {
is_attached = (form.find(`.upload-item[data-type='note'][data-id='${note.owner_id}_${note.id}']`)).length > 0 is_attached = (form.find(`.upload-item[data-type='note'][data-id='${note.owner_id}_${note.id}']`)).length > 0
insert_place.append(` insert_place.append(`
<div class='display_flex_row _content' data-attachmentdata="${note.owner_id}_${note.id}" data-name='${escapeHtml(note.title)}'> <div class='display_flex_row _content' data-attachmentdata="${note.owner_id}_${note.id}" data-name='${escapeHtml(note.title)}'>
@ -2395,10 +2373,7 @@ async function __processPaginatorNextPage(page)
const new_url = new URL(location.href) const new_url = new URL(location.href)
new_url.hash = page new_url.hash = page
//history.replaceState(null, null, new_url) history.replaceState(null, null, new_url)
showMoreObserver.disconnect()
showMoreObserver.observe(u('.paginator:not(.paginator-at-top)').nodes[0])
if(typeof __scrollHook != 'undefined') { if(typeof __scrollHook != 'undefined') {
__scrollHook(page) __scrollHook(page)
@ -2464,7 +2439,8 @@ u(document).on('click', '#__sourceAttacher', (e) => {
MessageBox(tr('add_source'), ` MessageBox(tr('add_source'), `
<div id='source_flex_kunteynir'> <div id='source_flex_kunteynir'>
<span>${tr('set_source_tip')}</span> <span>${tr('set_source_tip')}</span>
<input type='text' maxlength='400' placeholder='...'> <!-- давай, копируй ссылку и переходи по ней -->
<input type='text' maxlength='400' placeholder='https://www.youtube.com/watch?v=lkWuk_nzzVA'>
</div> </div>
`, [tr('cancel')], [ `, [tr('cancel')], [
() => {Function.noop} () => {Function.noop}
@ -2674,7 +2650,7 @@ u(document).on('click', "#__geoAttacher", async (e) => {
${tplMapIcon} ${tplMapIcon}
<span>${escapeHtml(geo_name)}</span> <span>${escapeHtml(geo_name)}</span>
<div id="small_remove_button"></div> <div id="small_remove_button"></div>
`).addClass("appended-geo") `)
}, () => {}] }, () => {}]
}) })
@ -2977,28 +2953,3 @@ u(document).on("submit", "#additional_fields_form", (e) => {
} }
}) })
}) })
if(Number(localStorage.getItem('ux.gif_autoplay') ?? 0) == 1) {
const showMoreObserver = new IntersectionObserver(entries => {
entries.forEach(async x => {
doc_item = x.target.closest(".docGalleryItem")
if(doc_item.querySelector(".play-button") != null) {
if(x.isIntersecting) {
doc_item.classList.add("playing")
} else {
doc_item.classList.remove("playing")
}
}
})
}, {
root: null,
rootMargin: '0px',
threshold: 0,
})
if(u('.docGalleryItem').length > 0) {
u('.docGalleryItem').nodes.forEach(item => {
showMoreObserver.observe(item)
})
}
}

View file

@ -401,10 +401,8 @@ window.addEventListener('popstate', (e) => {
return return
}*/ }*/
if(e.state != null) { window.router.route({
window.router.route({ url: location.href,
url: location.href, push_state: false,
push_state: false, })
})
}
}) })

View file

@ -868,9 +868,6 @@
"sort_up" = "Sort by ID up"; "sort_up" = "Sort by ID up";
"sort_down" = "Sort by ID down"; "sort_down" = "Sort by ID down";
"new_first" = "New frist";
"old_first" = "Old first";
/* Videos */ /* Videos */
"videos" = "Videos"; "videos" = "Videos";
@ -2325,8 +2322,6 @@
"roll_back" = "rollback"; "roll_back" = "rollback";
"roll_backed" = "rollbacked"; "roll_backed" = "rollbacked";
"nospam_prevention" = "This action will affect a lot of data. Are you sure you want to apply?";
/* RSS */ /* RSS */
"post_deact_in_general" = "Page deletion"; "post_deact_in_general" = "Page deletion";

View file

@ -826,9 +826,6 @@
"sort_up" = "Сортировать по дате создания вверх"; "sort_up" = "Сортировать по дате создания вверх";
"sort_down" = "Сортировать по дате создания вниз"; "sort_down" = "Сортировать по дате создания вниз";
"new_first" = "Сначала новые";
"old_first" = "Сначала старые";
/* Videos */ /* Videos */
"videos" = "Видеозаписи"; "videos" = "Видеозаписи";
@ -2220,8 +2217,6 @@
"roll_back" = "откатить"; "roll_back" = "откатить";
"roll_backed" = "откачено"; "roll_backed" = "откачено";
"nospam_prevention" = "Данное действие затронет множество данных. Вы действительно хотите применить?";
/* RSS */ /* RSS */
"post_deact_in_general" = "Удаление страницы"; "post_deact_in_general" = "Удаление страницы";