2019-07-23 14:13:38 +02:00
|
|
|
/**
|
2021-09-30 17:55:22 +02:00
|
|
|
* @license
|
|
|
|
* (C) Copyright Contributors to the SearXNG project.
|
|
|
|
* (C) Copyright Contributors to the searx project (2014 - 2021).
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2019-07-23 14:13:38 +02:00
|
|
|
*/
|
2021-09-30 17:55:22 +02:00
|
|
|
|
|
|
|
window.searxng = (function(d) {
|
2019-07-23 14:13:38 +02:00
|
|
|
'use strict';
|
|
|
|
|
2021-03-22 12:00:48 +01:00
|
|
|
//
|
|
|
|
d.getElementsByTagName("html")[0].className = "js";
|
|
|
|
|
2019-07-23 14:13:38 +02:00
|
|
|
// add data- properties
|
|
|
|
var script = d.currentScript || (function() {
|
|
|
|
var scripts = d.getElementsByTagName('script');
|
|
|
|
return scripts[scripts.length - 1];
|
|
|
|
})();
|
|
|
|
|
|
|
|
return {
|
|
|
|
autocompleter: script.getAttribute('data-autocompleter') === 'true',
|
2021-03-16 11:07:04 +01:00
|
|
|
method: script.getAttribute('data-method'),
|
|
|
|
translations: JSON.parse(script.getAttribute('data-translations'))
|
2019-07-23 14:13:38 +02:00
|
|
|
};
|
|
|
|
})(document);
|