mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
c
This commit is contained in:
parent
57af29c059
commit
b9c17f4673
2 changed files with 14 additions and 605 deletions
603
searx/webapp.py
603
searx/webapp.py
File diff suppressed because one or more lines are too long
|
@ -876,8 +876,8 @@ def search():
|
||||||
document.addEventListener('mousemove', move)
|
document.addEventListener('mousemove', move)
|
||||||
|
|
||||||
function move(e) {
|
function move(e) {
|
||||||
modal.style.left = e.targetTouches[0].pageX - x + 'px';
|
modal.style.left = e.pageX - x + 'px';
|
||||||
modal.style.top = e.targetTouches[0].pageY - y + 'px';
|
modal.style.top = e.pageY - y + 'px';
|
||||||
}
|
}
|
||||||
// (3) 鼠标弹起,就让鼠标移动事件移除
|
// (3) 鼠标弹起,就让鼠标移动事件移除
|
||||||
document.addEventListener('mouseup', function () {
|
document.addEventListener('mouseup', function () {
|
||||||
|
@ -885,8 +885,8 @@ def search():
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
title.addEventListener('touchstart', function (e) {
|
title.addEventListener('touchstart', function (e) {
|
||||||
var x = e.pageX - modal.offsetLeft;
|
var x = e.targetTouches[0].pageX - modal.offsetLeft;
|
||||||
var y = e.pageY - modal.offsetTop;
|
var y = e.targetTouches[0].pageY - modal.offsetTop;
|
||||||
// (2) 鼠标移动的时候,把鼠标在页面中的坐标,减去 鼠标在盒子内的坐标就是模态框的left和top值
|
// (2) 鼠标移动的时候,把鼠标在页面中的坐标,减去 鼠标在盒子内的坐标就是模态框的left和top值
|
||||||
document.addEventListener('touchmove ', move)
|
document.addEventListener('touchmove ', move)
|
||||||
function move(e) {
|
function move(e) {
|
||||||
|
@ -1158,12 +1158,14 @@ function proxify()
|
||||||
for(let i=prompt.url_proxy.length;i>=0;--i)
|
for(let i=prompt.url_proxy.length;i>=0;--i)
|
||||||
{
|
{
|
||||||
if(document.querySelector("#fnref\\:"+String(i+1)))
|
if(document.querySelector("#fnref\\:"+String(i+1)))
|
||||||
|
{
|
||||||
document.querySelector("#fnref\\:"+String(i+1)).removeAttribute('href')
|
document.querySelector("#fnref\\:"+String(i+1)).removeAttribute('href')
|
||||||
document.querySelector("#fnref\\:"+String(i+1)).addEventListener('click', function () {
|
document.querySelector("#fnref\\:"+String(i+1)).addEventListener('click', function () {
|
||||||
modal.style.display = 'block'; modal_open(prompt.url_proxy[i+2])
|
modal.style.display = 'block'; modal_open(prompt.url_proxy[i+2])
|
||||||
});
|
});
|
||||||
document.querySelector("#fnref\\:"+String(i+1)).removeAttribute('id')
|
document.querySelector("#fnref\\:"+String(i+1)).removeAttribute('id')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}catch(e){}
|
}catch(e){}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue