Browse Source

add timeout for search button on startpage, remove unused licenses in about

update readme
master
R4SAS 6 years ago
parent
commit
4a34808d27
  1. 13
      README.md
  2. 7
      app/src/main/java/org/purplei2p/lightning/constant/StartPage.java
  3. 1
      app/src/main/res/values-ru/strings.xml
  4. 1
      app/src/main/res/values/strings.xml
  5. 22
      app/src/main/res/xml/preference_about.xml

13
README.md

@ -1,12 +1,18 @@ @@ -1,12 +1,18 @@
# Lightning Browser I2P
#### Speed, Simplicity, Security
![](ic_launcher_small.png)
#### About fork
That fork of Lightning Browser aims on native support of I2P without ability go clearnet sites (if not used outproxy).
#### Features
* Bookmarks
* History
@ -17,10 +23,9 @@ That fork of Lightning Browser aims on native support of I2P without ability go @@ -17,10 +23,9 @@ That fork of Lightning Browser aims on native support of I2P without ability go
* Support of Legwork I2P search engine
* Legwork search suggestions
* TODO: I2P-only support
#### Permissions
* ````INTERNET````: For accessing the web
@ -31,11 +36,15 @@ That fork of Lightning Browser aims on native support of I2P without ability go @@ -31,11 +36,15 @@ That fork of Lightning Browser aims on native support of I2P without ability go
* ````ACCESS_NETWORK_STATE````: Required for the WebView to function by some OEM versions of WebKit
#### The Code
* Please contribute code back if you can. The code isn't perfect.
* Please add translations/translation fixes as you see need
#### License
```
Copyright 2014 Anthony Restaino

7
app/src/main/java/org/purplei2p/lightning/constant/StartPage.java

@ -34,7 +34,6 @@ public class StartPage { @@ -34,7 +34,6 @@ public class StartPage {
+ "<title>";
private static final String HEAD_2 = "</title>"
+ "</head>"
+ "<style>body{background:#f5f5f5;text-align:center;margin:0px;}#search_input{height:35px; "
+ "width:100%;outline:none;border:none;font-size: 16px;background-color:transparent;}"
+ "span { display: block; overflow: hidden; padding-left:5px;vertical-align:middle;}"
@ -47,13 +46,15 @@ public class StartPage { @@ -47,13 +46,15 @@ public class StartPage {
+ ".box { vertical-align:middle;position:relative; display: block; margin: 10px;padding-left:10px;padding-right:10px;padding-top:5px;padding-bottom:5px;"
+ " background-color:#fff;box-shadow: 0px 3px rgba( 0, 0, 0, 0.1 );font-family: Arial;color: #444;"
+ "font-size: 12px;-moz-border-radius: 2px;-webkit-border-radius: 2px;"
+ "border-radius: 2px;}</style><body> <div class=\"outer\"><div class=\"middle\"><div class=\"inner\"><img class=\"smaller\" src=\"";
+ "border-radius: 2px;}</style>"
+ "</head><body> <div class=\"outer\"><div class=\"middle\"><div class=\"inner\"><img class=\"smaller\" src=\"";
private static final String MIDDLE = "\" ></br></br><form onsubmit=\"return search()\" class=\"search_bar\" autocomplete=\"off\">"
+ "<input type=\"submit\" id=\"search_submit\" value=\"Search\" ><span><input class=\"search\" type=\"text\" value=\"\" id=\"search_input\" >"
+ "</span></form></br></br></div></div></div><script type=\"text/javascript\">function search(){if(document.getElementById(\"search_input\").value != \"\"){window.location.href = \"";
private static final String END = "\" + document.getElementById(\"search_input\").value;document.getElementById(\"search_input\").value = \"\";}return false;}</script></body></html>";
private static final String END = "\" + document.getElementById(\"search_input\").value;setTimeout(\"unlock()\", 5000);}return false;}"
+ "function unlock(){document.getElementById(\"search_submit\").disabled = false;}</script></body></html>";
@NonNull
public static File getStartPageFile(@NonNull Application application) {

1
app/src/main/res/values-ru/strings.xml

@ -169,7 +169,6 @@ @@ -169,7 +169,6 @@
<string name="loading">Загрузка&#8230;</string>
<string name="loading_failed">Не удалось загрузить страницу.</string>
<string name="snacktory">Snacktory</string>
<string name="jsoup">jsoup: Java HTML Parser</string>
<string name="mit_license">MIT License</string>
<string name="url_contents">Содержимое поля URL</string>
<string name="text_encoding">Кодировка текста</string>

1
app/src/main/res/values/strings.xml

@ -169,7 +169,6 @@ @@ -169,7 +169,6 @@
<string name="loading">Loading&#8230;</string>
<string name="loading_failed">Couldn\'t load anything from the page.</string>
<string name="snacktory">Snacktory</string>
<string name="jsoup">jsoup: Java HTML Parser</string>
<string name="mit_license">MIT License</string>
<string name="url_contents">URL box contents</string>
<string name="text_encoding">Text encoding</string>

22
app/src/main/res/xml/preference_about.xml

@ -30,6 +30,17 @@ @@ -30,6 +30,17 @@
android:value="SELF" />
</intent>
</Preference>
<Preference
android:summary="@string/mpl_license"
android:title="Lightning Browser">
<intent
android:action="android.intent.action.VIEW"
android:data="http://www.mozilla.org/MPL/2.0/">
<extra
android:name="SOURCE"
android:value="SELF" />
</intent>
</Preference>
<Preference
android:summary="@string/apache"
android:title="@string/android_open_source_project">
@ -63,16 +74,5 @@ @@ -63,16 +74,5 @@
android:value="SELF" />
</intent>
</Preference>
<Preference
android:summary="@string/mit_license"
android:title="@string/jsoup">
<intent
android:action="android.intent.action.VIEW"
android:data="http://jsoup.org/license">
<extra
android:name="SOURCE"
android:value="SELF" />
</intent>
</Preference>
</PreferenceCategory>
</PreferenceScreen>
Loading…
Cancel
Save