MediaWiki:Common.js: Difference between revisions

From Realera Wiki
Jump to: navigation, search
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: function submit_form() { level = document.getElementById("level").value content = document.getElementById("expresults") content.innerHTML = ""; lower_range = Math.round(level/1.5) upper_range = Math.round(level*1.5) content.innerHTML = content.innerHTML + "A character with level <b>" + level +"</b> can share experience with levels <b>" + lower_range + "</b> to <b>" + upper...")
 
No edit summary
Line 8: Line 8:
     upper_range = Math.round(level*1.5)
     upper_range = Math.round(level*1.5)
     content.innerHTML = content.innerHTML + "A character with level <b>" + level +"</b> can share experience with levels <b>" + lower_range + "</b> to <b>" + upper_range +"</b><br>"
     content.innerHTML = content.innerHTML + "A character with level <b>" + level +"</b> can share experience with levels <b>" + lower_range + "</b> to <b>" + upper_range +"</b><br>"
}
function submit_pr_form() {
    victim_level = document.getElementById("victim_level").value
    killer_level = document.getElementById("killer_level").value
    content = document.getElementById("lowlvlprotection")
    content.innerHTML = "";
    content.innerHTML = content.innerHTML + "test"
}
}

Revision as of 13:41, 16 December 2023

/* Any JavaScript here will be loaded for all users on every page load. */

function submit_form() {
    level = document.getElementById("level").value
    content = document.getElementById("expresults")
    content.innerHTML = "";
    lower_range = Math.round(level/1.5)
    upper_range = Math.round(level*1.5)
    content.innerHTML = content.innerHTML + "A character with level <b>" + level +"</b> can share experience with levels <b>" + lower_range + "</b> to <b>" + upper_range +"</b><br>"
}

function submit_pr_form() {
    victim_level = document.getElementById("victim_level").value
    killer_level = document.getElementById("killer_level").value

    content = document.getElementById("lowlvlprotection")
    content.innerHTML = "";
    content.innerHTML = content.innerHTML + "test"
}