Cancel inline tag editor with [esc]

Adds an ability to cancel the inline tag editor with [esc]

  1. // ==UserScript==
  2. // @name Cancel inline tag editor with [esc]
  3. // @version 1.0
  4. // @description Adds an ability to cancel the inline tag editor with [esc]
  5. // @author nicael
  6. // @include *://*.stackexchange.com/questions/*
  7. // @include *://*stackoverflow.com/questions/*
  8. // @include *://*serverfault.com/questions/*
  9. // @include *://*superuser.com/questions/*
  10. // @include *://*askubuntu.com/questions/*
  11. // @include *://*stackapps.com/questions/*
  12. // @include *://*mathoverflow.net/questions/*
  13. // @grant none
  14. // @namespace https://greatest.deepsurf.us/users/9713
  15. // ==/UserScript==
  16.  
  17. $("body").on("keydown",".tag-editor input", function(e){
  18. if (e.keyCode == 27){
  19. $(".cancel-edit").click();
  20. }
  21. });