Qq_Builder

Building by clicking Q

  1. // ==UserScript==
  2. // @name Qq_Builder
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Building by clicking Q
  6. // @author RzoQe
  7. // @grant none
  8. // @include *://*.travian.*
  9. // @include *://*/*.travian.*
  10. // @exclude *://*.travian*.*/hilfe.php*
  11. // @exclude *://*.travian*.*/log*.php*
  12. // @exclude *://*.travian*.*/index.php*
  13. // @exclude *://*.travian*.*/anleitung.php*
  14. // @exclude *://*.travian*.*/impressum.php*
  15. // @exclude *://*.travian*.*/anmelden.php*
  16. // @exclude *://*.travian*.*/gutscheine.php*
  17. // @exclude *://*.travian*.*/spielregeln.php*
  18. // @exclude *://*.travian*.*/links.php*
  19. // @exclude *://*.travian*.*/geschichte.php*
  20. // @exclude *://*.travian*.*/tutorial.php*
  21. // @exclude *://*.travian*.*/manual.php*
  22. // @exclude *://*.travian*.*/ajax.php*
  23. // @exclude *://*.travian*.*/ad/*
  24. // @exclude *://*.travian*.*/chat/*
  25. // @exclude *://forum.travian*.*
  26. // @exclude *://board.travian*.*
  27. // @exclude *://shop.travian*.*
  28. // @exclude *://*.travian*.*/activate.php*
  29. // @exclude *://*.travian*.*/support.php*
  30. // @exclude *://help.travian*.*
  31. // @exclude *://*.answers.travian*.*
  32. // @exclude *.css
  33. // @exclude *.js
  34.  
  35. // ==/UserScript==
  36.  
  37. if (document.layers) {
  38. document.captureEvents(Event.KEYDOWN);
  39. }
  40.  
  41. document.onkeydown = function (evt) {
  42. var keyCode = evt ? (evt.which ? evt.which : evt.keyCode) : event.keyCode;
  43. if (keyCode == 81) {
  44. document.querySelector(".textButtonV1 gold.").click();
  45. } else {
  46. return true;
  47. }
  48. }