(function() { var Realmac = Realmac || {}; Realmac.meta = { // Set the browser title // // @var String text setTitle: function(text) { return document.title = text; }, // Set the content attribute of a meta tag // // @var String name // @var String content setTagContent: function(tag, content){ // If the tag being set is title // return the result of setTitle if ( tag === 'title' ) { return this.setTitle(content); } // Otherwise try and find the meta tag var tag = this.getTag(tag); // If we have a tag, set the content if ( tag !== false ) { return tag.setAttribute('content', content); } return false; }, // Find a meta tag // // @var String name getTag: function(name) { var meta = document.querySelectorAll('meta'); for ( var i=0; i