{"id":554,"date":"2013-08-23T19:40:19","date_gmt":"2013-08-23T10:40:19","guid":{"rendered":"http:\/\/localhost:8080\/?p=554"},"modified":"2023-02-28T21:16:34","modified_gmt":"2023-02-28T12:16:34","slug":"linkshare-url-replace-phg-itunes","status":"publish","type":"post","link":"http:\/\/localhost:8080\/others\/web\/linkshare-url-replace-phg-itunes\/","title":{"rendered":"\u30ea\u30f3\u30af\u30b7\u30a7\u30a2\u3092\u4f7f\u3063\u305fiTunes\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u306eURL\u3092PHG\u306b\u7f6e\u63db\u3059\u308bJavaScript"},"content":{"rendered":"

\"Linkshare<\/p>\r\n

Apple\u306fiTunes\u306e\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u63d0\u643a\u5148\u3092\u30ea\u30f3\u30af\u30b7\u30a7\u30a2\u304b\u3089PHG\u306b\u5207\u308a\u66ff\u3048\u3001\u697d\u5929\u30ea\u30f3\u30af\u30b7\u30a7\u30a2\u3092\u5229\u7528\u3057\u305fiTunes\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u306f10\u67081\u65e5\u306b\u7d42\u4e86\u3059\u308b\u305d\u3046\u3067\u3059\u3002
\r\n10\u67081\u65e5\u306b\u306f\u65e2\u5b58\u306e\u30ea\u30f3\u30af\u30b7\u30a7\u30a2URL\u304c\u4f7f\u3048\u306a\u304f\u306a\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4ee5\u524d\u66f8\u3044\u305f\u8a18\u4e8b\u300c[Safari\/Chrome]\u30ea\u30f3\u30af\u30b7\u30a7\u30a2\u306eiTunes\u30ea\u30f3\u30af\u3092\u901a\u5e38\u306eURL\u306b\u7f6e\u63db\u3057\u306610\u67081\u65e5\u4ee5\u964d\u3082\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306b\u3059\u308b\u62e1\u5f35[StoreLinkFixer]<\/a>\u300d\u306f\u95b2\u89a7\u8005\u5074\u304c\u30ea\u30f3\u30af\u30b7\u30a7\u30a2\u306eURL\u3092\u5909\u63db\u3057\u3066\u898b\u3089\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u30d6\u30e9\u30a6\u30b6\u62e1\u5f35\u6a5f\u80fd\u3067\u3057\u305f\u3002
\r\n\u4eca\u56de\u306fHTML\u306ehead\u306bJavaScript\u3092\u8a2d\u7f6e\u3059\u308b\u30bf\u30a4\u30d7\u306a\u306e\u3067\u3001\u30b5\u30a4\u30c8\u306e\u7ba1\u7406\u4eba\u304c\u4f7f\u3046\u7269\u306b\u306a\u308a\u307e\u3059\u3002
\r\n<\/p>\r\n

WordPress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u300cSearch Regex\u300d\u3092\u4f7f\u3063\u3066\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u76f4\u63a5\u66f8\u304d\u63db\u3048\u308b\u65b9\u6cd5\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u304c\u51c4\u304f\u5206\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\r\n

\u3072\u3068\u308a\u3076\u308d\u3050 \u00bb WordPress\u4e0a\u306eApp Store\u30a2\u30d7\u30ea\u306eLinkShare\u30ea\u30f3\u30af\u3092\u65b0\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0(PHG)\u306e\u3082\u306e\u306b\u66f8\u304d\u63db\u3048\u308b\u65b9\u6cd5<\/a>\"\"<\/a><\/p>\r\n

[WordPress]iTunes\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u3092\u30ea\u30f3\u30af\u30b7\u30a7\u30a2\u304b\u3089PHG\u306b\u7f6e\u63db\u3059\u308b\u65b9\u6cd5<\/a>\"\"<\/a><\/p>

\u4f7f\u3044\u65b9<\/h3>\r\n

\u30da\u30fc\u30b8\u304c\u8aad\u307f\u8fbc\u307e\u308c\u305f\u3089\u81ea\u52d5\u3067\u30ea\u30f3\u30af\u30b7\u30a7\u30a2\u306eURL\u3092PHG\u306eURL\u306b\u7f6e\u63db\u3059\u308bJavaScript\u3067\u3059\u3002<\/p>\r\n

JavaScript<\/h4>\r\n

\u672c\u4f53\u3068\u306a\u308bJavaScript\u306f\u3053\u3061\u3089<\/a>\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u304b\u3001\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30da\u3057\u3066\u81ea\u7531\u306b\u4f7f\u3063\u3066\u4e0b\u3055\u3044\u3002
<\/p>\r\n\r\n\/* \u3053\u3053\u306b\u81ea\u5206\u306e\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8ID(PHG)\u3092\u5165\u308c\u308b *\/\r\nvar affiliateID = “11l4y4”;\r\n\/* \u3053\u3053\u306b\u81ea\u5206\u306e\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8ID(PHG)\u3092\u5165\u308c\u308b *\/\r\n\r\nvar w = window;\r\nif(w.addEventListener){\r\n\tw.addEventListener(“load”, replaceLink, false);\r\n}else if(w.attachEvent){\r\n\tw.attachEvent(“onload”, replaceLink);\r\n}\r\nfunction replaceLink(){\r\n\td = document.getElementsByTagName(“a”);\r\n\tfor(i=0; i\r\n

HTML<\/h4>\r\n

\u6b21\u306b\u3001\u30b3\u30fc\u30c9\u3092\u30d6\u30ed\u30b0\u30c6\u30fc\u30de\u306b\u8a2d\u7f6e\u3057\u307e\u3059\u3002<\/p>\r\n

\u7d30\u304b\u3044\u8aac\u660e\u306f\u7701\u304d\u307e\u3059\u304cWordPress\u306e\u5834\u5408\u306f\u3001wp_head\u306b\u8ffd\u52a0\u3057\u3066\u3082\u3044\u3044\u3057\u3001header.php\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u306b\u7de8\u96c6\u3057\u3066\u3082\u3044\u3044\u3067\u3059\u3002<\/p>\r\n\r\n

\r\n<html>\r\n<head>\r\n...\r\n<script>\r\n\/\/\u3053\u3053\u306b\u30b3\u30d4\u30fc\u3057\u305f\u30b3\u30fc\u30c9\u3092\u633f\u5165\u3059\u308b\u304b\r\n<\/script>\r\n\u2026\r\n<script type="text\/javascript" src="\u3053\u3053\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306eURL\u3092\u5165\u308c\u308b"><\/script>\r\n...\r\n<\/head>\r\n...\r\n<\/pre>\r\n\r\n

WordPress\u4ee5\u5916\u306e\u30d6\u30ed\u30b0\u30b5\u30fc\u30d3\u30b9\u3067FC2\u306a\u3069HTML\u3092\u76f4\u63a5\u7de8\u96c6\u3067\u304d\u308b\u30b5\u30a4\u30c8\u306e\u5834\u5408\u306f\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306ehead\u30bf\u30b0\u306b\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\r\n

\u203b\u8aac\u660e\u306f\u304b\u306a\u308a\u9069\u5f53\u3067\u3059\u304c\u3001\u4f5c\u696d\u3092\u3059\u308b\u6642\u306f\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306a\u3069\u3068\u3063\u3066\u81ea\u5df1\u8cac\u4efb\u3067\u884c\u306a\u3063\u3066\u4e0b\u3055\u3044\u3002<\/p>\r\n

Safari, Chrome, FireFox, InternetExplorer9\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u52d5\u304b\u306a\u304b\u3063\u305f\u308a\u8ffd\u52a0\u3057\u3066\u6b32\u3057\u3044\u4e8b\u304c\u3042\u3063\u305f\u3089\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>","protected":false},"excerpt":{"rendered":"

Apple\u306fiTunes\u306e\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u63d0\u643a\u5148\u3092\u30ea\u30f3\u30af\u30b7\u30a7\u30a2\u304b\u3089PHG\u306b\u5207\u308a\u66ff\u3048\u3001\u697d\u5929\u30ea\u30f3\u30af\u30b7\u30a7\u30a2\u3092\u5229\u7528\u3057\u305fiTunes\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8\u306f10\u67081\u65e5\u306b\u7d42\u4e86\u3059\u308b\u305d\u3046\u3067\u3059\u3002 10\u67081\u65e5\u306b\u306f\u65e2\u5b58\u306e\u30ea\u30f3\u30af\u30b7\u30a7\u30a2URL\u304c\u4f7f\u3048\u306a\u304f\u306a\u308b […]<\/p>\n","protected":false},"author":1,"featured_media":557,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[44,31,74],"_links":{"self":[{"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/posts\/554"}],"collection":[{"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/comments?post=554"}],"version-history":[{"count":17,"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/posts\/554\/revisions"}],"predecessor-version":[{"id":574,"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/posts\/554\/revisions\/574"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/media\/557"}],"wp:attachment":[{"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/media?parent=554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/categories?post=554"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost:8080\/wp-json\/wp\/v2\/tags?post=554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}