MediaWiki:Common.js: Difference between revisions

From The Skullgirls Wiki
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
Line 11: Line 11:
     // Append the div to the body
     // Append the div to the body
     document.body.appendChild(imageDiv);
     document.body.appendChild(imageDiv);
});
// YT link on main page
document.addEventListener('DOMContentLoaded', function() {
    var isSkullgirlsPage = document.body.classList.contains('page-Welcome_to_the_Skullgirls_Wiki_Folks');
    if (isSkullgirlsPage) {
        var content = document.querySelector('#content');
        content.addEventListener('click', function() {
            window.open('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
        });
    }
});
});

Revision as of 15:22, 21 May 2024

/* Any JavaScript here will be loaded for all users on every page load. */
/*Kyle image down there*/
$(document).ready(function() {
    // Create a div element for the image
    var imageDiv = document.createElement('div');
    imageDiv.className = 'bottom-left-image';
    
    // Add the image markup to the div with CSS for size adjustment
    imageDiv.innerHTML = '<a href="Kyle" title="Image"><img src="https://skullgirlz.wiki/images/1/1f/Kyle_Bloodworth-Thomason2.png" style="width: 115px; height: auto;" /></a>';
    
    // Append the div to the body
    document.body.appendChild(imageDiv);
});