View .htaccess
1 2 3 4 5 6 7 8 9 10
# add as many as you need...
SetEnvIf CF-IPCountry SY RedirectSubdomain=syria
SetEnvIf CF-IPCountry AE RedirectSubdomain=uae
SetEnvIf CF-IPCountry EG RedirectSubdomain=egypt
 
# Only redirect if Host is not a subdomain
SetEnvIfNoCase Host ^.+\.example\.com$ !RedirectSubdomain
 
# Only redirect if cookie "noredirect" doesn't exist
SetEnvIfNoCase ^Cookie$ noredirect=true !RedirectSubdomain
View smartresize.js
1 2 3 4 5 6 7 8 9 10
(function($,sr){
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
return function debounced () {
var obj = this, args = arguments;
function delayed () {
View build.xml
1 2 3 4 5 6 7 8 9 10
<?xml version="1.0" encoding="utf-8"?>
<project name="tutorialProject" default="prod" basedir="/Users/addy/buildTut/">
 
<description>Client-side ANT build file example</description>
 
<target name="-load.properties"
description="Set properties for this build">
<!--YUI Compressor location-->
<property name="yui.dir" value="${basedir}/yuicompressor/build/yuicompressor-2.4.2.jar"/>
<!--Source JS dir-->
View jquery.waituntilexists.js
1 2 3 4 5 6 7 8 9 10
;(function ($, window) {
 
var intervals = {};
var removeListener = function(selector) {
 
if (intervals[selector]) {
window.clearInterval(intervals[selector]);
intervals[selector] = null;
}
Something went wrong with that request. Please try again.