Skip to content

Instantly share code, notes, and snippets.

View typetrail's full-sized avatar

TypeTrail Media typetrail

View GitHub Profile

Keybase proof

I hereby claim:

  • I am typetrail on github.
  • I am typetrail (https://keybase.io/typetrail) on keybase.
  • I have a public key ASAnwtzR2puCEdo6Oxzw44tkEV64dHecayCLqzNIZjdpmwo

To claim this, I am signing this object:

@typetrail
typetrail / faq.schema.org.json.html
Created April 16, 2019 20:14 — forked from walkergv/faq.schema.org.json.html
Frequently Asked Questions (FAQ) Pages Schema.org JSON-LD format
<!--When a JSON-LD document's top-level structure is an object that contains no other
properties than @graph and optionally @context (properties that are not mapped to an IRI
or a keyword are ignored), @graph is considered to express the otherwise implicit default graph.
This mechanism can be useful when a number of nodes exist at the document's top level that
share the same context, which is, e.g., the case when a document is flattened. The @graph
keyword collects such nodes in an array and allows the use of a shared context.
From https://www.w3.org/TR/json-ld/#h3_named-graphs
More on graph - http://stackoverflow.com/questions/30505796/json-ld-schema-org-multiple-video-image-page/30506476#30506476
if(navigator.userAgent.indexOf("ooglebot") > -1 || navigator.userAgent.indexOf("bingbot") > -1 || navigator.userAgent.indexOf("yandex") > -1 || navigator.userAgent.indexOf("baidu") > -1){
var tests = {
"abortcontroller": (typeof AbortController !== "undefined") ? true : false,
"addeventlistener": (typeof document.addEventListener !== "undefined") ? true : false,
"array-find-index": (typeof [].findIndex !== "undefined") ? true : false,
"array-find": (typeof [].find !== "undefined") ? true : false,
"array-flat": (typeof [].flat !== "undefined") ? true : false,
"array-includes": (typeof "abc".includes !== "undefined") ? true : false,
"arrow-functions": function() { try { return eval("var test = () => { return true }; test()"); }catch(e){ return false; } },
"atob-btoa": (typeof window.btoa !== "undefined") ? true : false,