I have a link like this:
Click me
in the linkHere section, its link that comes from the back-end (in the link the redirector on aliexpress web site).
If you click on this link from mobile browser, a window will open (native), which will prompt you to open the link (in the browser or if the person has an aliexpress application, then he will offer the same).
What is the complexity. There is a timer in a few seconds, if a person has not clicked on the link I wrote above, then you also need to show the native window (by which to open the link: browser or application ali). The hours of google did not help ... Can someone come across this? Thank you!
Related
Chromium-based browser has the apps page at chrome://apps
There are some apps that I have installed into it. Is it able to launch one of them from JavaScript somewhat just like opening file selecting box?
I can open chrome://apps by setting this URL in to a link, but how about a single app?
Copied from: Open Chrome in a new window (Chrome app)
Sadly, there's no way to do that I know of.
Using window.open in an app's context is a bit of a hack, but results in the URL being open in the user's default browser (not necessarily Chrome). There's no control as to how the browser chooses to open it.
There's a Chrome App-specific API that was created specifically with "open a page in Chrome" in mind, chrome.browser. However, it still doesn't provide an option to open in a new window.
The closest you can get is to create your own "browser": an app window with an in it. Then you have full control over the presentation, but it's not integrated with Chrome's profile and may require additional work to implement things like dialogs and browser controls. See the Browser sample app and documentation.
You may need the app id which you can then append to the URL. I am not entirely sure how you would find but if you go to the apps page on chrome, drag the icon of the app to the search bar in the browser, you should get the full link.
For instance, I dragged the Google Slides Icon onto the search bar and it gave me this url chrome-extension://aapocclcgogkmnckokdopfmhonfmgoek/main.html. So, you may give it a shot! Try to open the chrome apps page, then drag the app you want to open in new tab onto the search bar.
Hence, using Javascript:
window.open("chrome-extension://aapocclcgogkmnckokdopfmhonfmgoek/main.html", "_blank");
Opens Google Slides App in a new tab.
Say I want one of my web pages to be able to open a popup window without prompting users.
I know it's reasonable to ask the user to agree. But I noticed that some website can just open a popup without asking the user's permission. I don't have some exact example for now but I think most of the <button>/<a> to trigger a Facebook or Twitter share is like this.
How can some website has to ask while some other website hasn't?
A window.open(url) would generally open a new window/ tab ( depending on what params you pass to it). I'm really not sure when a website asks for a confirmation before opening a popup. A particular example would really help.
i have the user click on the icon. If the user is on a desktop they will get redirected to the webpage lets use facebook as an example. If the user clicks the icon when in mobile they will be directed to the facebook app but if they do not have it they will go to the webpage via there browser.
The mobile view is fine but on the desktop when the link is clicked this keeps popping up(in chrome).if i use a href tag it doesnt pop up. From a user experience perspective this is annoying. Is there a way to fix this.?
javascript code im using to direct them to webpage via browser or open app if they have it
function goToURL() {
setTimeout(function () { window.location = "https://www.facebook.com/page/"; }, 8000);
window.location = "fb://profile/page";
}
So i managed to get rid of the problem. I just took away the
window.location = "fb://profile/page";
On the same page I have instagram and soundcloud. For these two i just put in the url for the page and on mobile they open in the app instead on the mobile web browser. For facebook however it does not have this feature(idk why?) it opens up safari and goes to the mobile facebook website. A work around i found was to use a deep link such as URLgenius and it worked. If anyone has ran into this issue i hope it helps you out.
I'm building a mobile site and the client wants users to be able to click a link on the site that adds a link to the site to the user's home screen on their phone.
Is this possible?
Yes. It is possible. Many browsers allow this functionality.
You need to use the Browser's API to add that link to the user's home screen. Otherwise using the HTML or JS it is not possible.
I hope you're talking the way Chrome adds a hyperlink to the screen, then you need to learn how the browser does so. For that please read the dev documentations. Their is no such option in HTML, you need to learn the OS dev docs and as well as Browser documentation.
Google Chrome:
https://developers.google.com/chrome/mobile/docs/installtohomescreen
I am working on a short application. In which I have followiing things.
move a link something from my page to Bookmark Toolbar of Browser- Done.
After clicking on the bookmark link pop should open. (user can be at any other website). he will click on the bookmark link and then pop up should open -- NOT DONE
that pop should fetch the title,meta,description of parent window (users current opened website).--DONE
Obviously My question is about 2 Point. I cant figure out how to make this bookmark link to an absolute css/javascript so that it can open on any website.
You can add javascript to URLs like so:
Bookmarklet
Note that I have prepended the URL with javascript: to indicate the browser that it should execute the URL as javascript.
So for a pop it would be something like:
Bookmarklet
Here is a jsFiddle with the code above for you to test.
For more information about bookmarklets you might like the following article: http://betterexplained.com/articles/how-to-make-a-bookmarklet-for-your-web-application/