As long as <style>
and <script>
tags are stripped from markdown documents rendered on Github, the details element is the only interactivity available in Github-flavored Markdown documents.
Summary
Extended description.
console.log("hello world"); |
function clearIntervals() { | |
var last_interval_id = window.setInterval("", 9999); | |
for (var i = 1; i < interval_id; i++) { | |
window.clearInterval(i); | |
} | |
} |
function addCSSMouse() { | |
window.root = document.querySelector(':root'); | |
document.addEventListener('mousemove', function(evt){ | |
// between -1 and 1 | |
var x = ((evt.clientX - (window.innerWidth / 2)) / window.innerWidth * 2).toFixed(2); | |
var y = ((evt.clientY - (window.innerHeight / 2)) / window.innerHeight * 2).toFixed(2); | |
root.style.setProperty('--mouse-x', x + 'px'); | |
root.style.setProperty('--mouse-y', y + 'px'); | |
}); | |
} |
li:not(:last-child)::after { | |
content: ","; | |
} |
// updated 2022_9_20 - felt cute; might delete later | |
// Array.from | |
const elements1 = Array.from(nodeList); | |
// spread syntax | |
const elements2 = [...nodeList]; | |
// THE OLD WAYS | |
// call slice method on a nodelist |
<?php | |
header("Access-Control-Allow-Origin: *"); | |
function curl_get_contents($url) | |
{ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_URL, $url); |
var stylesheets = document.querySelectorAll('link'); | |
stylesheets.forEach(function (sheet) { | |
sheet.parentNode.removeChild(sheet); | |
}); | |
var inlineStylesheets = document.querySelectorAll('style'); | |
inlineStylesheets.forEach(function (sheet) { | |
sheet.parentNode.removeChild(sheet); | |
}); | |
document.querySelectorAll('*').forEach(function (element) { | |
element.style = ''; |
/* | |
CSS grid layout can be used for stacking pieces on squares | |
Grid position is not animatable, so the FLIP technique would | |
be required | |
*/ | |
.white-player { | |
grid-template-areas: | |
'a8 b8 c8 d8 e8 f8 g8 h8' | |
'a7 b7 c7 d7 e7 f7 g7 h7' | |
'a6 b6 c6 d6 e6 f6 g6 h6' |
const selectorsArr = (()=>{ | |
const allElements = document.querySelectorAll('*') | |
const tags = new Set() | |
const classes = new Set() | |
const ids = new Set() | |
allElements.forEach(el=>{ | |
tags.add(el.tagName) |
As long as <style>
and <script>
tags are stripped from markdown documents rendered on Github, the details element is the only interactivity available in Github-flavored Markdown documents.