iOSç Google Chrome ãPCã¨ã®åæã¨ã便å©ã§ããã©ãããã¯ãã¼ã¯ã¬ããã使ããªããããã¯ã¦ãªããã¯ãã¼ã¯ã¨é£æºãã¦ä½¿ãã®ãé£ããã¦æ®å¿µâ¦
ã¨æã£ã¦ããã®ã§ããã工夫ããã¨é£æºã§ããªãããªãã¨ããã£ãã®ã§ã·ã§ã¢ãã¾ãã
ã¾ããChrome ã«ä»¥ä¸ã®ããã¯ãã¼ã¯ã¬ãããç»é²ãã¾ãããã®æã誤çãã¥ãããããããããååãå ¥ãã¦ããã®ããã¤ã³ãã§ãï¼åã¯"bbb"ã¨ãã¦ã¿ã¾ããï¼ã
javascript:(function(){location.href='hatenabookmark:/entry?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&backurl='+encodeURIComponent(location.href.replace(/^http/,'googlechrome'))+'&backtitle=Chrome'})()
ããã¯ãã¼ã¯ã¬ããã¯ç´æ¥èµ·åãããããªãã®ã§ãããã¢ãã¬ã¹ãã¼ã«ããã¯ãã¼ã¯åãå
¥åããã¨ä¸ã®ç»é¢ã®ããã«ãµã¸ã§ã¹ããããã¿ãããããã¨ã§JSãå®è¡ã§ãã¾ãã
Chrome㯠googlechrome:// 㨠googlechromes:// ã¨ããURLã¹ãã¼ã ãå©ç¨ãã¦ãã¾ããã¯ã¦ãªããã¯ãã¼ã¯ for iPhone ã«ã¯å¤é¨é£æºAPIãããã¾ãã®ã§ãChromeã«åããã¦ä»¥ä¸ã®ããã«è¨å®ãã¦ããã¨ï¼åé ã«æ²è¼ããããã¯ãã¼ã¯ã¬ããã¯ãã®ããã«ãªã£ã¦ãã¾ãï¼ãã¯ã¦ãã¢ããªããChromeã«æ»ããã¨ãå¯è½ã§ãã
backurl | encodeURIComponent(location.href.replace(/^http/,'googlechrome')) |
---|---|
backtitle | Chrome |
ã¯ã¦ãªããã¯ãã¼ã¯å¤é¨é£æºAPIã«ã¤ãã¦è©³ããã¯ãã¡ããã覧ãã ãããbackurlã®URLã¹ãã¼ã ãå¤ãããã¨ã§ Chrome 以å¤ã§ããããããªã¢ããªã¨é£æºã§ãã¾ãã
iPhone向けAPI - はてなブックマーク外部連携API - Hatena Developer Center
æ¬ ç¹ã¨ãã¦ã¯ãSafari ã¯åä¸URLã¯æ°ããã¿ããä½ããªãã®ã§ãããChrome ã¯æ°ããã¿ããä½ããããChrome 㨠ã¯ã¦ãã¢ããªãè¡ã£ããæ¥ããããã¨ã¿ããã©ãã©ãå¢ããäºã§ããã¾ãããã¾ã§é »ç¹ã«è¡ãæ¥ãããã®ã§ããªãããããã¯è«¦ãã¾ãããã
ã¤ãã§ã«ãSafari ã®æ¹ã«ã Chromeã§éããã¨ããããã¯ãã¼ã¯ã¬ãããç»é²ãã¦ããã¨ããããã§ãããã㧠Chrome ä¸å¿çæ´»ã«ãªãã¾ããã
javascript:(function(){location.href=location.href.replace(/^http/,'googlechrome')})();
ã±ã£ã¨è¦é¢åã¨æãããããããã¾ããããChromeã¯ããã¯ãã¼ã¯ãUIçã«é ãã®ã§ã¢ãã¬ã¹ãã¼ãå©ç¨ããã®ãæå¤ã¨ä¾¿å©ã§ããã©ãããå©ç¨ãã ããã