Added support for attribute to ignoring auto spoilers opening (#1466)

* Added support for attribute to ignoring auto spoilers opening

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-05-05 00:50:28 +07:00 committed by GitHub
commit 65a7b89a9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 3 deletions

View file

@ -9,6 +9,7 @@
- Added updates checker ⚙️ [\#1451](https://github.com/torrentpier/torrentpier/pull/1451) ([belomaxorka](https://github.com/belomaxorka))
- Added preview for country flags while editing [\#1448](https://github.com/torrentpier/torrentpier/pull/1448) ([belomaxorka](https://github.com/belomaxorka))
- Added support for APCu caching method [\#1442](https://github.com/torrentpier/torrentpier/pull/1442) ([belomaxorka](https://github.com/belomaxorka))
- Added support for attribute to ignoring auto spoilers opening [\#1466](https://github.com/torrentpier/torrentpier/pull/1466) ([belomaxorka](https://github.com/belomaxorka))
- Some enhancements [\#1445](https://github.com/torrentpier/torrentpier/pull/1445) ([belomaxorka](https://github.com/belomaxorka))
- Guests can view polls [\#1464](https://github.com/torrentpier/torrentpier/pull/1464) ([belomaxorka](https://github.com/belomaxorka))
- Improved app debug [\#1438](https://github.com/torrentpier/torrentpier/pull/1438) ([belomaxorka](https://github.com/belomaxorka))

View file

@ -380,8 +380,9 @@ function initSpoilers(context) {
$('div.sp-body', context).each(function () {
var $sp_body = $(this);
var name = $.trim(this.title) || '' + bbl['spoiler_head'] + '';
var no_sp_open = ($.trim($sp_body.attr('no-sp-open')) === "true") ? ' ignore-sp-open' : '';
this.title = '';
var $sp_head = $('<div class="sp-head folded clickable">' + name + '</div>');
var $sp_head = $('<div class="sp-head folded clickable' + no_sp_open + '">' + name + '</div>');
$sp_head.insertBefore($sp_body).click(function (e) {
if (!$sp_body.hasClass('inited')) {
initPostImages($sp_body);

View file

@ -8,7 +8,9 @@
</style>
<!-- IF SPOILER_OPENED -->
<script type="text/javascript">
$(document).ready(function(){ $('div.sp-head').click(); });
$(document).ready(function () {
$('div.sp-head').not('.ignore-sp-open').click();
});
</script>
<!-- ENDIF -->
<!-- ENDIF / LOGGED_IN -->

View file

@ -465,7 +465,7 @@ $('#tor-filelist-btn').click(function () {
</div>
<!-- ENDIF -->
<div class="sp-wrap">
<div id="thx-list" class="sp-body" title="{L_LAST_LIKES}"></div>
<div id="thx-list" class="sp-body" no-sp-open="true" title="{L_LAST_LIKES}"></div>
</div>
</div>
<!-- ENDIF -->