skrollr-rails 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/skrollr-rails/version.rb +1 -1
- data/vendor/assets/javascripts/skrollr.ie.js +114 -115
- data/vendor/assets/javascripts/skrollr.js +1397 -1396
- data/vendor/assets/javascripts/skrollr.menu.js +126 -125
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: fc392484b2d622dfbdc8c4ea6e03a3b5eeb8f8e5
         | 
| 4 | 
            +
              data.tar.gz: 6c69ff25ca905d70b40f68f05c72026e515c8e2f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 3acb1b7751e38c669a7e4f95f121238b16f0b17f9faabcb52b57c5d6e1acbc85caa6ea4a0b6ab44458bc342fb52a6369d0e9304ec81ba0f4813b3a4593ee2d41
         | 
| 7 | 
            +
              data.tar.gz: e119e409da9733d5a757c1cffbad6d3d19ddd6243f94ae835545a4e8e779fc684d33208dccf041a98e421d092e2b48b84db157efd152c5f45600e8530a1477ef
         | 
| @@ -5,120 +5,119 @@ | |
| 5 5 | 
             
             * Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr
         | 
| 6 6 | 
             
             *
         | 
| 7 7 | 
             
             * Free to use under terms of MIT license
         | 
| 8 | 
            -
             */ | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
             | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
             | 
| 67 | 
            -
             | 
| 68 | 
            -
             | 
| 69 | 
            -
             | 
| 70 | 
            -
             | 
| 71 | 
            -
             | 
| 72 | 
            -
             | 
| 73 | 
            -
             | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
             | 
| 78 | 
            -
             | 
| 79 | 
            -
             | 
| 80 | 
            -
             | 
| 81 | 
            -
             | 
| 82 | 
            -
             | 
| 83 | 
            -
             | 
| 84 | 
            -
             | 
| 85 | 
            -
             | 
| 86 | 
            -
             | 
| 87 | 
            -
             | 
| 88 | 
            -
             | 
| 89 | 
            -
             | 
| 90 | 
            -
             | 
| 91 | 
            -
             | 
| 92 | 
            -
             | 
| 93 | 
            -
             | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
             | 
| 97 | 
            -
             | 
| 98 | 
            -
             | 
| 99 | 
            -
             | 
| 100 | 
            -
             | 
| 101 | 
            -
             | 
| 102 | 
            -
             | 
| 103 | 
            -
             | 
| 104 | 
            -
             | 
| 105 | 
            -
             | 
| 106 | 
            -
             | 
| 107 | 
            -
             | 
| 108 | 
            -
             | 
| 109 | 
            -
             | 
| 110 | 
            -
             | 
| 111 | 
            -
             | 
| 112 | 
            -
             | 
| 113 | 
            -
             | 
| 114 | 
            -
                /*
         | 
| 8 | 
            +
             */
         | 
| 9 | 
            +
            (function(document, skrollr) {
         | 
| 10 | 
            +
            	'use strict';
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            	var rxHSLAColor = /hsla?\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)%\s*,\s*(-?[\d.]+)%.*?\)/g;
         | 
| 13 | 
            +
            	var rxRGBAColor = /rgba?\(\s*(-?[\d.]+%?)\s*,\s*(-?[\d.]+%?)\s*,\s*(-?[\d.]+%?).*?\)/g;
         | 
| 14 | 
            +
            	var rxID = /^#[^\s]+$/;
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            	var _setStyle = skrollr.setStyle;
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            	//Monkeypatch the setStyle function.
         | 
| 19 | 
            +
            	skrollr.setStyle = function(el, prop, val) {
         | 
| 20 | 
            +
            		//Original function call.
         | 
| 21 | 
            +
            		_setStyle.apply(this, arguments);
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            		var style = el.style;
         | 
| 24 | 
            +
            		var matched;
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            		//IE opacity
         | 
| 27 | 
            +
            		if(prop === 'opacity') {
         | 
| 28 | 
            +
            			style.zoom = 1;
         | 
| 29 | 
            +
             | 
| 30 | 
            +
            			//Remove filter attribute in IE
         | 
| 31 | 
            +
            			if(val >= 1 && style.removeAttribute) {
         | 
| 32 | 
            +
            				style.removeAttribute('filter');
         | 
| 33 | 
            +
            			} else {
         | 
| 34 | 
            +
            				style.filter = 'alpha(opacity=' + val * 100 + ')';
         | 
| 35 | 
            +
            			}
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            			return;
         | 
| 38 | 
            +
            		}
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            		//Fast pre check
         | 
| 41 | 
            +
            		if(val.indexOf('hsl') > -1) {
         | 
| 42 | 
            +
            			matched = false;
         | 
| 43 | 
            +
             | 
| 44 | 
            +
            			//Replace hsl(a) with hex if needed (ignoring alpha).
         | 
| 45 | 
            +
            			val = val.replace(rxHSLAColor, function(x, h, s, l) {
         | 
| 46 | 
            +
            				matched = true;
         | 
| 47 | 
            +
             | 
| 48 | 
            +
            				return toHex.hsl(parseFloat(h), parseFloat(s), parseFloat(l));
         | 
| 49 | 
            +
            			});
         | 
| 50 | 
            +
             | 
| 51 | 
            +
            			if(matched) {
         | 
| 52 | 
            +
            				try {
         | 
| 53 | 
            +
            					style[prop] = val;
         | 
| 54 | 
            +
            				} catch(ignore) {}
         | 
| 55 | 
            +
             | 
| 56 | 
            +
            				return;
         | 
| 57 | 
            +
            			}
         | 
| 58 | 
            +
            		}
         | 
| 59 | 
            +
             | 
| 60 | 
            +
            		//Fast pre check
         | 
| 61 | 
            +
            		if(val.indexOf('rgb') > -1) {
         | 
| 62 | 
            +
            			matched = false;
         | 
| 63 | 
            +
             | 
| 64 | 
            +
            			//Replace rgba with hex if needed (ignoring alpha).
         | 
| 65 | 
            +
            			val = val.replace(rxRGBAColor, function(s, r, g, b) {
         | 
| 66 | 
            +
            				matched = true;
         | 
| 67 | 
            +
             | 
| 68 | 
            +
            				r = parseFloat(r, 10);
         | 
| 69 | 
            +
            				g = parseFloat(g, 10);
         | 
| 70 | 
            +
            				b = parseFloat(b, 10);
         | 
| 71 | 
            +
             | 
| 72 | 
            +
            				//rgba allows percentage notation.
         | 
| 73 | 
            +
            				if(s.indexOf('%') > -1) {
         | 
| 74 | 
            +
            					r = (r / 100) * 255;
         | 
| 75 | 
            +
            					g = (g / 100) * 255;
         | 
| 76 | 
            +
            					b = (b / 100) * 255;
         | 
| 77 | 
            +
            				}
         | 
| 78 | 
            +
             | 
| 79 | 
            +
            				return toHex.rgb(r | 0, g | 0, b | 0);
         | 
| 80 | 
            +
            			});
         | 
| 81 | 
            +
             | 
| 82 | 
            +
            			if(matched) {
         | 
| 83 | 
            +
            				try {
         | 
| 84 | 
            +
            					style[prop] = val;
         | 
| 85 | 
            +
            				} catch(ignore) {}
         | 
| 86 | 
            +
             | 
| 87 | 
            +
            				return;
         | 
| 88 | 
            +
            			}
         | 
| 89 | 
            +
            		}
         | 
| 90 | 
            +
            	};
         | 
| 91 | 
            +
             | 
| 92 | 
            +
             | 
| 93 | 
            +
            	/**
         | 
| 94 | 
            +
            	 * Converts rgb or hsl color to hex color.
         | 
| 95 | 
            +
            	 */
         | 
| 96 | 
            +
            	var toHex = {
         | 
| 97 | 
            +
            		//Credits to aemkei, jed and others
         | 
| 98 | 
            +
            		//Based on https://gist.github.com/1325937 and https://gist.github.com/983535
         | 
| 99 | 
            +
            		hsl: function(a,b,c,y){
         | 
| 100 | 
            +
            			a%=360;
         | 
| 101 | 
            +
            			a=a/60;c=c/100;b=[c+=b*=(c<0.5?c:1-c)/100,c-a%1*b*2,c-=b*=2,c,c+a%1*b,c+b];
         | 
| 102 | 
            +
             | 
| 103 | 
            +
            			y = [b[~~a%6],b[(a|16)%6],b[(a|8)%6]];
         | 
| 104 | 
            +
             | 
| 105 | 
            +
            			return toHex.rgb(parseInt(y[0] * 255, 10), parseInt(y[1] * 255, 10), parseInt(y[2] * 255, 10));
         | 
| 106 | 
            +
            		},
         | 
| 107 | 
            +
            		//https://gist.github.com/983535
         | 
| 108 | 
            +
            		rgb: function(a,b,c){
         | 
| 109 | 
            +
            			return'#' + ((256+a<<8|b)<<8|c).toString(16).slice(1);
         | 
| 110 | 
            +
            		}
         | 
| 111 | 
            +
            	};
         | 
| 112 | 
            +
             | 
| 113 | 
            +
            	/*
         | 
| 115 114 | 
             
            		A really bad polyfill. But the main use-case for data-anchor-target are IDs.
         | 
| 116 115 | 
             
            	*/
         | 
| 117 | 
            -
             | 
| 118 | 
            -
             | 
| 119 | 
            -
             | 
| 120 | 
            -
             | 
| 121 | 
            -
             | 
| 122 | 
            -
             | 
| 123 | 
            -
             | 
| 124 | 
            -
            }(document, window.skrollr)); | 
| 116 | 
            +
            	document.querySelector = document.querySelector || function(selector) {
         | 
| 117 | 
            +
            		if(!rxID.test(selector)) {
         | 
| 118 | 
            +
            			throw 'Unsupported selector "' + selector + '". The querySelector polyfill only works for IDs.';
         | 
| 119 | 
            +
            		}
         | 
| 120 | 
            +
             | 
| 121 | 
            +
            		return document.getElementById(selector.substr(1));
         | 
| 122 | 
            +
            	};
         | 
| 123 | 
            +
            }(document, window.skrollr));
         |