Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

User:Boundbylife/template:npcwh: Difference between revisions

From EVE University Wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<!--THIS IS TESTING CSS, AND SHOULD BE REPLACED BY A MODIFIED {{NPCTableCSS}} FOR DEPLOYMENT -->
<!--THIS IS TESTING CSS, AND SHOULD BE REPLACED BY A MODIFIED {{NPCTableCSS}} FOR DEPLOYMENT -->
<includeonly>
<includeonly>
<style>
.toggle-column {
    display: none;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
    var toggleButton = document.createElement('button');
    toggleButton.textContent = 'Advanced View';
    toggleButton.onclick = function() {
        var columns = document.querySelectorAll('.toggle-column');
        for (var i = 0; i < columns.length; i++) {
            columns[i].style.display = columns[i].style.display === 'none' ? '' : 'none';
        }
        this.textContent = this.textContent === 'Advanced View' ? 'Hide Advanced View' : 'Advanced View';
    };
   
    var container = document.querySelector('.wikitable'); // Adjust if necessary to select appropriately
    container.parentNode.insertBefore(toggleButton, container);
});
</script>
|-
|-
| class=icon | {{#switch: {{{1}}}
| class=icon | {{#switch: {{{1}}}