Changeset 518

Show
Ignore:
Timestamp:
10/18/07 00:37:43 (6 years ago)
Author:
gyuque
Message:

lang/javascript/userscripts/syobocalplus.user.js: hit escape key to clear search box

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/userscripts/syobocalplus.user.js

    r510 r518  
    435435        SearchBox.prototype = { 
    436436                onKey: function(e) { 
     437                        if (27 == e.keyCode) 
     438                                this.clearBox(); 
     439 
    437440                        var v = this.textBox.value; 
    438441                        if (this.oldValue != v) 
     
    460463                }, 
    461464 
     465                clearBox: function() { 
     466                        this.textBox.value = ""; 
     467                }, 
     468 
    462469                outMessage: function(msg) { 
    463470                        this.messageBox.innerHTML = msg;