mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
remove some obsolete JS
This commit is contained in:
parent
bd3da38ff9
commit
cb614b1394
2 changed files with 2 additions and 43 deletions
|
@ -127,7 +127,6 @@ function setupLightboxTeaser() {
|
|||
|
||||
// fires after all resources have loaded, including stylesheets and js files
|
||||
window.addEventListener("load", function () {
|
||||
setupPostTypeTabs(); // when choosing the type of your new post, store the chosen tab in a hidden field so the backend knows which fields to check
|
||||
setupHideButtons();
|
||||
});
|
||||
|
||||
|
@ -351,44 +350,6 @@ function setupCommunityNameInput() {
|
|||
}
|
||||
}
|
||||
|
||||
function setupPostTypeTabs() {
|
||||
|
||||
const tabEl = document.querySelector('#discussion-tab')
|
||||
if(tabEl) {
|
||||
tabEl.addEventListener('show.bs.tab', event => {
|
||||
document.getElementById('post_type ').value = 'discussion';
|
||||
});
|
||||
}
|
||||
const tabE2 = document.querySelector('#link-tab')
|
||||
if(tabE2) {
|
||||
tabE2.addEventListener('show.bs.tab', event => {
|
||||
document.getElementById('post_type').value = 'link';
|
||||
});
|
||||
}
|
||||
const tabE3 = document.querySelector('#image-tab')
|
||||
if(tabE3) {
|
||||
tabE3.addEventListener('show.bs.tab', event => {
|
||||
document.getElementById('post_type').value = 'image';
|
||||
});
|
||||
}
|
||||
const tabE4 = document.querySelector('#poll-tab')
|
||||
if(tabE4) {
|
||||
tabE4.addEventListener('show.bs.tab', event => {
|
||||
document.getElementById('post_type').value = 'poll';
|
||||
});
|
||||
}
|
||||
// Check if there is a hidden field with the name 'type'. This is set if server-side validation of the form fails
|
||||
var typeField = document.getElementById('post_type');
|
||||
if (typeField && typeField.tagName === 'INPUT' && typeField.type === 'hidden') {
|
||||
var typeVal = typeField.value;
|
||||
if(typeVal) {
|
||||
const tab = document.getElementById(typeVal + '-tab');
|
||||
if(tab)
|
||||
tab.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setupHideButtons() {
|
||||
const hideEls2 = document.querySelectorAll('.hide_button a');
|
||||
|
|
|
@ -1430,13 +1430,11 @@ h1 .warning_badge {
|
|||
#baguetteBox-overlay {
|
||||
overflow: scroll !important;
|
||||
}
|
||||
|
||||
#baguetteBox-overlay .full-image {
|
||||
height: auto !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
#baguetteBox-overlay .full-image figure {
|
||||
display: inline-block !important;
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
#baguetteBox-slider {
|
||||
|
|
Loading…
Add table
Reference in a new issue