diff options
| author | Dalf <alex@al-f.net> | 2019-07-23 14:13:38 +0200 |
|---|---|---|
| committer | Dalf <alex@al-f.net> | 2019-08-06 12:14:11 +0200 |
| commit | 6fbba63c83b18a652e571ce5a803773cd72e5b6a (patch) | |
| tree | 48d64f887e762423ba588ce03cdd4453ee30c088 /searx/static/themes/simple/js/searx.js | |
| parent | 90b24f1060daf97cbf8e18f4a0087cd74ffb7581 (diff) | |
oscar and simple themes: no inline script (allow A+ Content-Security-Policy)
Diffstat (limited to 'searx/static/themes/simple/js/searx.js')
| -rw-r--r-- | searx/static/themes/simple/js/searx.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/searx/static/themes/simple/js/searx.js b/searx/static/themes/simple/js/searx.js index 1830977c0..e191f2487 100644 --- a/searx/static/themes/simple/js/searx.js +++ b/searx/static/themes/simple/js/searx.js @@ -15,7 +15,7 @@ * (C) 2017 by Alexandre Flament, <alex@al-f.net> * */ -(function(w, d, searx) { +window.searx = (function(w, d) { 'use strict'; @@ -45,7 +45,7 @@ } } - searx = searx || {}; + var searx = window.searx || {}; searx.on = function(obj, eventType, callback, useCapture) { useCapture = useCapture || false; @@ -110,7 +110,7 @@ }; searx.loadStyle = function(src) { - var path = searx.staticPath + src, + var path = searx.static_path + src, id = "style_" + src.replace('.', '_'), s = d.getElementById(id); if (s === null) { @@ -124,7 +124,7 @@ }; searx.loadScript = function(src, callback) { - var path = searx.staticPath + src, + var path = searx.static_path + src, id = "script_" + src.replace('.', '_'), s = d.getElementById(id); if (s === null) { @@ -161,7 +161,7 @@ }); return searx; -})(window, document, window.searx); +})(window, document); ;(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ /* * @license MIT @@ -1529,7 +1529,7 @@ module.exports = AutoComplete; if (searx.autocompleter) { searx.autocomplete = AutoComplete.call(w, { Url: "./autocompleter", - EmptyMessage: searx.noItemFound, + EmptyMessage: searx.no_item_found, HttpMethod: searx.method, MinChars: 4, Delay: 300, |