Ok so im trying to customize my google domains google waffle. I want my own google sites to appear there and thought id use google appmaker to make a clickable link for every website.
My question is then, can you create an app that opens a website then closes itself? im having trouble with the closing itself part.
I'm not sure if this is exactly what you pretend but if you want to open a link from the app and then close the app, then you can do the following:
var url = "https://google.com";
window.open(url, "_blank");
window.top.close();
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.
I have a blogger website using a template, www.aplitechstore.com.br,
We have added many app links to download on Google Play, but they do not open in the Google Play Store app but on the website.
I want to change that, I want our app and website (in Webview mode) after clicking the link, open it in the Google Play Store app.
As explained here, Google Play provides url protocol
market://details?id=<package_name>
Applying on Blogger :
Place the following javascript code at the bottom and before </body>. This will change Google Play links only on Android.
<script>
if (/(android)/i.test(navigator.userAgent)) {
document.querySelectorAll('a[href]').forEach(function (link) {
link.href = link.href.replace('https://play.google.com/store/apps/','market://');
});
}
</script>
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 have put google add sense code in my html page. But every time this link open in same tab. I want to open in new tab. I have googled for this and found following link.
https://support.google.com/adsense/answer/1354740?hl=en.
They are saying that they are not allow to open in new tab.But I have seen some sites like flipkart, amazon, w3school site in these site google add sence open in new tab. So the my question is there any way any one know please let us known.
add attrubute target "_blank" to your tag
some text
I have the following javascript bookmarklet which opens a new popup window with a facebook post page in side of it.
javascript:var d=document,f='http://www.facebook.com/share',l=d.location,e=encodeURIComponent,p='.php?src=bm&v=4&i=1261526047&u='+e(l.href)+'&t='+e(d.title);1;try{if (!/^(.*\.)?facebook\.[^.]*$/.test(l.host))throw(0);share_internal_bookmarklet(p)}catch(z) {a=function() {if (!window.open(f+'r'+p,'sharer','toolbar=0,status=0,resizable=1,width=626,height=436'))l.href=f+p};if (/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}}void(0)
I just add that code into the URL of a shortcut link in my browser and it opens the facebook post page and passes the URL and some info about the page I am on to it.
I need to do a much simpler task. I need to get the URL of the page I am on and either open a new tab or even just use the tab I am in and then open a link like this
http://mydomain.com/labs/iframe_header.php?url= PUT THE CURRENT PAGES URL RIGHT HERE
As you can see I just need to make a bookmarklet that will take the page I am on and pass it into my sites page. Can anyone help me, I don't know much javascript at all, would greatly appreciate any help.
javascript: location.href = 'http://mydomain.com/labs/iframe_header.php?url=' + escape(location.href);
This will open in a new window, which will use a new tab if your browser is set up that way:
javascript: window.open('http://mydomain.com/labs/iframe_header.php?url=' + escape(location.href));