Compare commits
	
		
			2 Commits
		
	
	
		
			536ed1cffe
			...
			0bbd05c8b8
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					0bbd05c8b8 | ||
| 
						 | 
					be58ed12d0 | 
@ -1051,8 +1051,9 @@
 | 
			
		||||
                                    <div class="input-group">
 | 
			
		||||
                                        <input class="form-control" id="nemesisHintProgressMultiplierCorpus" type="number" min="-1" max="65535" data-default="1" />
 | 
			
		||||
                                        <button class="btn btn-secondary" type="button" data-loc="cheats_save"></button>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                </form>
 | 
			
		||||
                                <form class="form-group mt-2"></form>
 | 
			
		||||
                                <form class="form-group mt-2">
 | 
			
		||||
                                    <label class="form-label" for="nemesisExtraWeapon" data-loc="cheats_nemesisExtraWeapon"></label>
 | 
			
		||||
                                    <div class="input-group">
 | 
			
		||||
                                        <input class="form-control" id="nemesisExtraWeapon" type="number" min="0" max="65535" data-default="0" />
 | 
			
		||||
 | 
			
		||||
@ -3218,10 +3218,9 @@ function doIntrinsicsUnlockAll() {
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
document.querySelectorAll("#account-cheats input[type=checkbox], #account-cheats input[type=number]").forEach(elm => {
 | 
			
		||||
document.querySelectorAll("#account-cheats input[type=checkbox]").forEach(elm => {
 | 
			
		||||
    elm.onchange = function () {
 | 
			
		||||
        revalidateAuthz().then(() => {
 | 
			
		||||
            const value = elm.type === "checkbox" ? elm.checked : elm.value;
 | 
			
		||||
            $.post({
 | 
			
		||||
                url: "/custom/setAccountCheat?" + window.authz,
 | 
			
		||||
                contentType: "application/json",
 | 
			
		||||
@ -3234,6 +3233,32 @@ document.querySelectorAll("#account-cheats input[type=checkbox], #account-cheats
 | 
			
		||||
    };
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
document.querySelectorAll("#account-cheats .input-group").forEach(grp => {
 | 
			
		||||
    const input = grp.querySelector("input");
 | 
			
		||||
    const btn = grp.querySelector("button");
 | 
			
		||||
    input.oninput = input.onchange = function () {
 | 
			
		||||
        btn.classList.remove("btn-secondary");
 | 
			
		||||
        btn.classList.add("btn-primary");
 | 
			
		||||
    };
 | 
			
		||||
    btn.onclick = function () {
 | 
			
		||||
        btn.classList.remove("btn-primary");
 | 
			
		||||
        btn.classList.add("btn-secondary");
 | 
			
		||||
        const input = btn.closest(".input-group").querySelector('input[type="number"]');
 | 
			
		||||
        if (!input) return;
 | 
			
		||||
        revalidateAuthz().then(() => {
 | 
			
		||||
            const value = input.value;
 | 
			
		||||
            $.post({
 | 
			
		||||
                url: "/custom/setAccountCheat?" + window.authz,
 | 
			
		||||
                contentType: "application/json",
 | 
			
		||||
                data: JSON.stringify({
 | 
			
		||||
                    key: input.id,
 | 
			
		||||
                    value: value
 | 
			
		||||
                })
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    };
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
document.querySelectorAll("#guild-cheats input[type=checkbox]").forEach(elm => {
 | 
			
		||||
    elm.onchange = function () {
 | 
			
		||||
        revalidateAuthz().then(() => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user