This file contains hidden or 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
function strip_script(content, scripts, fix){ | |
var so = 0, ss = 0, se, cs, ce; | |
var save = Object(scripts) instanceof Array; | |
while (-1 !== ( ss = content.indexOf('<script', ss) )) { | |
// update comment range, if it is before the script | |
while (null == ce || -1 !== ce && ss > ce) { | |
if (-1 !== ( cs = content.indexOf('<!--', null == ce ? so : ce) )) { | |
if (-1 === ( ce = content.indexOf('-->', cs) )) { | |
// fix comment end tag |
This file contains hidden or 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> | |
<head> | |
<title>Center Element by CSS: inline-block</title> | |
<style type="text/css"> | |
html, body { | |
width: 100%; | |
height: 100%; | |
margin: 0; | |
padding: 0; |
This file contains hidden or 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
<?php | |
/*! | |
* HTML5 Cache Manifest Builder | |
* @author Shen Junru | |
* | |
* in Command Line: | |
* - remote=path (ex://domain/path/) | |
* - path/type=remote (ex: ../js/*.js=/js) | |
* in Browser: | |
* - remote=path (ex://domain/path/) |
This file contains hidden or 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
// IE | |
// conditional comment | |
(function(dom){ | |
dom.innerHTML = '<!--[if IE]><br><![endif]-->'; | |
return !!dom.firstChild.tagName; | |
})(document.createElement('p')); | |
// Conditional Compilation | |
// http://msdn.microsoft.com/en-us/library/ahx1z4fs(VS.80).aspx |
NewerOlder