searxng/searx/templates/simple
Martin Fischer 3f77ff29a3 [fix] plugin JS/CSS dependencies depend on themes
SearXNG supports plugins. Plugins can declare JavaScript and CSS
dependencies. Currently three plugins declare such dependencies:

* search_on_category_select (on by default)
* vim_hotkeys
* infinite_scroll

If a user enables a plugin its JavaScript and CSS dependencies are
embedded into every page. Sounds simple right?

Ironically in the Simple theme things start to get complicated:
The scripts were originally written for the Oscar theme and thus depend
on jQuery (which isn't loaded in the Simple theme) and look for certain
element identifiers (which aren't present in the Simple theme).  So how
did the plugins actually work with the simple theme?

The simple theme just didn't embed the plugin dependencies (which wasn't
even documented anywhere). Instead the simple theme checked if the paths
contained a certain script path, then set an attribute, which 00_init.js
detected and turned into a boolean, which was then used to enable
vanilla-JS reimplementations of the plugins.

This commit ends this horrible hack (and fixes #769).  The necessary
changes to the Simple theme are introduced in the next commit.
2022-01-18 19:03:15 +01:00
..
filters [simple theme] rework select; add safesearch to search and replace / with › in article url 2021-11-21 21:38:00 +01:00
messages [fix] templates: remove unneeded escape \' of single quotation mark 2021-11-24 17:40:03 +01:00
result_templates [fix] lazy loading of <img> tags 2021-12-15 10:39:55 +01:00
404.html Drop Python 2 (2/n): templates 2020-09-10 10:39:04 +02:00
about.html [enh] add simple theme (WIP) 2017-08-06 16:04:21 +02:00
base.html [fix] plugin JS/CSS dependencies depend on themes 2022-01-18 19:03:15 +01:00
categories.html [enh] introduce categories_as_tabs 2022-01-03 07:01:49 +01:00
icons.html [fix] delete trailing whitespace 2021-11-13 15:40:00 +01:00
index.html [simple theme] update to ion icons 5 and drop webfont 2021-11-13 10:42:07 +01:00
infobox.html [fix] simple-theme templates: polish HTML <img> elements 2021-11-25 12:07:57 +01:00
macros.html [fix] lazy loading of <img> tags 2021-12-15 10:39:55 +01:00
preferences.html [fix] simple theme: description of HTTP method 2022-01-14 10:07:09 +01:00
results.html [fix] query_in_title: add missing space in title 2021-11-29 11:08:21 +01:00
search.html [simple theme] rework select; add safesearch to search and replace / with › in article url 2021-11-21 21:38:00 +01:00
simple.spec.txt [enh] add simple theme (WIP) 2017-08-06 16:04:21 +02:00
simple_search.html [simple theme] rework select; add safesearch to search and replace / with › in article url 2021-11-21 21:38:00 +01:00
stats.html [simple theme] update to ion icons 5 and drop webfont 2021-11-13 10:42:07 +01:00