function openers() {
// Get all elements with an id attribute
let elements = document.querySelectorAll('[id]');
// Loop over them
for (let element of elements) {
// Get the value of the href attribute
let href = element.href;
// Add an event listener to each element
element.addEventListener('click', function(event) {
// Prevent the default action
event.preventDefault();
// Check if the href includes 'png' or 'jpg'
if (href.includes('png') || href.includes('jpg')) {
// Redirect to view.html with the href as a hash
window.location = 'view.html#' + href;}
// Check if the href is on the web and ends with 'pdf'
else if (href.includes('https') && href.includes('pdf')) {
// Redirect to assets-a-cgi-pd.cgi with the href as a query
window.location = '../assets-a-cgi-pd.cgi?' + href;}
// Check if the href is local and ends with 'pdf'
else if (href.includes('file') && href.includes('pdf')) {
// Open file
window.location = href;}
// Check if the href is on the web and ends with 'zip'
else if (href.includes('https') && href.includes('zip')) {
// Redirect to assets-a-cgi-dz.cgi with the href as a query
window.location = '../assets-a-cgi-dz.cgi?' + href;}
// Check if the href is local and ends with 'zip'
else if (href.includes('file') && href.includes('zip')) {
// Go to top of page and don't redirect
window.location = '#';}
// NEW Check if the href includes '1000'
else if (href.includes('1000')) {
// NEW open href without adding to history
window.location.replace(href);}
// NEW Check if the href includes 'img-land'
else if (href.includes('img-land')) {
// NEW open href without adding to history
window.location.replace(href);}
// NEW Check if the href includes 'img-website'
else if (href.includes('img-website')) {
// NEW open href without adding to history
window.location.replace(href);}
});}
}