Sha256: cb03767002ba99f534c169e7fcc83bdca868e831cde6bf5a5400d06d7a471aff

Contents?: true

Size: 470 Bytes

Versions: 3

Compression:

Stored size: 470 Bytes

Contents

var CSSPush = {
	touch: function(files) {
		files.each(function(f) {
			var css = "/stylesheets" + f.strip().toLowerCase();
			window.$$("link").each(function(l) {
				var root = window.location.protocol + "//" + window.location.host;
				var link = l.href.strip().toLowerCase();
				var compare = link.startsWith(root) ? root + css : css;
				if (link == compare || link.startsWith(compare + "?")) {
					l.href = compare + "?" + Math.random();
				}
			});
		});
	}
};

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tilleryj-CSS-Push-1.0.1 install/css_push.js
tilleryj-CSS-Push-1.0.2 install/css_push.js
tilleryj-CSS-Push-1.0.3 install/css_push.js