Skip to content

Instantly share code, notes, and snippets.

@kiranbabu189
kiranbabu189 / meta_script.js
Created August 29, 2020 13:31
Meta tag content generator
function createMetaTags(tags, type) {
var comment = document.createComment(type);
document.getElementsByTagName('head')[0].appendChild(comment);
tags.forEach(element => {
var attribute = Object.keys(element)[0];
var link = document.createElement('meta');
link.setAttribute(attribute, element[attribute]);
var metaKey = element[attribute].split(':');
var content = metaKey.length > 1 ? metaValues[metaKey[1]] : metaValues[metaKey[0]]
link.content = content;
@kiranbabu189
kiranbabu189 / 0_reuse_code.js
Created December 22, 2016 06:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console