* update donation redirect script & provider per-OS donation messages
* compression is handled by cloudflare
This commit is contained in:
parent
16f8b35aa5
commit
863ed6571d
|
@ -393,7 +393,7 @@ public class Main {
|
|||
pane.createDialog(null, "Please Donate").setVisible(true);
|
||||
if (pane.getValue() == actions[0]) {
|
||||
try {
|
||||
Desktop.getDesktop().browse(getApplicationLink("donate.url"));
|
||||
Desktop.getDesktop().browse(new URI(getDonateURL()));
|
||||
} catch (Exception e) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "Failed to browse URI", e);
|
||||
} finally {
|
||||
|
|
|
@ -80,7 +80,7 @@ public final class Settings {
|
|||
}
|
||||
|
||||
public static String getApplicationDeployment() {
|
||||
return System.getProperty("application.deployment");
|
||||
return System.getProperty("application.deployment", "jar");
|
||||
}
|
||||
|
||||
public static boolean isAppStore() {
|
||||
|
@ -206,7 +206,11 @@ public final class Settings {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static String getEmbeddedHelpURI() {
|
||||
public static String getDonateURL() {
|
||||
return getApplicationProperty("donate.url") + "?package=" + getApplicationDeployment();
|
||||
}
|
||||
|
||||
public static String getEmbeddedHelpURL() {
|
||||
// add #hash so we can dynamically adjust the slides for the various platforms via JavaScript
|
||||
return getApplicationProperty("link.app.help") + '#' + getApplicationDeployment();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ application.revision: @{svn.revision}
|
|||
|
||||
# application updates
|
||||
update.url: https://app.filebot.net/update.xml
|
||||
donate.url: https://www.filebot.net/donate.html
|
||||
donate.url: https://app.filebot.net/donate.php
|
||||
|
||||
# base URL for resolving script resources
|
||||
script.fn: https://raw.githubusercontent.com/filebot/scripts/m1/%s.groovy
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 6.0 KiB |
|
@ -55,7 +55,7 @@ public class GettingStartedStage {
|
|||
this.stage = stage;
|
||||
|
||||
WebView webview = new WebView();
|
||||
webview.getEngine().load(Settings.getEmbeddedHelpURI());
|
||||
webview.getEngine().load(Settings.getEmbeddedHelpURL());
|
||||
webview.setPrefSize(750, 490);
|
||||
|
||||
// intercept target _blank click events and open links in a new browser window
|
||||
|
|
|
@ -9,19 +9,7 @@ RewriteCond %{HTTP_HOST} =filebot.net [NC]
|
|||
RewriteRule ^scripts\/(.*)$ https://github.com/filebot/scripts/blob/devel/$1 [R=301,L]
|
||||
|
||||
RewriteCond %{HTTP_HOST} =filebot.net [NC]
|
||||
RewriteRule ^(.*)$ https://www.filebot.net/$1 [R=301,L]
|
||||
RewriteRule ^(.*)$ http://www.filebot.net/$1 [R=301,L]
|
||||
|
||||
RewriteCond %{HTTP_HOST} =filebot.sourceforge.net [NC]
|
||||
RewriteRule ^(.*)$ https://www.filebot.net/$1 [R=301,L]
|
||||
|
||||
|
||||
# compress text, html, javascript, css, xml
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
AddOutputFilterByType DEFLATE text/html
|
||||
AddOutputFilterByType DEFLATE text/xml
|
||||
AddOutputFilterByType DEFLATE text/css
|
||||
AddOutputFilterByType DEFLATE application/xml
|
||||
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||||
AddOutputFilterByType DEFLATE application/rss+xml
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
RewriteRule ^(.*)$ http://www.filebot.net/$1 [R=301,L]
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
$type = isset($_GET['package']) ? $_GET['package'] : 'undefined';
|
||||
$name = 'undefined';
|
||||
|
||||
// packages: msi, app, deb, jar, portable
|
||||
if ($type == 'msi')
|
||||
$name = 'FileBot for Windows';
|
||||
else if ($type == 'app')
|
||||
$name = 'FileBot for Mac';
|
||||
else if ($type == 'deb')
|
||||
$name = 'FileBot for Debian Linux';
|
||||
else
|
||||
$name = 'FileBot ('.$type.')';
|
||||
|
||||
|
||||
// insert product name and redirect to paypal donation page
|
||||
$url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=Z8JHALZ4TXGWL&lc=AT&item_name='.urlencode($name).'¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted';
|
||||
|
||||
header('HTTP/1.1 302 Found');
|
||||
header('Location: '.$url);
|
||||
?>
|
Loading…
Reference in New Issue