clear filter

This commit is contained in:
ville rantanen
2017-07-13 11:02:01 +03:00
parent e7aead12e1
commit 8edb710ec9

View File

@@ -274,6 +274,17 @@ function keyboard_entry(ev) {
toggle_blank(); toggle_blank();
} }
} }
function keyboard_control(ev) {
var kC=ev.keyCode;
var k=String.fromCharCode(ev.keyCode);
if (ev.ctrlKey) {
if (k=='C') {
document.getElementById("filter").value='';
filter(ev);
}
}
}
function toggle_blank() { function toggle_blank() {
var span=document.getElementById('open_blank_span'); var span=document.getElementById('open_blank_span');
var arrow=document.getElementById('open_blank_arrow'); var arrow=document.getElementById('open_blank_arrow');
@@ -320,6 +331,7 @@ function get_cookie(name) {
return null return null
} }
document.onkeyup=keyboard_entry; document.onkeyup=keyboard_entry;
document.onkeydown=keyboard_control;
document.onscroll=scroll_save; document.onscroll=scroll_save;
var linkReg=/([^\[]*)\[([^\]]+)\]\(([^\)]+)\)(.*)/; var linkReg=/([^\[]*)\[([^\]]+)\]\(([^\)]+)\)(.*)/;
var linkPlain=/(.*)(http[^\s]+)(.*)/; var linkPlain=/(.*)(http[^\s]+)(.*)/;
@@ -341,7 +353,7 @@ var config = {
</head> </head>
<body onload="read_links()"> <body onload="read_links()">
<div id="search"> <div id="search">
<span class="search_span"><input type="text" oninput="filter(event)" onkeypress="filter(event)" onblur="no_filter()" id="filter" title="[s] Filter links by name, filter headers by #name"></span> <span class="search_span"><input type="text" oninput="filter(event)" onkeypress="filter(event)" onblur="no_filter()" id="filter" title="[s] Filter links by name, filter headers by #name. Clear with ctrl-c"></span>
<span class="search_span" id="menu_span"></span> <span class="search_span" id="menu_span"></span>
<span class="search_span tickbox" id=open_blank_span onclick="toggle_blank()" title="[n] Toggle open links in new/this window"><span id=open_blank_box></span><span id=open_blank_arrow></span></span> <span class="search_span tickbox" id=open_blank_span onclick="toggle_blank()" title="[n] Toggle open links in new/this window"><span id=open_blank_box></span><span id=open_blank_arrow></span></span>
</div> </div>