From 1dbab0a68ea3557f6a54c4917c59119de8a2672e Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 3 Jun 2017 03:06:28 +0800 Subject: [PATCH] Play YouTube Getting Started Tutorials inside the JavaFX WebView (BETA) --- source/net/filebot/ui/GettingStartedStage.java | 14 +------------- website/getting-started/index.js | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/source/net/filebot/ui/GettingStartedStage.java b/source/net/filebot/ui/GettingStartedStage.java index 49a82c56..cb82e408 100644 --- a/source/net/filebot/ui/GettingStartedStage.java +++ b/source/net/filebot/ui/GettingStartedStage.java @@ -56,7 +56,7 @@ public class GettingStartedStage { private static GettingStartedStage create() { Stage stage = new Stage(); - stage.setResizable(false); + stage.setResizable(true); if (isWindowsApp()) { stage.getIcons().setAll(ResourceManager.getApplicationIconResources().map(URL::toString).map(Image::new).toArray(Image[]::new)); @@ -79,9 +79,6 @@ public class GettingStartedStage { webview.getEngine().load(getEmbeddedHelpURL()); webview.setPrefSize(750, 490); - // intercept target _blank click events and open links in a new browser window - webview.getEngine().setCreatePopupHandler((config) -> onPopup(webview)); - webview.getEngine().getLoadWorker().stateProperty().addListener((v, o, n) -> { if (n == Worker.State.SUCCEEDED) { stage.setTitle(webview.getEngine().getTitle()); @@ -126,13 +123,4 @@ public class GettingStartedStage { } } - protected WebEngine onPopup(WebView webview) { - // get currently select image via Galleria API - Object uri = webview.getEngine().executeScript("$('.galleria').data('galleria').getData().link"); - openURI(uri.toString()); - - // prevent current web view from opening the link - return null; - } - } diff --git a/website/getting-started/index.js b/website/getting-started/index.js index 5f266efe..52a482cc 100644 --- a/website/getting-started/index.js +++ b/website/getting-started/index.js @@ -48,7 +48,7 @@ function getData() { thumb: 'images/node.screenshot.thumb.png' }] - var links = location.hash.length > 0 + var links = false var youtube = !(/zh(.CN)?/i).test(navigator.locale ? navigator.locale : navigator.language) // YouTube is blocked in China (mainland) if (links) {