Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Zone is in cloudflare/config, not instaflare/config

  • Loading branch information...
commit 3a32ad48a1ee35686cfbfedac2a105a9973ba186 1 parent 964e24c
@triggity triggity authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 public/javascripts/instaflare.js
View
6 public/javascripts/instaflare.js
@@ -1,4 +1,4 @@
-CloudFlare.define("instaflare", ["cloudflare/deferred", "cloudflare/iterator", "cloudflare/dom", "cloudflare/console", "cloudflare/path", "instaflare/config"], function(deferred, iterator, dom, console, path, _config) {
+CloudFlare.define("instaflare", ["cloudflare/deferred", "cloudflare/iterator", "cloudflare/dom", "cloudflare/console", "cloudflare/path", "cloudflare/config", "instaflare/config"], function(deferred, iterator, dom, console, path, config, _config) {
var instaflare = {};
instaflare.filterHelpers = {
safe: function(i) {
@@ -198,16 +198,16 @@ CloudFlare.define("instaflare", ["cloudflare/deferred", "cloudflare/iterator", "
function sameZone(src, zone) {
var zoneRegExp = new RegExp(zone + '$')
var srcHostName = path.parseURL(path.resolveFullURL(src)).host
+ console.log("src host name is " + srcHostName);
return zoneRegExp.test(srcHostName)
}
var images = document.getElementsByTagName('img');
var sliced = Array.prototype.slice.call(images);
var queue = deferred.ref();
- var zone = _config ? _config.zone : "unknown";
iterator.forEach(sliced, function(image) {
- if (sameZone(dom.getAttribute(image, 'src'), zone)) {
+ if (sameZone(dom.getAttribute(image, 'src'), config.zone)) {
var span = document.createElement("span"),
caption = document.createTextNode('Hipsterizing...');
Please sign in to comment.
Something went wrong with that request. Please try again.