2018-06-08 14:24:17 +02:00
|
|
|
exports.initialize = function () {
|
|
|
|
if (!page_params.search_pills_enabled) {
|
|
|
|
return;
|
|
|
|
}
|
2019-11-02 00:06:25 +01:00
|
|
|
const container = $('#search_arrows');
|
2018-07-23 02:20:57 +02:00
|
|
|
exports.widget = search_pill.create_pills(container);
|
2018-07-14 16:10:00 +02:00
|
|
|
|
2020-07-02 01:45:54 +02:00
|
|
|
exports.widget.onPillRemove(() => {
|
2020-06-17 16:24:11 +02:00
|
|
|
if (exports.widget.items().length === 0) {
|
|
|
|
ui_util.change_tab_to('#home');
|
|
|
|
narrow.deactivate();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2020-07-02 01:45:54 +02:00
|
|
|
exports.widget.createPillonPaste(() => false);
|
2018-06-08 14:24:17 +02:00
|
|
|
};
|
|
|
|
|
2019-10-25 09:45:13 +02:00
|
|
|
window.search_pill_widget = exports;
|