Last active
May 6, 2018 05:32
-
-
Save mak00s/b173d4e6a84934c3ff1387d87c4a9010 to your computer and use it in GitHub Desktop.
iTunesのAuto Link Makerのタグを改善した例
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 改善前のオリジナルタグ --> | |
<script type='text/javascript'> | |
var _merchantSettings=_merchantSettings || []; | |
_merchantSettings.push(['AT', '11l8bx']); | |
(function() { | |
var autolink = document.createElement('script'); | |
autolink.type = 'text/javascript'; | |
autolink.async = true; | |
autolink.src = ('https:' == document.location.protocol) ? 'https://autolinkmaker.itunes.apple.com/js/itunes_autolinkmaker.js' : 'http://autolinkmaker.itunes.apple.com/js/itunes_autolinkmaker.js'; | |
var s = document.getElementsByTagName('script')[0]; | |
s.parentNode.insertBefore(autolink, s); | |
})(); | |
</script> | |
<!-- 改善した後のタグ --> | |
<script> | |
var _merchantSettings=_merchantSettings || []; | |
_merchantSettings.push(['AT', '11l8bx']); | |
(function(d, s) { | |
var f = d.getElementsByTagName(s)[0], | |
j = d.createElement(s); | |
j.async = true; | |
j.src = 'https://autolinkmaker.itunes.apple.com/js/itunes_autolinkmaker.js'; | |
f.parentNode.insertBefore(j, f); | |
})(document, 'script'); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment