I have been trying to open a hidden default browser from delphi but coulnd't.
I tried
ShellExecute(self.WindowHandle,'open','www.google.com',nil,nil, SW_HIDE);
and I get my chrome browser open but not hidden, and it opens a tab not a new window, also tried with TStartupInfo with the same results. Is there another way to achieve this?
Related
I have a PWA saved on the home screen, this opens up standardly without search bar nor the bottom buttons (share, tabs, etc..).
So every link gets opened inside the PWA, and that is expected.
I have a problem when showing pdfs as they normally open in Safari with the "share" button and all the bottom bar, but in the PWA they open up without bottom bar and without any share button.
So my idea is to open the PDF link (http://www.mywebsite.com/download/pdf/12345) in a new safari window,.
I tried putting target="_blank" on the PDF link but this did not solve the problem.
I also tried forcing the iOS behavior by opening the app in safari with safari://http://www.mywebsite.com/download/pdf/12345 but with no luck.
How do I open a New Safari window to a link?
OK, the ONLY working solution is to tell iOS you are going onto another domain.
PWA stays in your app frame ONLY if you stay in the same domain.
To open a link within your domain in an EXTERNAL window (or inside the PWA but with Safari standard controls) you have to send it to an external/different domain.
So the PWA is on https://www.mywebsite.com/ and you want to open a PDF with all Safari control buttons, you just create a SUB domain and point the link to it, like https://media.mywebsite.com/download/pdf/12345 at this point the PWA thinks you are on a different domain and does the correct rendering! đ
You can try to use window.open(url).
But, remember to put it in an element with onclick event attribute.
For example,
<button class='btn' onclick='window.open("https://www.google.com", "_blank");'>Open Google search</button>
Reference: window.open(url, '_blank'); not working on iMac/Safari
EDIT
You can set a scope in manifest.json to customize where to open an external link.
You can refer https://developers.google.com/web/fundamentals/web-app-manifest on the property scope.
I'm working on a Browser extension/add-on. We have it working in Chrome, so I'm trying to get it working in Firefox.
I've only gotten my extension to load in Firefox Developer Edition 49.0a2 (2016-07-25) (I'm not sure why it doesn't work normally, but have asked elsewhere).
My add-on uses a browser_action to add a button to the toolbar and open a pop-up, which opens fine, but once it's open, it seems impossible to close without quitting Firefox entirely.
In fact, it's so pernicious, the pop-up then appears over other applications!
Is this just a current bug in Firefox, or is there a way for me to fix this?
You might have accidentally clicked the "only close the popup on ESC" button in the firefox debugger, which keeps a popup open until you press Escape. Source: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Debugging#Debugging_popups
IF your browser extension popups (and right-click context menus, bookmark menu etc.) persist and refuse to go away unless you press Esc AND you have the âBrowser Toolboxâ window openâthen you have probably left the âDisable Popup Auto-Hideâ option enabled. (This setting is only in effect when the Browser Toolbox window is open.)
To disable this setting, go to the Browser Toolbox window (the window title is âDeveloper Tools â Debuggingâ), then, in the upper right-hand corner, press open the three-dots menu, and uncheck âDisable Popup Auto-Hideâ. (If checked you get sticky popups/context menus. If unchecked the popup/context menu will close if you click outside it).
Browser Toolbox
NOTE: If your browser menu does not have a âMore tools > Browser Toolboxâ option, then the Browser Toolbox is disabled, and cannot be causing the sticky popup behavior.
The Browser Toolbox window can be opened through the browser main menu (the little hamburger icon, rightmost in the URL bar of the browser) âMore tools > Browser Toolboxâ (or Ctrl-Shift-Alt-I).
The Browser Toolbox is disabled by default, so, for the above paragraph to work must first be enabled. To do this click on main menu icon, then âMore Tools > Web Developer Toolsâ (Ctrl-Shift-I), then, in the Developer Tools frame (or window) click the three dots menu icon (top right) and select âSettingsâ.
In the settings, scroll down to the bottom right (under the âAdvanced settingsâ) and check the last two options:
[âď¸] Enable browser chrome and add-on debugging toolboxes
[âď¸] Enable remote debugging
Your browser menu should now contain the âMore tools > Browser Toolboxâ option. (From the MDN Web Docs âEnabling the Browser Toolboxâ.)
This answer (just like #Lakinatorâs answer) is based off of information found on Mozilla's official site.
Im working on a project where I need to stream a television Channel and at the same time increment some variables by pressing keys.
With the webbrowser I cant press those keys because the project is focusing the browser and not the form and I dunno how to disable it.
I would also like to know how to disable the scrollbars on TwebBrowser, i've tried many codes but none worked.
I wonder if it is possible in dart to open a popup window and then control it from the opener context.
What I would like is to open a popup window, and then control it's content and event from the script that opened it.
The propblem is that window.open only returns a WindowBase, that can only close the popup, nothing more.
So, is it doable ?
I can't test right now but this should work:
var w = window.open(...);
w.document.body.innerHtml = 'from parent';
This of course won't work if the opened site is not in the same origin.
If it's a site you control, you could pass in a parameter in the URL that you can then read and act on.
A div with a high z-index and the right positioning and styling could function as a popup window easy to manipulate.
I am using Jquery Window plugin v5.03 for my web application. I have to open the multiple windows on screen. But when I call the function to create a window they all open up in the center of the screen and overlap on one another such that previously opened screens are not visible.
I want the windows to open in such a way that at least the title bar and the cross icon is visible on top of the previously opened window. So that the user can know that another window is opened and previous windows are cascaded at the back and are slightly visible.
Please help.