Skip to content

Commit

Permalink
fix bug && realtime change
Browse files Browse the repository at this point in the history
  • Loading branch information
yangfengchang committed Oct 25, 2021
1 parent dc22267 commit 5e2ed35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ function enhanceGoogleSearchFilter(key, val) {
function getSearchFilter(key, val) {
let result = key + "=" + val
filter_lines = JSON.parse(localStorage.getItem("filter_key"))
if (!filter_lines) return
if (!filter_lines) return result
for (let i = 0; i < filter_lines.length; i++) {
let filter_line = filter_lines[i]
if (String(val).indexOf(String(filter_line.val)) != -1) continue
if (filter_line.active) {
result += ("%20-" + filter_line.val + "&")
result += ("%20-" + filter_line.val)
}
}
return result ? result : ""
Expand Down
2 changes: 1 addition & 1 deletion popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function init_triggers() {
// 每次append 都要为所有的 delete btn 绑定上删除事件
common_add_element_event_trigger("delete-filter", callback_btn_remove_ele, false, 'click')
// 为 input text 绑定 onblur 事件
common_add_element_event_trigger("filter-text-input", callback_input_on_blur, true, "onblur")
common_add_element_event_trigger("filter-text-input", callback_input_on_blur, true, "onchange")
common_add_element_event_trigger("select-box", callback_checkbox_checked, false, "click")
}

Expand Down

0 comments on commit 5e2ed35

Please sign in to comment.