Javascript/iOS - Open in - javascript

Context: iPad, web-based inbrowser application
I want to display the "Open in..." that allows the user to select from a list of editors (Goodreader, for example).
Preferable, I'd like to do this through Javascript.
Is it possible? How?

In don't think you have access to do that inside Mobile Safari, you can only provide the content as a download. Then Mobile Safari will render it inside the browser and provide the ability for the user to perform the Open in.. action.
Alternatively you could always write a native app wrapping a WebView that provides the ability to show a native Open in... dialog.

Related

How to manipulate cross-browser windows via javascript addon/extension hiding address bar, menu bar, etc?

I am developing a cross-browser MVC web app with a javascript browser extension that uses a background script, is it possible to hide the address bar/navigation, the browser window menus, side bar and other toolbars?
The only thing I really want to keep is the tabs, though I would like to hide the add tab button as well.
This web app will run by itself a browser window, I have already got the extension doing that, so it won't affect other website functionality.
Question: Is this possible, if so, how and what api's should I focus on?
There are two ways to hide a browser's UI:
1) In any environment, you can popup a 'chomeless window' popup, which is discussed here: How do I create a chromeless window?
2) In a mobile environment, primarily Android, you can develop a Progressive Web App which will be able to open the mobile browser without the UI. See: Create a PWA in under 5 min's
Given your use case, it sounds like option 1 is your best bet, but likely it won't satisfy all your requirements.

Preventing iOS mobile browsers from forcing open apps when clicking links?

I have a website which contains links to external websites, for example amazon product links. The links work just fine, but when I test my website on mobile (iOS in this case), I noticed that clicking the links in the mobile browsers would force open the Amazon app rather than just opening a new tab.
The links in my html are as follows:
I want to have these links open in the browser only, not in their respective apps. Is there any way in to prevent this behavior using html / javascript? Thanks!
No, you can't.
The reason is: you should not be able to impose your choice on the user. Maybe the user prefers the app? That's why iOS 9 introduced the app switcher on the top left hand corner if you switch apps.
Also, let's look from the other side of things if you are the app developer: If you go so far as to build an app and allow universal links (or generally deep links), you obviously would like the user to use that feature and rather open the site in the app. But again, you cannot force the user into opening that link in the app. That's a good thing, because it all depends on what the user wants to do and how he wants to do it.
Having the user choose is the best way to handle this from a UX point of view.

Open iOS app from a Safari without "Open in <app>" prompt

I'm trying to open the app from an HTML page. It's working well, but I need the app to open without asking the permission from the user.
Currently, Safari will ask the user that "Open this page in myapp". I don't want this message box.
How I can remove this message from Safari? I'm using an URI scheme to open the app. It looks something like myApp://domain.
You can't avoid the dialog you mentioned while using Custom URL schemes. This is iOS feature.
Instead you can use Universal Links to open your iOS App without additional dialog. You need to have control over iOS App to make this happens.
To simplify Universal Links setup, you can use one of the companies that can setup most of it for you. I am working in Firebase/Google https://firebase.google.com/docs/dynamic-links/ . Other answer mentioned company that will do this for you as well.
Try branch.io? It works with Android and iOS.

Open "small" browser from Outlook

I am going to make an Outlook add-in very soon.
It has the option, that if a user press a button, a browser should be opened, and the user should fill out the required forms on the URL.
Now I don't imagine it is any problem to open a browser from Outlook itself. But I suppose that if you just open a link, then the whole browser will be loaded up, with all tabs, full size and so on.
Is it possible to just open a small browser window, almost like a popup? No tabs or anything. It should just use the users default browser.
I hope you understand my question, and can guide me to a solution :)
To answer you question, take a look at the WebBrowser class. You can put it in a simple windows forms application.
However, unless you have specific requirements to use a specialized browser, I would simply let the system default browser handle any links.
Create and display a custom form. You can use a browser control in that window.

Show window inside any web page

I want to implement a utility for myself that should provide a small console where I can execute random JS in any browser (much like Firebug's console - I don't reinvent the wheel, I just want to do something I need and just have fun doing it).
So the usage use-case would be this:
Click a bookmarklet from any browser.
It shows dialog (much like jQuery dialog or similar) with text area and couple of buttons.
User enter a JS in the text area.
User clicks a button and it gets executed.
User closes the dialog.
I don't know how I can display nice dialog on any web page (Gmail, news, static pages, whatever).
I think it would be possible to create a jQuery dialog (or other library) and show it on the page. But it could lead to a lot of issues as the dialog might conflict with page CSS, JS and so on.
So the question is how to display a custom dialog on any web page from all (major) browsers using JavaScript.
The NOTES: I don't want to have a popup window. IFRAME would be ok but we cannot use it as the web page's DOCTYPE might not support it.
Thanks,
Dmitriy.
http://getfirebug.com/lite.html
Works in IE, Opera, Safari - basically gives you firebug's functionality in any browser.
bookmarklets are pieces of JS code, so you can basically develop any kind of JS program and use it via bookmarklet... just do what you would do normally. check how other bookmarklets work.
regarding the window display - use lightbox-like effect (DIV layered over other content).

Categories

Resources