diff options
Diffstat (limited to 'doc/godocs.js')
| -rw-r--r-- | doc/godocs.js | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/doc/godocs.js b/doc/godocs.js index 8b451547d..2b3ab065f 100644 --- a/doc/godocs.js +++ b/doc/godocs.js @@ -34,7 +34,18 @@ function godocs_bindSearchEvents() {        search.className = "";      }    } +  function restoreInactive() { +    if (search.value != "") { +      return; +    } +    if (search.type != "search") { +      search.value = search.getAttribute("placeholder"); +    } +    search.className = "inactive"; +  } +  restoreInactive();    bindEvent(search, 'focus', clearInactive); +  bindEvent(search, 'blur', restoreInactive);  }  /* Generates a table of contents: looks for h2 and h3 elements and generates | 
