mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-07 01:25:11 +01:00
Moved autocompletion items to seperate javascript call
This commit is contained in:
11
templates/bookmarks.js
Normal file
11
templates/bookmarks.js
Normal file
@@ -0,0 +1,11 @@
|
||||
var elem = document.querySelector('.autocomplete');
|
||||
var instance = M.Autocomplete.getInstance(elem);
|
||||
instance.updateData({
|
||||
{% for bookmark in bookmarks %}
|
||||
{% if bookmark.favicon %}
|
||||
"{{ bookmark.title | replace('"', '\\"') | replace('\n', '') }}": "{{ url_for('static', filename='favicons/' + bookmark.favicon) }}",
|
||||
{% else %}
|
||||
"{{ bookmark.title | replace('"', '\\"') | replace('\n', '') }}": null,
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
});
|
||||
Reference in New Issue
Block a user