开发者

How does Twitter for iPhone bookmarklet work?

开发者 https://www.devze.com 2023-01-01 00:47 出处:网络
Twitter client (formerly Tweetie) allows you to define a bookmarklet in Safari that launches the app. I want to know which iPhone API allows you to register the protocol specifier (or whatever it\'s c

Twitter client (formerly Tweetie) allows you to define a bookmarklet in Safari that launches the app. I want to know which iPhone API allows you to register the protocol specifier (or whatever it's called) - in this case "tweetie:" - in order for this bookmarklet to work.

The instructions can be found here and the bookmarklet itself is below.

javascript:window.location='tweetie:'+window.location

Clicking the above bookmark is the same as typing in "twee开发者_JAVA技巧tie:http://google.com" into the address bar. This is obviously supported on the OS/Browser level, much the same as tel: URIs. Am I correct in understanding that developers can add arbitrary URI protocol specifiers as a part of app installation?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号