Skip to content

Latest commit

 

History

History
240 lines (140 loc) · 8.89 KB

google-chrome.md

File metadata and controls

240 lines (140 loc) · 8.89 KB

Google Chrome

Official SiteiTunes Link

Table of Contents

  1. URL Scheme
  2. Launch Center Pro Actions
    1. Clipboard Actions
    2. Prompt Actions
  3. Drafts Actions
    1. URL Actions
  4. Mr. Reader Services
    1. Browser Services
  5. Bookmarklets
    1. Generic
    2. Dolphin
    3. iCab Mobile
    4. Mercury
  6. Suggested Improvements for Developer

URL Scheme

HTTP

googlechrome://
    URL Without Protocol
    
Example:
	googlechrome://www.google.com

HTTPS

googlechromes://
    URL Without Protocol
    
Example:
	googlechromes://www.google.com

x-callback-url:

googlechrome-x-callback://
    x-callback-url/
        open/?
            url=
            &x-source=
            &x-success=
            &create-new-tab

Example:
    googlechrome-x-callback://x-callback-url/open/?x-source=Dolphin&x-success=dolphin://&url=http://www.google.com&create-new-tab

Documentation: Official: Opening links in Chrome for iOShandleOpenURLakosma wiki

Table of Contents ↩


Launch Center Pro Actions

There are two variants to these actions, one variant — using the googlechrome:// URL scheme — will only work when you do not include the http:// or https:// protocol while the other variant — using the googlechrome-x-callback URL scheme — will only work when you do include the protocol.

Unfortunately, the problem with the googlechrome-x-callback URL scheme is that Launch Center Pro isn't able to find the Chrome icon to attach to actions that use it.

I find that the vast majority of the time if I copy a URL to my clipboard it has the protocol attached so I therefore use the googlechrome-x-callback variant. However, when I'm typing in a URL via the prompt action I prefer not to have to type the extra seven or eight extra characters in and use the googlechrome:// variant.

Clipboard Actions

Open [clipboard] in Chrome (with protocol)

googlechrome-x-callback://x-callback-url/open/?url=[[clipboard]]

You must have a valid URL in the clipboard that includes http:// or http://. http://www.google.com

Open [clipboard] in Chrome (without protocol) (Official)

googlechrome://[[clipboard]]

You must not include http:// or https:// in the URL. www.google.com

Prompt Actions

Open [prompt] in Chrome (with protocol)

googlechrome-x-callback://x-callback-url/open/?url=[prompt-URL]

You must have a valid URL in the clipboard that includes http:// or http://. http://www.google.com

Open [prompt] in Chrome (without protocol) (Official)

googlechrome://[prompt-URL]

You must not include http:// or https:// in the URL. www.google.com

Table of Contents ↩


Drafts Actions

URL Actions

Open Link (with protocol) in Chrome

Name: Open Link in Chrome
URL:

    googlechrome-x-callback://x-callback-url/open/?url=[[title]]

This action will send Drafts whatever is on the first line of your draft.

You must include http:// or https:// in the URL. http://www.google.com

To install the action copy and paste the following URL into your iOS browser's location bar and hit enter • Help

drafts://x-callback-url/import_action?type=URL&name=Open%20Link%20in%20Chrome&url=googlechrome-x-callback%3A%2F%2Fx-callback-url%2Fopen%2F%3Furl%3D%5B%5Btitle%5D%5D

Open Link (without protocol) in Chrome

Name: Open Link (without protocol) in Chrome
URL:

    googlechrome://[[title]]

This action will send Drafts whatever is on the first line of your draft.

You must not include http:// or https:// in the URL. www.google.com

To install the action copy and paste the following URL into your iOS browser's location bar and hit enter • Help

drafts://x-callback-url/import_action?type=URL&name=Open%20Link%20%28without%20protocol%29%20in%20Chrome&url=googlechrome%3A%2F%2F%5B%5Btitle%5D%5D

Open Link (with protocol) in Chrome & Return to Drafts

Name: Open Link in Chrome & Return to Drafts
URL:

    googlechrome-x-callback://x-callback-url/open/?url=[[title]]&x-source=Drafts&x-success=drafts://

This action will send Chrome whatever is on the first line of your draft. When you're finished in Chrome you can use the Drafts button to return to Drafts.

You must include http:// or https:// in the URL. http://www.google.com

Because this action requires Chrome's x-callback-url scheme it is only available in this variant.

To install the action copy and paste the following URL into your iOS browser's location bar and hit enter • Help

drafts://x-callback-url/import_action?type=URL&name=Open%20Link%20in%20Chrome%20%26%20Return%20to%20Drafts&url=googlechrome-x-callback%3A%2F%2Fx-callback-url%2Fopen%2F%3Furl%3D%5B%5Btitle%5D%5D%26x-source%3DDrafts%26x-success%3Ddrafts%3A%2F%2F

Table of Contents ↩


Mr. Reader Services

Browser Services

Google Chrome (Official)

App Name: Google Chrome
Protocol: googlechrome:
HTTP URL Scheme:

    googlechrome://[URL-WITHOUT-PROTOCOL]

HTTPS URL Scheme:

    googlechromes://[URL-WITHOUT-PROTOCOL]

Note: This service is built into Mr. Reader. I've included it here for completeness and as an example.

Download ServiceHelp

Open in Google Chrome & Return to Mr. Reader

App Name: Open in Google Chrome & Return to Mr. Reader
Protocol: googlechrome:
HTTP URL Scheme:

    googlechrome-x-callback://x-callback-url/open/?url=[URL]&x-source=Mr.%20Reader&x-success=mrreader://

HTTPS URL Scheme:

    googlechrome-x-callback://x-callback-url/open/?url=[URL]&x-source=Mr.%20Reader&x-success=mrreader://

Download ServiceHelp

Table of Contents ↩


Bookmarklets

Important Note: Bookmarklets that take advantage of your text selection work differently or don't work at all in different browsers. Please see the guide for further details and workarounds.

It's also worth noting that the x-callback-url Bookmarklets are based on Google Chrome URL Schemes documentation, Federico Viticci´s Chrome to Safari bookmarklet & the respective browser bookmarklets included in my other workflows.

Generic

Open in Google Chrome (by Jon Abrams)

javascript:location.href="googlechrome"+location.href.substring(4);

Dolphin

Open in Google Chrome & Return to Dolphin

javascript:if(location.href.substring(4,5)=='s'){var%20link=location.href.substring(5);}else{link=location.href.substring(4);}location.href='googlechrome-x-callback://x-callback-url/open/?url='+encodeURIComponent(location.href)+'&x-source=Dolphin&x-success=dolphin://';

iCab Mobile

Open in Google Chrome & Return to iCab

javascript:location.href='googlechrome-x-callback://x-callback-url/open/?url='+encodeURIComponent(location.href)+'&x-source=iCab%20Mobile&x-success=x-icabmobile://';

Mercury

Open in Google Chrome & Return to Mercury

javascript:location.href='googlechrome-x-callback://x-callback-url/open/?url='+encodeURIComponent(location.href)+'&x-source=Mercury&x-success=merc://'+encodeURIComponent(location.href)

Table of Contents ↩


Suggested Improvements for Google

  1. Adding a search option to the URL scheme would be quite handy. Being able to easily enter a search term in Launch Center Pro and having Google Chrome open with that search would be awesome. Bonus points for letting the scheme specify which search engine.

Table of Contents ↩