Hello!!
Do you want keyboard bindings for campaign?
You need a user script manager, like TamperMonkey. It is an addon for your browser.
Once you have it, you want to create a new script and copy and paste the below code. Save and make sure enabled.
When opening campaign, you might have to refresh once to get it to register.
Default bindings (below) are:
Q for top explore button
W for bottom explore button
E for explore again (only works if explore again is an option)
R for reload page
F for feed all
X to close feed all popup
Bone Copy has an updated script on page 2.
// ==UserScript==
// @name Accessibility
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Keyboard Bindings for Lorwolf
// @author T.
// @grant none
// @match https://www.lorwolf.com/Campaign*
// @license MIT
// ==/UserScript==
(function() {
'use strict';
// Function to simulate a click on the explore buttons 0/1
function clickButton(optionId) {
const button = document.querySelector(`.exploreOption[data-option-id="${optionId}"]`);
if (button) {
button.click();
}
}
// Function to simulate a click on the "Explore Again" link
function clickExploreAgain() {
const exploreAgainLink = document.querySelector('.exploreAgainOption');
if (exploreAgainLink) {
exploreAgainLink.click();
}
}
// Function to simulate a click on the "Feed All" button
function clickFeedAll() {
const feedAllButton = document.querySelector('.partyFeedAllButton');
if (feedAllButton) {
feedAllButton.click();
}
}
// Function to close the modal and remove the backdrop
function closeModal() {
const closeButton = document.querySelector('.modal-header .close');
const modalBackdrop = document.querySelector('.modal-backdrop');
const wolfToyModal = document.getElementById('wolfToyRewardsModalContent');
if (closeButton) {
closeButton.click();
}
if (modalBackdrop) {
modalBackdrop.remove();
}
if (wolfToyModal) {
wolfToyModal.remove();
}
}
// Event listener for key presses
document.addEventListener('keydown', function(event) {
// Checking if key pressed corresponds to the below
// You can change the keybinds to whatever you want. If you want to use arrow keys, use Arrow then the direction, ie. (event.key === 'ArrowUp')
if (event.key === 'q') {
clickButton(0); // Press the top button when 'q' is pressed
} else if (event.key === 'w') {
clickButton(1); // Press the bottom button when 'w' is pressed
} else if (event.key === 'e') {
clickExploreAgain(); // Press the "Explore Again" link when 'e' is pressed
} else if (event.key === 'f') {
clickFeedAll(); // Press the "Feed All" button when 'f' is pressed
} else if (event.key === 'x') {
closeModal(); // Press 'x' to close the "Feed All" pop-up
} else if (event.key === 'r') {
location.reload(); // Refresh the page when 'r' is pressed
}
});
})();
If you want to change keybinds, it is in the last portion. If you need help with this, please ask!!
Example, right hand controls.
if (event.key === 'ArrowUp') {
clickButton(0); // Press the top button when 'ArrowUp' is pressed
} else if (event.key === 'ArrowDown') {
clickButton(1); // Press the bottom button when 'DownArrow' is pressed
} else if (event.key === 'ArrowLeft') {
clickExploreAgain(); // Press the "Explore Again" link when 'Left Arrow' is pressed
} else if (event.key === '0') {
clickFeedAll(); // Press the "Feed All" button when '0' is pressed
} else if (event.key === '1') {
closeModal(); // Press '1' to close the "Feed All" pop-up
} else if (event.key === 'ArrowRight') {
location.reload(); // Refresh the page when 'Right Arrow' is pressed
If you run into problems, I will do my best to help!!
#1 issue will be spacing, make sure spacing matches above.