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
var ajax = {}; | |
ajax.x = function () { | |
if (typeof XMLHttpRequest !== 'undefined') { | |
return new XMLHttpRequest(); | |
} | |
var versions = [ | |
"MSXML2.XmlHttp.6.0", | |
"MSXML2.XmlHttp.5.0", | |
"MSXML2.XmlHttp.4.0", | |
"MSXML2.XmlHttp.3.0", |
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
<wp:comment>(.|\n)*?<\/wp:comment> |
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
// the css rules that we want to copy | |
var all_styles = ["background","backgroundAttachment","backgroundColor","backgroundImage","backgroundPosition","backgroundRepeat","border","borderBottom","borderBottomColor","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopStyle","borderTopWidth","borderWidth","borderImage","borderRadius","bottom","boxShadow","captionSide","clear","clip","color","content","cssFloat","cursor","direction","display","fill","font","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","height","left","letterSpacing","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","maxHeight","maxWidth","minHeight","minWidth","opacity","outline","outlineC |
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
// This function is for including static HTML in a NWJS page. (Node Webkit) | |
// usage: <script>include('header.html');</script> | |
var include = function(file){ | |
html = fs.readFileSync(file) | |
scripts = document.getElementsByTagName('script'); | |
lastScript = scripts[scripts.length-1]; | |
lastScript.insertAdjacentHTML("beforebegin", html); | |
} |
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
//produces a 100px box with 80px right border | |
div{ | |
height: 100px; | |
position:relative; | |
&:after { | |
content: ''; | |
position: absolute; | |
height: 80%; | |
border-right: 2px solid red; |
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
//Automatic resize video player on device rotate | |
$(document).on('resize',function(){ | |
$player = $('.videoplayer iframe') | |
$player.attr('src', $player.attr('src')); | |
}); |
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
<!-- | |
MIDI JS Template for use with the Jazz plugin. | |
Google Jazz browser plugin and install it. | |
You also need a USB MIDI controller to use this. | |
--> | |
<html> |