mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	Merge branch 'master' into about-opensearch
This commit is contained in:
		
						commit
						59739a44db
					
				
					 13 changed files with 25 additions and 19 deletions
				
			
		|  | @ -117,14 +117,10 @@ def response(resp): | ||||||
|             'img_format': img_format, |             'img_format': img_format, | ||||||
|             'template': 'images.html' |             'template': 'images.html' | ||||||
|         } |         } | ||||||
|         try: |         result['author'] = author.encode('utf-8', 'ignore').decode('utf-8') | ||||||
|             result['author'] = author |         result['source'] = source.encode('utf-8', 'ignore').decode('utf-8') | ||||||
|             result['title'] = title |         result['title'] = title.encode('utf-8', 'ignore').decode('utf-8') | ||||||
|             result['content'] = content |         result['content'] = content.encode('utf-8', 'ignore').decode('utf-8') | ||||||
|         except: |  | ||||||
|             result['author'] = '' |  | ||||||
|             result['title'] = '' |  | ||||||
|             result['content'] = '' |  | ||||||
|         results.append(result) |         results.append(result) | ||||||
| 
 | 
 | ||||||
|     return results |     return results | ||||||
|  |  | ||||||
|  | @ -291,7 +291,7 @@ $(document).ready(function(){ | ||||||
|                     } |                     } | ||||||
|                 }) |                 }) | ||||||
|                 .fail(function() { |                 .fail(function() { | ||||||
|                     $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">could not load data!</p>"); |                     $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">"+could_not_load+"</p>"); | ||||||
|                 }); |                 }); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
							
								
								
									
										4
									
								
								searx/static/themes/oscar/js/searx.min.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								searx/static/themes/oscar/js/searx.min.js
									
										
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -90,7 +90,7 @@ $(document).ready(function(){ | ||||||
|                     } |                     } | ||||||
|                 }) |                 }) | ||||||
|                 .fail(function() { |                 .fail(function() { | ||||||
|                     $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">could not load data!</p>"); |                     $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">"+could_not_load+"</p>"); | ||||||
|                 }); |                 }); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| /*! simple/searx.min.js | 06-08-2019 | https://github.com/asciimoo/searx */ | /*! simple/searx.min.js | 15-06-2020 |  */ | ||||||
| 
 | 
 | ||||||
| (function(t,e){"use strict";var a=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searx={touch:"ontouchstart"in t||t.DocumentTouch&&document instanceof DocumentTouch||false,method:a.getAttribute("data-method"),autocompleter:a.getAttribute("data-autocompleter")==="true",search_on_category_select:a.getAttribute("data-search-on-category-select")==="true",infinite_scroll:a.getAttribute("data-infinite-scroll")==="true",static_path:a.getAttribute("data-static-path"),no_item_found:a.getAttribute("data-no-item-found")};e.getElementsByTagName("html")[0].className=t.searx.touch?"js touch":"js"})(window,document); | (function(t,e){"use strict";var a=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searx={touch:"ontouchstart"in t||t.DocumentTouch&&document instanceof DocumentTouch||false,method:a.getAttribute("data-method"),autocompleter:a.getAttribute("data-autocompleter")==="true",search_on_category_select:a.getAttribute("data-search-on-category-select")==="true",infinite_scroll:a.getAttribute("data-infinite-scroll")==="true",static_path:a.getAttribute("data-static-path"),no_item_found:a.getAttribute("data-no-item-found")};e.getElementsByTagName("html")[0].className=t.searx.touch?"js touch":"js"})(window,document); | ||||||
| //# sourceMappingURL=searx.head.min.js.map
 | //# sourceMappingURL=searx.head.min.js.map
 | ||||||
|  | @ -1314,7 +1314,7 @@ module.exports = AutoComplete; | ||||||
|           }) |           }) | ||||||
|           .catch(function() { |           .catch(function() { | ||||||
|             result_table_loadicon.classList.remove('invisible'); |             result_table_loadicon.classList.remove('invisible'); | ||||||
|             result_table_loadicon.innerHTML = "could not load data!"; |             result_table_loadicon.innerHTML = could_not_load; | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|  |  | ||||||
							
								
								
									
										4
									
								
								searx/static/themes/simple/js/searx.min.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								searx/static/themes/simple/js/searx.min.js
									
										
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -97,7 +97,7 @@ | ||||||
|           }) |           }) | ||||||
|           .catch(function() { |           .catch(function() { | ||||||
|             result_table_loadicon.classList.remove('invisible'); |             result_table_loadicon.classList.remove('invisible'); | ||||||
|             result_table_loadicon.innerHTML = "could not load data!"; |             result_table_loadicon.innerHTML = could_not_load; | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								searx/templates/__common__/translations.js.tpl
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								searx/templates/__common__/translations.js.tpl
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | ||||||
|  | var could_not_load = '{{ _('could not load data') }}!'; | ||||||
|  | @ -10,7 +10,7 @@ | ||||||
|     <meta name="referrer" content="no-referrer"> |     <meta name="referrer" content="no-referrer"> | ||||||
|     <meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=1.0, user-scalable=1" /> |     <meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=1.0, user-scalable=1" /> | ||||||
|     {% block meta %}{% endblock %} |     {% block meta %}{% endblock %} | ||||||
| 
 |     <script src="{{ url_for('js_translations') }}"></script> | ||||||
|     <title>{% block title %}{% endblock %}{{ instance_name }}</title> |     <title>{% block title %}{% endblock %}{{ instance_name }}</title> | ||||||
|     <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" /> |     <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" /> | ||||||
|     {% if preferences.get_value('oscar-style') -%} |     {% if preferences.get_value('oscar-style') -%} | ||||||
|  |  | ||||||
|  | @ -12,6 +12,7 @@ | ||||||
|   <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"> |   <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"> | ||||||
|   <title>{% block title %}{% endblock %}{{ instance_name }}</title> |   <title>{% block title %}{% endblock %}{{ instance_name }}</title> | ||||||
|   {% block meta %}{% endblock %} |   {% block meta %}{% endblock %} | ||||||
|  |   <script src="{{ url_for('js_translations') }}"></script> | ||||||
|   {% if rtl %} |   {% if rtl %} | ||||||
|   <link rel="stylesheet" href="{{ url_for('static', filename='css/searx-rtl.min.css') }}" type="text/css" media="screen" /> |   <link rel="stylesheet" href="{{ url_for('static', filename='css/searx-rtl.min.css') }}" type="text/css" media="screen" /> | ||||||
|   {% else %} |   {% else %} | ||||||
|  |  | ||||||
|  | @ -1021,6 +1021,14 @@ def config(): | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @app.route('/translations.js') | ||||||
|  | def js_translations(): | ||||||
|  |     return render( | ||||||
|  |         'translations.js.tpl', | ||||||
|  |         override_theme='__common__', | ||||||
|  |     ), {'Content-Type': 'text/javascript; charset=UTF-8'} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| @app.errorhandler(404) | @app.errorhandler(404) | ||||||
| def page_not_found(e): | def page_not_found(e): | ||||||
|     return render('404.html'), 404 |     return render('404.html'), 404 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Markus Heiser
						Markus Heiser