Open URL (simple ver)
- ohajiki://
- i.e. ohajiki://example.com
- oohttp://
- i.e. oohttp://example.com
- oohttps://
- i.e. oohttps://example.com
Open URL
ohajiki://x-callback-url/open/
- url=
- Specify escaped URL. If __CLIPBOARD__ token is specified, URL in the clipboard is used.
- bookmarklet-name=
- Execute bookmarklet which already registered.
- current-tab
- If this option is presented, open URL in the current tab.
- x-source=
- Arbitrary title.
- x-success=
- Execute callback URL.
- x-error=
- Execute URL when error happen.
Search query with default search engine
ohajiki://x-callback-url/search/
- query=
- Specify search query. If __CLIPBOARD__ token is specified, text in the clipboard is used.
- current-tab
- If this option is presented, open URL in the current tab.
- x-source=
- Arbitrary title.
- x-success=
- Execute callback URL.
- x-error=
- Execute URL when error happen.
Open blank page
ohajiki://x-callback-url/blank/
- text=
- Specify text that appear in the body tag. If __CLIPBOARD__ is specified, text in the clipboard is used.
- bookmarklet-name=
- Execute bookmarklet which already registered.
- remain-tab
- If this option is presented, the tab will be closed after the bookmarklet executed.
- x-source=
- Arbitrary title.
- x-success=
- Execute callback URL.
- x-error=
- Execute URL when error happen.
Open Launcher
ohajiki://launcher/
- query=
- Specify search query.
Open QR/ISBN code scanner
ohajiki://code-scanner/
Token
- __CLIPBOARD__
- If __CLIPBOARD__ token is specified in some options, it will be replaced with the text/url in the clipboard.
- __BOOKMARKLET_RESULT__
- If __BOOKMARKLET_RESULT__ token is specified in the x-success, it will be replaced with bookmarklet result. When bookmarklet code wrapped with closure `(function(){})()`, there should be `return` value.
Bookmarklet
- function ohjCopyText('text'); Copy text to iOS clipboard
- function ohjOpenURL('URL', [Open in new tab true/false]); Open URL in a new tab or the current tab. Other app's URL Scheme is also available.
Example: 1
Open URL `http://en.ohajiki.ios-web.com`, a floating button will appear when complete loading, then tap the button, execute a registered bookmarklet named "titleWithURL" and return the result to Drafts4.
Registered bookmarklet, named titleWithURL:
In case wrapped with closure: