Commit 0f41faf4 authored by Alain Takoudjou's avatar Alain Takoudjou

Mynij Search: fix search in offline mode

parent 5104af10
...@@ -177,18 +177,23 @@ ...@@ -177,18 +177,23 @@
key + "&category_general=on&theme=oscar" key + "&category_general=on&theme=oscar"
}); });
}) })
.push(undefined, function (error) { .push(undefined, function () {
return gadget.state.result_gadget.add_searx_no_result( return undefined;
"An error occured, please try again. " + error.message || ''
);
}) })
.push(function (resultHTML) { .push(function (resultHTML) {
var i, var i,
promise_list = [], promise_list = [],
elements, elements,
doc = new DOMParser().parseFromString( doc;
resultHTML.currentTarget.response,
"text/html"); if (!resultHTML) {
return gadget.state.result_gadget.add_searx_no_result(
"An error occured while getting result, please try again!"
);
}
doc = new DOMParser().parseFromString(
resultHTML.currentTarget.response,
"text/html");
elements = doc.body.querySelectorAll('div.result.result-default'); elements = doc.body.querySelectorAll('div.result.result-default');
if (elements.length === 0) if (elements.length === 0)
return gadget.state.result_gadget.add_searx_no_result( return gadget.state.result_gadget.add_searx_no_result(
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>987.26215.20691.32768</string> </value> <value> <string>987.27157.35558.36266</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1603124167.5</float> <float>1603180719.78</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -483,15 +483,10 @@ input[type="button"]:hover{ ...@@ -483,15 +483,10 @@ input[type="button"]:hover{
} }
} }
@media (max-width: 600px) { @media (max-width: 600px) {
/*.tabs ul li label span { .tabs {
display: none; padding: 20px 0;
padding-bottom: 80px;
} }
.tabs .slider {
display: none;
}
.tabs .slider-border {
display: none;
}*/
.tabs .content { .tabs .content {
margin-top: 20px; margin-top: 20px;
} }
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>987.26223.8725.60620</string> </value> <value> <string>987.26225.49315.5085</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1603124265.14</float> <float>1603181219.77</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment