Last active
January 21, 2017 11:48
-
-
Save bootjp/747d21ae3400f24b53dcf7fa7ce4a739 to your computer and use it in GitHub Desktop.
my wordpress ad switch javascript
This file contains 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
(function() { | |
var metas = document.getElementsByTagName('head')[0].getElementsByTagName('meta'); | |
for (var index = 0; index < metas.length; index++) { | |
if (metas[index].name === 'keywords' && metas[index].content.indexOf('技術系') !== -1) { | |
console.log('技術記事'); | |
break; | |
} | |
} | |
console.log(index, metas.length); | |
if (index === metas.length) { | |
console.log('その他'); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment