Skip to content

Instantly share code, notes, and snippets.

@oieioi
Forked from SyunWatanabe/showmeta.js
Created January 25, 2021 03:27
Show Gist options
  • Save oieioi/6a0c3e56670baf20be47ea95afdefbbf to your computer and use it in GitHub Desktop.
Save oieioi/6a0c3e56670baf20be47ea95afdefbbf to your computer and use it in GitHub Desktop.
show meta
// ==UserScript==
// @name show meta
// @namespace http://tampermonkey.net/
// @version 0.1
// @description show meta what we want
// @author me
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
var robots_production = document.getElementsByName('robots-production')[0].content;
var robots = document.getElementsByName('robots')[0].content;
var canonical = document.getElementsByTagName('link')[0].getAttribute('href');
var dummy_ele = document.createElement('div')
dummy_ele.id = "metatest";
dummy_ele.innerText = 'robots-production: ' + robots_production + '\n' + 'robots: ' + robots + '\n' + 'canonical: ' + canonical
dummy_ele.style.cssText = "font-size:13px;width:350px;color:#364e96;border: solid 3px #364e96;padding: 0.5em;border-radius: 0.5em;background: white;position: absolute;top:0;";
document.getElementsByTagName('div')[0].appendChild(dummy_ele)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment