diff --git a/.gitignore b/.gitignore index 3c35dbe..dbaec26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +build +pkg tmp .DS_Store test/public/retina.js \ No newline at end of file diff --git a/build/retina.js b/build/retina.js deleted file mode 100644 index b38b9cf..0000000 --- a/build/retina.js +++ /dev/null @@ -1,41 +0,0 @@ -(function() { - - if (window.devicePixelRatio > 1) { - window.onload = function() { - var image, is_external, load, _i, _len, _ref, _results; - is_external = function(href) { - return !!(href.match(/^https?\:/i) && !href.match(document.domain)); - }; - _ref = document.getElementsByTagName("img"); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - image = _ref[_i]; - _results.push((load = function() { - var at_2x_path, extension, height, http, path, path_segments, path_without_extension, width; - if (!image.complete) { - return setTimeout(load, 5); - } else { - path = image.getAttribute("src"); - if (is_external(path)) return; - width = image.offsetWidth; - height = image.offsetHeight; - path_segments = path.split('.'); - path_without_extension = path_segments.slice(0, path_segments.length - 1).join("."); - extension = path_segments[path_segments.length - 1]; - at_2x_path = "" + path_without_extension + "@2x." + extension; - http = new XMLHttpRequest(); - http.open('HEAD', at_2x_path, false); - http.send(); - if (http.status === 200) { - image.setAttribute('width', width); - image.setAttribute('height', height); - return image.setAttribute("src", at_2x_path); - } - } - })()); - } - return _results; - }; - } - -}).call(this); diff --git a/pkg/retina.zip b/pkg/retina.zip deleted file mode 100644 index 59dea7d..0000000 Binary files a/pkg/retina.zip and /dev/null differ