This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
#tri { | |
border-color: black black transparent transparent; | |
border-style:solid; | |
border-width: 50px; | |
width:0; | |
height:0; | |
} | |
</style> | |
<div id="tri"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Mechanical Grass · CodePen</title> | |
<!-- | |
Copyright (c) 2012 Tim Holman, http://codepen.io/tholman | |
Permission is hereby granted, free of charge, to any person obtaining |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
history.go(-1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body contenteditable="true" | |
onload="document.querySelector('body').innerHTML = window.localStorage.getItem('save');" | |
onkeyup="window.localStorage.setItem('save', document.querySelector('body').innerHTML);" | |
style="font-size: 21px; width: 400px; margin: 70px auto auto auto;"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="test"> | |
http://google.com | |
</div> | |
<script> | |
var txt = document.querySelector('body').innerHTML; | |
var pattern = /(HTTP:\/\/|HTTPS:\/\/)([a-zA-Z0-9.\/&?_=!*,\(\)+-]+)/i; | |
var replace = "<a href=\"$1$2\">$1$2</a>"; | |
var result = txt.replace(pattern , replace); | |
document.querySelector('body').innerHTML = result; | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input onkeypress="javascript:return false;" id="txtChar" onkeydown="javascript:return displayKeyCode(event)" type="text" name="txtChar"> | |
<span id="spnCode" name="spnCode"></span> | |
<script> | |
<!-- | |
function displayKeyCode(evt) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
body { | |
color: white; | |
font-size: 15vmin; | |
font-family: helvetica; | |
text-align: center; | |
margin-top: 40vh; | |
text-shadow: .1vw .1vh 5px black; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
document.onkeydown = function(evt) { | |
evt = evt || window.event; | |
if (evt.ctrlKey && evt.keyCode == 13) { | |
evt.preventDefault(); | |
pasteHtmlAtCaret('<li style="margin-left: 15px;"> </li>'); | |
} | |
if (evt.altKey && evt.keyCode == 13) { | |
evt.preventDefault(); | |
pasteHtmlAtCaret('<li style="margin-left: -15px;"> </li>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link href="https://dl.dropboxusercontent.com/u/7984474/GitHub/sand/favicon.ico" rel="Shortcut Icon" /> | |
<meta charset="UTF-8"> | |
<title>sand v5 (ace)</title> | |
<script> | |
var editboxHTML = | |
'<script src="https://dl.dropboxusercontent.com/u/7984474/GitHub/sand/hotkeys.js"><\/script>' + | |
'<script>' + | |
' shortcut.add("Ctrl+Shift+X",function() { window.setCookie(); });' + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.onkeydown = function(evt) { | |
evt = evt || window.event; | |
if (evt.keyCode == 13 && evt.ctrlKey) { | |
evt.preventDefault(); | |
alert('it works!'); | |
} | |
}; |
OlderNewer