Commit cec4487c authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[iframe] add iframe postMessage on input change

parent 2d4d0bdc
'use strict';
(() => {
$(document).on('ready', function() {
$('#q').on('change', function() {
if (document.referrer == '') {
return;
}
var $el = $(this);
window.parent.postMessage({
url: window.location.href,
term: $el.val()
}, document.referrer);
});
});
})();
......@@ -98,6 +98,7 @@
{% if autocomplete %} <script src="{{ url_for('static', filename='js/typeahead.bundle.min.js') }}"></script>{% endif %}
<script src="{{ url_for('static', filename='js/require-2.1.15.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/gargantext.js') }}"></script>
<script src="{{ url_for('static', filename='js/searx.min.js') }}"
data-method="{{ method or 'POST' }}"
data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}"></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment