Keyboard Navigation in Assignment list and Dogtag list - Better Battlelog Forums #147256

Sitemap
Post edited 3 x times, last by
Topicstarter
Keyboard Navigation in Assignment and Dogtag:

Example Code:
$(window).keyup(function(event) {
var $activeListElement = $('.box-content li.active');
if ($activeListElement.length) {
if (event.keyCode === 39 || event.keyCode === 68) { // right arrow or d
$activeListElement.next().find('div').first().click();
} else if (event.keyCode === 37 || event.keyCode === 65) { // left arrow or a
$activeListElement.prev().find('div').first().click();
} else if (event.keyCode === 38 || event.keyCode === 87) { // up arrow or w
$activeListElement.prevAll().eq(4).find('div').first().click();
} else if (event.keyCode === 40 || event.keyCode === 83) { // down arrow or s
$activeListElement.nextAll().eq(4).find('div').first().click();
}
}
});
Cool, i suggest you to create a custom plugin for this feature.
Post edited 3 x times, last by
Topicstarter
so i tried to convert it to a plugin but the storage is not doing what I expected.
The option disable enable does strange thing sometimes on reload the storage is false.

Here is my code:
https://gist.github.com/alexander-schranz/d70b3759857382b99b1a


Edit: Ok get it the handler is called before the storage is updated. Fixed in in revision 4

Currently cant upload it (blocked by admin) Created a thread in Custom Plugins:
https://getbblog.com/en/board/topic/147275/1/Keyboard-Navigation-in-Assignment-list-and-Dogtag-list
You should now be able to upload the latest revision of the plugin. :-)
Topicstarter
Thank you! Its up2date.