Keyboard Control's

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • iioklo
    New Member
    • Aug 2016
    • 1

    Keyboard Control's

    When I'm browsing down through a forum or thread's page I use the Up and Down arrow keys to scroll up and down, what I would like is when I get to the bottom of the page is to be able to press the Right arrow key to go to the next Page or the Left arrow key to go back a page.

    I've Created a small javascript/greesemonkey script that does this on a local vBulletin board that I use. However I would like you to consider adding this functionality to your codebase so it can be available on every forum website.

    This javascript code works on Firefox and Chrome have not tested it on other browsers.

    Code:
    window.onkeydown = function(event) { //when keyboard key's are pressed.
            if (event.keyCode === 37) { // when 'Left Arrow Key' is presed on keyboard run this function.
                  location.href = document.querySelector('a[rel="prev"]').href;
            }
    
            if (event.keyCode === 39) { // when 'Right Arrow Key' is presed on keyboard run this function.
                  location.href = document.querySelector('a[rel="next"]').href;
            }
    } //end of keyboard keydown function.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74122

    #2
    Customers can make requests for new features here: http://tracker.vbulletin.com/secure/...91&issuetype=7
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...