mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[oscar] fix indentation of plugin JS
This change was split off into a separate commit so that the previous commit had a clean diff.
This commit is contained in:
parent
132917ff42
commit
213ce85252
3 changed files with 452 additions and 452 deletions
|
@ -1,10 +1,10 @@
|
||||||
if (searxng.plugins['searx.plugins.infinite_scroll']) {
|
if (searxng.plugins['searx.plugins.infinite_scroll']) {
|
||||||
function hasScrollbar() {
|
function hasScrollbar() {
|
||||||
var root = document.compatMode=='BackCompat'? document.body : document.documentElement;
|
var root = document.compatMode=='BackCompat'? document.body : document.documentElement;
|
||||||
return root.scrollHeight>root.clientHeight;
|
return root.scrollHeight>root.clientHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadNextPage() {
|
function loadNextPage() {
|
||||||
var formData = $('#pagination form:last').serialize();
|
var formData = $('#pagination form:last').serialize();
|
||||||
if (formData) {
|
if (formData) {
|
||||||
$('#pagination').html('<div class="loading-spinner"></div>');
|
$('#pagination').html('<div class="loading-spinner"></div>');
|
||||||
|
@ -25,9 +25,9 @@ function loadNextPage() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var win = $(window);
|
var win = $(window);
|
||||||
if(!hasScrollbar()) {
|
if(!hasScrollbar()) {
|
||||||
loadNextPage();
|
loadNextPage();
|
||||||
|
@ -38,15 +38,15 @@ $(document).ready(function() {
|
||||||
loadNextPage();
|
loadNextPage();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const style = document.createElement('style');
|
const style = document.createElement('style');
|
||||||
style.textContent = `
|
style.textContent = `
|
||||||
@keyframes rotate-forever {
|
@keyframes rotate-forever {
|
||||||
0% { transform: rotate(0deg) }
|
0% { transform: rotate(0deg) }
|
||||||
100% { transform: rotate(360deg) }
|
100% { transform: rotate(360deg) }
|
||||||
}
|
}
|
||||||
.loading-spinner {
|
.loading-spinner {
|
||||||
animation-duration: 0.75s;
|
animation-duration: 0.75s;
|
||||||
animation-iteration-count: infinite;
|
animation-iteration-count: infinite;
|
||||||
animation-name: rotate-forever;
|
animation-name: rotate-forever;
|
||||||
|
@ -57,10 +57,10 @@ style.textContent = `
|
||||||
border-right-color: transparent;
|
border-right-color: transparent;
|
||||||
border-radius: 50% !important;
|
border-radius: 50% !important;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
#pagination button {
|
#pagination button {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
document.head.append(style);
|
document.head.append(style);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
if (searxng.plugins['searx.plugins.search_on_category_select']) {
|
if (searxng.plugins['searx.plugins.search_on_category_select']) {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if($('#q').length) {
|
if($('#q').length) {
|
||||||
$('#categories label').click(function(e) {
|
$('#categories label').click(function(e) {
|
||||||
$('#categories input[type="checkbox"]').each(function(i, checkbox) {
|
$('#categories input[type="checkbox"]').each(function(i, checkbox) {
|
||||||
|
@ -31,14 +31,14 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function getHttpRequest() {
|
function getHttpRequest() {
|
||||||
httpRequest = "POST";
|
httpRequest = "POST";
|
||||||
urlParams = new URLSearchParams(window.location.search);
|
urlParams = new URLSearchParams(window.location.search);
|
||||||
if (urlParams.has('method')) {
|
if (urlParams.has('method')) {
|
||||||
httpRequest = urlParams.get('method');
|
httpRequest = urlParams.get('method');
|
||||||
}
|
}
|
||||||
return httpRequest;
|
return httpRequest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
if (searxng.plugins['searx.plugins.vim_hotkeys']) {
|
if (searxng.plugins['searx.plugins.vim_hotkeys']) {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
highlightResult('top')();
|
highlightResult('top')();
|
||||||
|
|
||||||
$('.result').on('click', function() {
|
$('.result').on('click', function() {
|
||||||
|
@ -343,11 +343,11 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$('body').append(html);
|
$('body').append(html);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const style = document.createElement('style');
|
const style = document.createElement('style');
|
||||||
style.textContent = `
|
style.textContent = `
|
||||||
.vim-hotkeys-help {
|
.vim-hotkeys-help {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
@ -356,23 +356,23 @@ style.textContent = `
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
max-height: 80%;
|
max-height: 80%;
|
||||||
box-shadow: 0 0 1em;
|
box-shadow: 0 0 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dflex {
|
.dflex {
|
||||||
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
|
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
|
||||||
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
|
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
|
||||||
display: -ms-flexbox; /* TWEENER - IE 10 */
|
display: -ms-flexbox; /* TWEENER - IE 10 */
|
||||||
display: -webkit-flex; /* NEW - Chrome */
|
display: -webkit-flex; /* NEW - Chrome */
|
||||||
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
|
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
|
||||||
}
|
}
|
||||||
|
|
||||||
.iflex {
|
.iflex {
|
||||||
-webkit-box-flex: 1; /* OLD - iOS 6-, Safari 3.1-6 */
|
-webkit-box-flex: 1; /* OLD - iOS 6-, Safari 3.1-6 */
|
||||||
-moz-box-flex: 1; /* OLD - Firefox 19- */
|
-moz-box-flex: 1; /* OLD - Firefox 19- */
|
||||||
-webkit-flex: 1; /* Chrome */
|
-webkit-flex: 1; /* Chrome */
|
||||||
-ms-flex: 1; /* IE 10 */
|
-ms-flex: 1; /* IE 10 */
|
||||||
flex: 1; /* NEW, Spec - Opera 12.1, Firefox 20+ */
|
flex: 1; /* NEW, Spec - Opera 12.1, Firefox 20+ */
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
document.head.append(style);
|
document.head.append(style);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue