mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 14:04:45 -04:00
Add search frontend extension, plus refactorings to make it work.
This commit is contained in:
parent
7f687e0a84
commit
c35abad20a
17 changed files with 275 additions and 115 deletions
|
@ -98,12 +98,7 @@ modulejs.define('ext/preview-audio', ['_', '$', 'core/event', 'core/format', 'co
|
|||
}
|
||||
}
|
||||
|
||||
function onLocationChanged(item) {
|
||||
|
||||
_.each(item.content, initItem);
|
||||
}
|
||||
|
||||
function onLocationRefreshed(item, added) {
|
||||
function onViewChanged(added) {
|
||||
|
||||
_.each(added, initItem);
|
||||
}
|
||||
|
@ -114,8 +109,7 @@ modulejs.define('ext/preview-audio', ['_', '$', 'core/event', 'core/format', 'co
|
|||
return;
|
||||
}
|
||||
|
||||
event.sub('location.changed', onLocationChanged);
|
||||
event.sub('location.refreshed', onLocationRefreshed);
|
||||
event.sub('view.changed', onViewChanged);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue