Compare commits

...

11 Commits

Author SHA1 Message Date
idk
3725be1d5b update index.html 2022-09-04 21:24:26 -04:00
idk
5d1afd8dd4 bump 2022-09-04 21:19:35 -04:00
idk
6234ffdff1 fix missing semicolon 2022-09-04 21:13:40 -04:00
idk
8802f9448f update I2PFirefoxProfileBuilder.html 2022-09-04 11:02:30 -04:00
idk
31d654ef4f update I2PFirefox.html 2022-09-04 11:02:23 -04:00
idk
04894a0977 update I2PCommonBrowser.html 2022-09-04 11:02:17 -04:00
idk
a2733d8ffb update I2PChromium.html 2022-09-04 11:01:52 -04:00
idk
100fe7fd95 update index.html 2022-09-04 11:01:25 -04:00
idk
91964508d8 bump for release 2022-09-04 11:00:32 -04:00
idk
9d347bdfa2 first run just unpacks the profile and deletes the first-run file now, to prevent launch-and-close of browser on Windows 11 when running from NSIS 2022-09-04 10:59:35 -04:00
idk
93f6e01e53 add in first-run files to profiles 2022-09-04 09:36:15 -04:00
28 changed files with 142 additions and 61 deletions

View File

@ -149,6 +149,8 @@
<p>
Author: idk
<br>
Parent class: I2PCommonBrowser
<br>
package: net.i2p.i2pfirefox
</p>
<h2>
@ -895,7 +897,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L596" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L598" rel="nofollow">
[src]
</a>
</h3>
@ -927,7 +929,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L619" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L623" rel="nofollow">
[src]
</a>
</h3>
@ -957,7 +959,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L628" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L632" rel="nofollow">
[src]
</a>
</h3>
@ -983,7 +985,7 @@
<span></span>
</a>
ValidURL
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L630" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L634" rel="nofollow">
[src]
</a>
</h3>
@ -1016,7 +1018,7 @@
<span></span>
</a>
main
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L640" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L644" rel="nofollow">
[src]
</a>
</h3>
@ -1049,7 +1051,7 @@
<span></span>
</a>
sleep
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L667" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L671" rel="nofollow">
[src]
</a>
</h3>

View File

@ -7,6 +7,7 @@ Description:
> I2PChromium.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Author: idk
Parent class: I2PCommonBrowser
package: net.i2p.i2pfirefox
## Dependencies
@ -276,7 +277,7 @@ This method has no parameters.
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L596)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L598)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory.
+ Access: public
@ -288,7 +289,7 @@ This method has no parameters.
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L619)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L623)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory.
+ Access: public
@ -299,7 +300,7 @@ This method has no parameters.
| privateWindow | boolean | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L628)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L632)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory.
+ Access: public
@ -308,7 +309,7 @@ This method has no parameters.
This method has no parameters.
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L630)
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L634)
+ Description:
+ Access: private
@ -320,7 +321,7 @@ This method has no parameters.
| inUrl | String | |
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L640)
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L644)
+ Description:
+ Access: public
@ -332,7 +333,7 @@ This method has no parameters.
| args | String[] | |
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L667)
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L671)
+ Description:
+ Access: private

View File

@ -493,6 +493,39 @@
<br>
| destinationFile | File | |
</p>
<h3>
<a href="#validateprofilefirstrun-src" rel="nofollow">
<span></span>
</a>
validateProfileFirstRun
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L203" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br>
</li>
<li>
Access: public
<br>
</li>
<li>
Modifiers: static
</li>
<li>
return: boolean
<br>
</li>
</ul>
<p>
| Name | Type | Description |
<br>
| ----- | ----- | ----- |
<br>
| profileDirectory | String | |
</p>
<div id="sourcecode">
<span id="sourcehead">
<strong>

View File

@ -140,3 +140,15 @@ package: net.i2p.i2pfirefox
| destinationFile | File | |
### validateProfileFirstRun [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L203)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| profileDirectory | String | |

View File

@ -149,6 +149,8 @@
<p>
Author: idk
<br>
Parent class: I2PCommonBrowser
<br>
package: net.i2p.i2pfirefox
</p>
<h2>
@ -940,7 +942,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L507" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L509" rel="nofollow">
[src]
</a>
</h3>
@ -972,7 +974,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L529" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L533" rel="nofollow">
[src]
</a>
</h3>
@ -1002,7 +1004,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L539" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L543" rel="nofollow">
[src]
</a>
</h3>
@ -1028,7 +1030,7 @@
<span></span>
</a>
ValidURL
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L541" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L545" rel="nofollow">
[src]
</a>
</h3>
@ -1061,7 +1063,7 @@
<span></span>
</a>
main
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L552" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L556" rel="nofollow">
[src]
</a>
</h3>
@ -1094,7 +1096,7 @@
<span></span>
</a>
sleep
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L580" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L584" rel="nofollow">
[src]
</a>
</h3>

View File

@ -7,6 +7,7 @@ Description:
> I2PFirefox.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Author: idk
Parent class: I2PCommonBrowser
package: net.i2p.i2pfirefox
## Dependencies
@ -292,7 +293,7 @@ This method has no parameters.
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L507)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L509)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory.
+ Access: public
@ -304,7 +305,7 @@ This method has no parameters.
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L529)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L533)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory.
+ Access: public
@ -315,7 +316,7 @@ This method has no parameters.
| privateWindow | boolean | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L539)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L543)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory. Uses a semi-permanent profile.
+ Access: public
@ -324,7 +325,7 @@ This method has no parameters.
This method has no parameters.
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L541)
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L545)
+ Description:
+ Access: private
@ -336,7 +337,7 @@ This method has no parameters.
| inUrl | String | |
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L552)
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L556)
+ Description:
+ Access: public
@ -348,7 +349,7 @@ This method has no parameters.
| args | String[] | |
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L580)
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L584)
+ Description:
+ Access: private

View File

@ -409,7 +409,7 @@
<span></span>
</a>
copyStrictOptions
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L149" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L151" rel="nofollow">
[src]
</a>
</h3>

View File

@ -103,7 +103,7 @@ This method has no parameters.
| base | String | |
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L149)
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L151)
+ Description: Copy the strict options from the base profile to the profile
+ Access: public

View File

@ -311,7 +311,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<delete dir="plugin/eepsite/docroot/torrents/" />
<!-- get version number -->
<buildnumber file="scripts/build.number" />
<property name="release.number" value="0.0.21" />
<property name="release.number" value="0.0.23" />
<!-- make the update xpi2p -->
<!-- this contains everything except i2ptunnel.config -->

View File

@ -2,9 +2,9 @@
GITHUB_USER=eyedeekay
GITHUB_REPO=i2p.plugins.firefox
GITHUB_NAME="That gets it ready for inclusion in another bundle."
GITHUB_NAME="That fixes a missing semicolon"
GITHUB_DESCRIPTION=$(cat CHANGES.md)
GITHUB_TAG=0.0.21
GITHUB_TAG=0.0.23
ant distclean
./javadoc.sh
NUMLINE=`grep release.number build.xml | head -n 1`

Binary file not shown.

View File

@ -0,0 +1,5 @@
This browser profile is entirely composed of the work of Free Software developers.
The licenses for the sub-projects may be found in the extensions directories themselves.
i2p.chromium.usabilty.profile/extensions/i2pchrome.js/
i2p.chromium.usabilty.profile/extensions/noscript.js/

View File

@ -1,6 +0,0 @@
TODO:
Licensing work! This is probably mostly done, but I need to double-check it to make sure
the T&C are the same from all of these extensions are the same as for their Firefox versions
since I did the licensing review already. Since the license is included with the unpacked
extensions, we're almost certainly good.

View File

View File

@ -0,0 +1,7 @@
This browser profile is entirely composed of the work of Free Software developers.
The licenses for the sub-projects may be found in the extensions directories themselves.
i2p.chromium.usabilty.profile/extensions/i2pchrome.js/
i2p.chromium.usabilty.profile/extensions/jshelter.js
i2p.chromium.usabilty.profile/extensions/localcdn.js
i2p.chromium.usabilty.profile/extensions/ublock.js

View File

@ -1,6 +0,0 @@
TODO:
Licensing work! This is probably mostly done, but I need to double-check it to make sure
the T&C are the same from all of these extensions are the same as for their Firefox versions
since I did the licensing review already. Since the license is included with the unpacked
extensions, we're almost certainly good.

Binary file not shown.

View File

View File

@ -60,6 +60,6 @@ user_pref("media.navigator.enabled", false);
user_pref("dom.w3c_touch_events.enabled", false);
user_pref("browser.privatebrowsing.autostart", false);
user_pref("browser.display.use_system_colors", false);
user_pref("dom.image-lazy-loading.enabled", false)
user_pref("dom.image-lazy-loading.enabled", false);
user_pref("extensions.autoDisableScopes", 0);
user_pref("extensions.enabledScopes", 1);

View File

@ -60,6 +60,6 @@ user_pref("media.navigator.enabled", false);
user_pref("dom.w3c_touch_events.enabled", false);
user_pref("browser.privatebrowsing.autostart", false);
user_pref("browser.display.use_system_colors", false);
user_pref("dom.image-lazy-loading.enabled", false)
user_pref("dom.image-lazy-loading.enabled", false);
user_pref("extensions.autoDisableScopes", 0);
user_pref("extensions.enabledScopes", 1);

View File

@ -19,7 +19,7 @@ import java.util.ArrayList;
* @author idk
* @since 0.0.1
*/
public class I2PChromium {
public class I2PChromium extends I2PCommonBrowser {
private final String[] CHROMIUM_SEARCH_PATHS = CHROMIUM_FINDER();
private final int DEFAULT_TIMEOUT = 200;
private Process p = null;
@ -565,6 +565,8 @@ public class I2PChromium {
System.out.println("Rebuilt profile directory: " + profileDirectory);
}
}
if (validateProfileFirstRun(profileDirectory))
return null;
ProcessBuilder pb = null;
if (privateWindow) {
pb = this.privateProcessBuilder(url);
@ -596,6 +598,8 @@ public class I2PChromium {
public void launch(boolean privateWindow, String[] url) {
if (waitForProxy()) {
p = launchAndDetatch(privateWindow, url);
if (p == null)
return;
System.out.println("I2PChromium");
try {
System.out.println("Waiting for I2PChromium to close...");

View File

@ -127,13 +127,14 @@ public class I2PChromiumProfileBuilder extends I2PCommonBrowser {
}
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
try {
System.out.println("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir, "chromium", usabilityMode());
} catch (Exception e) {
System.out.println("Error copying base profile to profile" + e);
return false;
if (!profileDir.exists()) {
try {
System.out.println("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir, "chromium", usabilityMode());
} catch (Exception e) {
System.out.println("Error copying base profile to profile" + e);
return false;
}
}
System.out.println("Copied base profile to profile directory");
return true;

View File

@ -199,4 +199,23 @@ public class I2PCommonBrowser {
}
}
}
public static boolean validateProfileFirstRun(String profileDirectory) {
File profileDir = new File(profileDirectory);
if (!profileDir.exists()) {
System.out.println("Profile directory does not exist");
return false;
}
if (!profileDir.isDirectory()) {
System.out.println("Profile directory is not a directory");
return false;
}
File frf = new File(profileDir, "first-run");
if (frf.exists()) {
frf.delete();
// is a first run
return true;
}
return false;
}
}

View File

@ -19,7 +19,7 @@ import java.util.ArrayList;
* @author idk
* @since 0.0.1
*/
public class I2PFirefox {
public class I2PFirefox extends I2PCommonBrowser {
private final String[] FIREFOX_SEARCH_PATHS = FIREFOX_FINDER();
private final int DEFAULT_TIMEOUT = 200;
private Process p = null;
@ -367,14 +367,14 @@ public class I2PFirefox {
int arglength = 0;
if (args != null)
arglength = args.length;
String[] newArgs = new String[arglength + 3];
String[] newArgs = new String[arglength + 4];
newArgs[0] = firefox;
newArgs[1] = "--profile";
newArgs[2] = I2PFirefoxProfileBuilder.profileDirectory();
if (args != null) {
if (arglength > 0) {
for (int i = 0; i < arglength; i++) {
newArgs[i + 3] = args[i];
newArgs[i + 4] = args[i];
}
}
}
@ -475,6 +475,8 @@ public class I2PFirefox {
System.out.println("Rebuilt profile directory: " + profileDirectory);
}
}
if (validateProfileFirstRun(profileDirectory))
return null;
ProcessBuilder pb;
if (privateWindow) {
pb = privateProcessBuilder(url);
@ -507,6 +509,8 @@ public class I2PFirefox {
public void launch(boolean privateWindow, String[] url) {
if (waitForProxy()) {
p = launchAndDetatch(privateWindow, url);
if (p == null)
return;
try {
System.out.println("Waiting for I2PFirefox to close...");
int exit = p.waitFor();

View File

@ -120,14 +120,16 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
try {
System.out.println("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir, "firefox", base);
} catch (Exception e) {
System.out.println("Error copying base profile to profile" + e);
return false;
if (!profileDir.exists()) {
try {
System.out.println("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir, "firefox", base);
} catch (Exception e) {
System.out.println("Error copying base profile to profile" + e);
return false;
}
System.out.println("Copied base profile to profile directory");
}
System.out.println("Copied base profile to profile directory");
// if user.js does not exist yet, make an empty one.
// if (!touch(profileDir.toString(), "user.js")) {
// return false;