mirror of
https://github.com/searxng/searxng.git
synced 2025-07-23 05:09:17 +02:00
oscar and simple themes: no inline script (allow A+ Content-Security-Policy)
This commit is contained in:
parent
90b24f1060
commit
6fbba63c83
22 changed files with 2763 additions and 71 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue