bcv
This commit is contained in:
parent
fdd50822e5
commit
1a68e03dbd
8 changed files with 17 additions and 18 deletions
|
@ -16,7 +16,12 @@ function expandDesktopImage(image) {
|
||||||
document.getElementById("desktop-expanded-image-wrap-link").href=image;
|
document.getElementById("desktop-expanded-image-wrap-link").href=image;
|
||||||
};
|
};
|
||||||
|
|
||||||
function popovertrigger() {
|
function bs_trigger() {
|
||||||
|
let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
||||||
|
tooltipTriggerList.map(function(element){
|
||||||
|
return bootstrap.Tooltip.getOrCreateInstance(element);
|
||||||
|
});
|
||||||
|
|
||||||
const popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
|
const popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
|
||||||
const popoverList = popoverTriggerList.map(function(popoverTriggerEl) {
|
const popoverList = popoverTriggerList.map(function(popoverTriggerEl) {
|
||||||
const popoverId = popoverTriggerEl.getAttribute('data-content-id');
|
const popoverId = popoverTriggerEl.getAttribute('data-content-id');
|
||||||
|
@ -30,7 +35,7 @@ function popovertrigger() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
popovertrigger()
|
bs_trigger()
|
||||||
|
|
||||||
function popclick(author) {
|
function popclick(author) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
@ -29,11 +29,7 @@ function morecomments(cid) {
|
||||||
xhr.onload=function(){
|
xhr.onload=function(){
|
||||||
if (xhr.status==200) {
|
if (xhr.status==200) {
|
||||||
document.getElementById(`morecomments-${cid}`).innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
|
document.getElementById(`morecomments-${cid}`).innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
|
||||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
bs_trigger()
|
||||||
tooltipTriggerList.map(function(element){
|
|
||||||
return bootstrap.Tooltip.getOrCreateInstance(element);
|
|
||||||
});
|
|
||||||
popovertrigger()
|
|
||||||
}
|
}
|
||||||
btn.disabled = false;
|
btn.disabled = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,6 +165,7 @@ function post_reply(id){
|
||||||
try{
|
try{
|
||||||
let data = JSON.parse(xhr.response)
|
let data = JSON.parse(xhr.response)
|
||||||
document.getElementById('toast-post-error-text').innerText = data["error"];
|
document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||||
|
bs_trigger()
|
||||||
}
|
}
|
||||||
catch(e) {console.log(e)}
|
catch(e) {console.log(e)}
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
||||||
|
@ -240,6 +241,7 @@ function post_comment(fullname){
|
||||||
try{
|
try{
|
||||||
let data = JSON.parse(xhr.response)
|
let data = JSON.parse(xhr.response)
|
||||||
document.getElementById('toast-post-error-text').innerText = data["error"];
|
document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||||
|
bs_trigger()
|
||||||
}
|
}
|
||||||
catch(e) {console.log(e)}
|
catch(e) {console.log(e)}
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
||||||
|
|
|
@ -9,11 +9,7 @@ function viewmore(pid,sort,offset,ids) {
|
||||||
xhr.onload=function(){
|
xhr.onload=function(){
|
||||||
if (xhr.status==200) {
|
if (xhr.status==200) {
|
||||||
document.getElementById(`viewmore-${offset}`).innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
|
document.getElementById(`viewmore-${offset}`).innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
|
||||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
bs_trigger()
|
||||||
tooltipTriggerList.map(function(element){
|
|
||||||
return bootstrap.Tooltip.getOrCreateInstance(element);
|
|
||||||
});
|
|
||||||
popovertrigger()
|
|
||||||
}
|
}
|
||||||
btn.disabled = false;
|
btn.disabled = false;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1013,7 +1013,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<script src="/static/assets/js/marked.js?a=242"></script>
|
<script src="/static/assets/js/marked.js?a=242"></script>
|
||||||
<script src="/static/assets/js/comments_v.js?a=254"></script>
|
<script src="/static/assets/js/comments_v.js?a=255"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/static/assets/js/clipboard.js?a=250"></script>
|
<script src="/static/assets/js/clipboard.js?a=250"></script>
|
||||||
|
@ -1024,8 +1024,8 @@
|
||||||
|
|
||||||
{% include "expanded_image_modal.html" %}
|
{% include "expanded_image_modal.html" %}
|
||||||
|
|
||||||
<script src="/static/assets/js/comments+submission_listing.js?a=250"></script>
|
<script src="/static/assets/js/comments+submission_listing.js?a=251"></script>
|
||||||
<script src="/static/assets/js/comments.js?a=250"></script>
|
<script src="/static/assets/js/comments.js?a=251"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
{% if p and (not v or v.highlightcomments) %}
|
{% if p and (not v or v.highlightcomments) %}
|
||||||
|
|
|
@ -1180,7 +1180,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if offset %}
|
{% if offset %}
|
||||||
<script src="/static/assets/js/viewmore.js?a=246"></script>
|
<script src="/static/assets/js/viewmore.js?a=247"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% elif not p.replies and p.deleted_utc == 0 %}
|
{% elif not p.replies and p.deleted_utc == 0 %}
|
||||||
|
|
|
@ -711,5 +711,5 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="/static/assets/js/clipboard.js?a=240"></script>
|
<script src="/static/assets/js/clipboard.js?a=240"></script>
|
||||||
<script src="/static/assets/js/comments+submission_listing.js?a=240"></script>
|
<script src="/static/assets/js/comments+submission_listing.js?a=251"></script>
|
||||||
<script src="/static/assets/js/submission_listing.js?a=240"></script>
|
<script src="/static/assets/js/submission_listing.js?a=240"></script>
|
Loading…
Add table
Add a link
Reference in a new issue