• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Spooky Scary Skeletons

  1. open browser console
  2. paste code (see below)
  3. press enter
  4. close console
  5. press spooky button on/off
JavaScript:
let isSpooking = false;
let currentSkelleton = null;
let newStyle = null;
let skeletton_animation = [
    "https://www.hiveworkshop.com/attachments/skelleton-1-gif.307520/",
    "https://www.hiveworkshop.com/attachments/skeletton-2-gif.307521/",
    "https://www.hiveworkshop.com/attachments/skeletton-3-gif.307522/",
    "https://www.hiveworkshop.com/attachments/skeletton-4-gif.307523/",
    "https://www.hiveworkshop.com/attachments/skeletton-5-gif.307524/",
    "https://www.hiveworkshop.com/attachments/skeletton-6-gif.307525/",
    "https://www.hiveworkshop.com/attachments/skeletton-7-gif.307526/",
    "https://www.hiveworkshop.com/attachments/skeletton-8-gif.307527/",
    "https://www.hiveworkshop.com/attachments/skeletton-9-gif.307528/",
];

let setRandomBackground = function(skeletton_array) {
    let index = 1 + Math.floor(Math.random() * skeletton_array.length - 1);
    document.body.style.background = "url('" + skeletton_array[index] + "')";
};

// Add div to HTML
let addDivElement = function(htmlCode, element) {
    let divContainer = document.createElement("div");
    divContainer.innerHTML = htmlCode;
    divContainer.style.position = "relative";
    divContainer.style.zIndex = "%";
    element.appendChild(divContainer);
};

// Add style to head
let addStyleElement = function(styleString) {
    let css = styleString;
    let head = document.head || document.getElementsByTagName('head')[0];
    let style = document.createElement('style');
    style.type = 'text/css';
    style.appendChild(document.createTextNode(css));
    head.appendChild(style);
    return style;
};

let toggleSpook = function() {
    isSpooking = !isSpooking;
    if(isSpooking) {
        setRandomBackground(skeletton_animation);
        currentSkelleton = setInterval(function() { setRandomBackground(skeletton_animation); }, 5 * 1000);
        newStyle = addStyleElement("div.item-container { background: #161618BB !important; } #footer-links { background: #161618BB !important; }");
        toggleButton.src = "https://www.hiveworkshop.com/attachments/button-2-png.307519/";
        musicPlayer.play();
    }
    else {
        clearInterval(currentSkelleton);
        document.body.style.background = "black";
        newStyle.remove();
        musicPlayer.pause();
        toggleButton.src = "https://www.hiveworkshop.com/attachments/button-1-png.307518/";
    }
}

addDivElement("<audio loop controls id=\"spookydoot\" style=\"display: none;\"><source src=\"https://www.hiveworkshop.com/attachments/andrew-gold-spooky-scary-skeletons-mp3.307517/\" type=\"audio/mpeg\"></audio>", document.body);
let musicPlayer = document.getElementById("spookydoot");
let toggleButton = document.createElement("img");
toggleButton.src = "https://www.hiveworkshop.com/attachments/button-1-png.307518/";
toggleButton.style = "position: fixed; top: 222.00px; left: 38.00px; width: 145px;";
toggleButton.addEventListener("click", toggleSpook);
document.body.appendChild(toggleButton);

Attachments

  • Andrew Gold - Spooky Scary Skeletons.mp3
    2 MB · Views: 55
  • button 1.png
    button 1.png
    64.1 KB · Views: 40
  • button 2.png
    button 2.png
    46 KB · Views: 41
  • Skelleton 1.gif
    Skelleton 1.gif
    1.8 MB · Views: 55
  • Skeletton 2.gif
    Skeletton 2.gif
    746.2 KB · Views: 65
  • Skeletton 3.gif
    Skeletton 3.gif
    442.5 KB · Views: 40
  • Skeletton 4.gif
    Skeletton 4.gif
    1.1 MB · Views: 40
  • Skeletton 5.gif
    Skeletton 5.gif
    498.7 KB · Views: 37
  • Skeletton 6.gif
    Skeletton 6.gif
    494.4 KB · Views: 64
  • Skeletton 7.gif
    Skeletton 7.gif
    916.8 KB · Views: 65
  • Skeletton 8.gif
    Skeletton 8.gif
    2 MB · Views: 65
  • Skeletton 9.gif
    Skeletton 9.gif
    600.4 KB · Views: 37
Last edited:
Top