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
window.onbeforeunload = function(e) { | |
e = e || window.event; | |
// For IE and Firefox prior to version 4 | |
if (e) { | |
e.returnValue = 'Sure?'; | |
} | |
// For Safari | |
return 'Sure?'; | |
} |
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
<Directory "D:/Projects/PHP/silex-test/web"> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride all | |
Order Deny,Allow | |
Allow from all | |
Require all granted | |
</Directory> |
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
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerAdmin webmaster@dummy-host.example.com | |
DocumentRoot "D:/Projects/PHP/silex-test/web" | |
ServerName silex-test.loc | |
ServerAlias www.silex-test.loc | |
ErrorLog "logs/dummy-host.example.com-error.log" | |
CustomLog "logs/dummy-host.example.com-access.log" common | |
</VirtualHost> |
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 r = function(){ return (Math.floor(Math.random()*100)+60).toString(16)} | |
var c = '#' + r() + r() + r(); | |
var s = document.body.style; | |
s.height = "100%"; | |
s.color = '#ffffff'; | |
s.fontSize = '64px'; | |
s.textAlign = 'center'; | |
s.paddingTop = '15%'; | |
s.backgroundImage = 'none'; | |
s.backgroundColor = c; |
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 f = function(c){ | |
var g = function(){return Math.floor(Math.random()*3);} | |
var colors = ['red', 'green', 'blue']; | |
var r = g(); | |
if(typeof c == 'undefined'){ c = 'red'} | |
while(colors.indexOf(c) === r){r = g();} | |
document.body.style.backgroundColor = c; | |
document.body.innerHTML = colors[r]; | |
setTimeout(function(){f(colors[r])}, 1000); | |
} |
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 IE = (function () { | |
"use strict"; | |
var ret, isTheBrowser, | |
actualVersion, | |
jscriptMap, jscriptVersion; | |
isTheBrowser = false; | |
jscriptMap = { | |
"5.5": 5.5, |
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 isMSIE = /*@cc_on!@*/0; | |
if (isMSIE) { | |
// do IE-specific things | |
} else { | |
// do non IE-specific things | |
} |
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
//Fix z-index youtube video embedding | |
$('iframe').each(function(){ | |
var url = $(this).attr("src"); | |
if(url){ | |
var separator = (url.indexOf('?') > 0) ? '&' : '?'; | |
$(this).attr('src', url + separator + 'wmode=transparent'); | |
$(this).attr("wmode", 'Opaque'); | |
} | |
}); |
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
SetEnv APPLICATION_ENV development | |
Options +FollowSymlinks | |
Options -Indexes | |
<IfModule mod_rewrite.c> | |
RewriteBase / | |
RewriteEngine On |
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
function getInternetExplorerVersion() | |
{ | |
var rv = -1; | |
if (navigator.appName == 'Microsoft Internet Explorer') | |
{ | |
var ua = navigator.userAgent; | |
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); | |
if (re.exec(ua) != null) | |
rv = parseFloat( RegExp.$1 ); | |
} |
OlderNewer