1 2var showFlickr = function(tag) { 3 var url = 'http://api.flickr.com/services/rest/?tags='+tag; 4 $.getJSON(url); 5 }; 6 7 8 var search = function(tag) { 9 window.location.href = '/'+tag; 10 window.location.pathname = '/'+tag 11 window.history.replaceState({urlPath:tag},"",tag) + tag 12 history.replaceState({id:0}, '', tag) 13 14 }; 15 16 17// Basic Commands 18 19 20 21var saucysearching = function() { 22 showsearch(), searchsaucy(); 23}; 24 25var saucytype = function(tag) { 26 var mySearch = document.getElementById('mySearch'); 27 mySearch.value = tag 28 29 window.addEventListener("keyup",function(ev){ 30 if(ev.ctrlKey && ev.keyCode === 90) console.log(ev); // or do smth 31 }) 32 33 document.getElementById('mySearch').fire("keyup",{ctrlKey:true,keyCode:90,bubbles:true}) 34}; 35 36var saucyquickactions = function() { 37 quickactions(), quickactionstwo() 38}; 39 40var presets1 = function() { 41 preset1() 42}; 43 44var presets2 = function() { 45 preset2() 46}; 47 48var presets3 = function() { 49 preset3() 50}; 51 52var presets4 = function() { 53 preset4() 54}; 55 56 57 58 59var daily = function() { 60 location.href = "https://saucy.chargebee.com/hosted_pages/plans/saucy-daily"; 61}; 62 63var weekly = function() { 64 location.href = "https://saucy.chargebee.com/hosted_pages/plans/saucy-weekly"; 65}; 66 67var monthly = function() { 68 location.href = "https://saucy.chargebee.com/hosted_pages/plans/saucy-monthly"; 69}; 70 71 72var hidenavigation = function() { 73 hidesaucy(); hidesaucy1(); hidesaucy2(); hidesaucy3(); 74}; 75 76var shownavigation = function() { 77 showsaucy(); showsaucy1(); showsaucy2(); showsaucy3(); 78}; 79 80var saucyreset = function() { 81 localStorage.clear(); 82}; 83 84var scrollDownPage = function() { 85 $('section, iframe').animate({scrollTop: document.body.scrollHeight},"slow"); 86 }; 87 88var scrollUpPage = function() { 89 $(window).scrollTop(0); 90}; 91 92 93 94 95function photosaucy() { 96 document.querySelector("section").style.display="none"; 97 document.querySelector("#embeds").style.display="none"; 98 document.querySelector(".ui").style.display="none"; 99 document.querySelector("#saucyui").style.display="none"; 100 var frame = document.getElementById('photo'); 101 frame.src = frame.dataset.src; 102 } 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123// Confetti Commands 124 125var autumndefault=function(){var $=Date.now()+15e62,a=1;function n($,a){return Math.random()*(a-$)+$}!function r(){var t=$-Date.now();confetti({particleCount:1,startVelocity:0,ticks:Math.max(200,500*(t/15e62)),origin:{x:Math.random(),y:Math.random()*(a=Math.max(.8,a-.001))-.2},colors:["#bb0000","#ffffff"],gravity:n(.4,.6),scalar:n(.4,1),drift:n(-.4,.4)}),t>0&&requestAnimationFrame(r)}()}; 126 127// Confetti 128 129 130var confettidefault = function() { 131 confettisaucy({ angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 0 },}); 132 confettisaucy({ angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 1 },}); 133 confettisaucy({ angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 1 },}); 134 confettisaucy({ angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 0.5 },}); 135 function randomInRange(min, max) {return Math.random() * (max - min) + min;}} 136 137 var confettiblack = function() { 138 confettisaucy({ colors:["#000000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 0 },}); 139 confettisaucy({ colors:["#000000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 1 },}); 140 confettisaucy({ colors:["#000000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 1 },}); 141 confettisaucy({ colors:["#000000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 0.5 },}); 142 function randomInRange(min, max) {return Math.random() * (max - min) + min;}} 143 144 var confettiwhite = function() { 145 confettisaucy({ colors:["#ff0000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 0 },}); 146 confettisaucy({ colors:["#ff0000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 1 },}); 147 confettisaucy({ colors:["#ff0000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 1 },}); 148 confettisaucy({ colors:["#ff0000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 0.5 },}); 149 function randomInRange(min, max) {return Math.random() * (max - min) + min;}} 150 151 var confettired = function() { 152 confettisaucy({ colors:["#ff0000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 0 },}); 153 confettisaucy({ colors:["#ff0000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 1 },}); 154 confettisaucy({ colors:["#ff0000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 1 },}); 155 confettisaucy({ colors:["#ff0000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 0.5 },}); 156 function randomInRange(min, max) {return Math.random() * (max - min) + min;}} 157 158 var confettiorange = function() { 159 confettisaucy({ colors:["#ff8c00"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 0 },}); 160 confettisaucy({ colors:["#ff8c00"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 1 },}); 161 confettisaucy({ colors:["#ff8c00"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 1 },}); 162 confettisaucy({ colors:["#ff8c00"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 0.5 },}); 163 function randomInRange(min, max) {return Math.random() * (max - min) + min;}} 164 165 var confettiyellow = function() { 166 confettisaucy({ colors:["#E1AD01"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 0 },}); 167 confettisaucy({ colors:["#E1AD01"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 1 },}); 168 confettisaucy({ colors:["#E1AD01"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 1 },}); 169 confettisaucy({ colors:["#E1AD01"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 0.5 },}); 170 function randomInRange(min, max) {return Math.random() * (max - min) + min;}} 171 172 var confettigreen = function() { 173 confettisaucy({ colors:["#006400"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 0 },}); 174 confettisaucy({ colors:["#006400"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 1 },}); 175 confettisaucy({ colors:["#006400"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 1 },}); 176 confettisaucy({ colors:["#006400"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 0.5 },}); 177 function randomInRange(min, max) {return Math.random() * (max - min) + min;}} 178 179 var confettiblue = function() { 180 confettisaucy({ colors:["#00008b"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 0 },}); 181 confettisaucy({ colors:["#00008b"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 1 },}); 182 confettisaucy({ colors:["#00008b"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 1 },}); 183 confettisaucy({ colors:["#00008b"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 0.5 },}); 184 function randomInRange(min, max) {return Math.random() * (max - min) + min;}} 185 186 var confettipurple = function() { 187 confettisaucy({ colors:["#800080"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 0 },}); 188 confettisaucy({ colors:["#800080"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 1 },}); 189 confettisaucy({ colors:["#800080"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 1 },}); 190 confettisaucy({ colors:["#800080"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 0.5 },}); 191 function randomInRange(min, max) {return Math.random() * (max - min) + min;}} 192 193 var confettipink = function() { 194 confettisaucy({ colors:["#ff0000"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 0 },}); 195 confettisaucy({ colors:["#e75480"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { x: 1 },}); 196 confettisaucy({ colors:["#e75480"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 1 },}); 197 confettisaucy({ colors:["#e75480"], angle: randomInRange(55, 125), spread: randomInRange(100, 200), particleCount: randomInRange(50, 200), ticks: 2000, origin: { y: 0.5 },}); 198 function randomInRange(min, max) {return Math.random() * (max - min) + min;}} 199 200 201 202// Fireworks 203 204var fireworksdefault=function(){var $=Date.now()+15e3,n={startVelocity:30,spread:360,ticks:60,zIndex:10};function r($,n){return Math.random()*(n-$)+$}var a=setInterval(function(){var i=$-Date.now();if(i<=0)return clearInterval(a);var o=50*(i/15e3);confetti(Object.assign({},n,{particleCount:o,origin:{x:r(.1,.3),y:Math.random()-.2}})),confetti(Object.assign({},n,{particleCount:o,origin:{x:r(.7,.9),y:Math.random()-.2}}))},250)}; 205var fireworksblack=function(){var $=Date.now()+15e3,n={startVelocity:30,spread:360,ticks:60,zIndex:10};function r($,n){return Math.random()*(n-$)+$}var a=setInterval(function(){var i=$-Date.now();if(i<=0)return clearInterval(a);var o=50*(i/15e3);confetti(Object.assign({},n,{colors:["#000000"], particleCount:o,origin:{x:r(.1,.3),y:Math.random()-.2}})),confetti(Object.assign({},n,{colors:["#000000"],particleCount:o,origin:{x:r(.7,.9),y:Math.random()-.2}}))},250)}; 206var fireworkswhite=function(){var $=Date.now()+15e3,n={startVelocity:30,spread:360,ticks:60,zIndex:10};function r($,n){return Math.random()*(n-$)+$}var a=setInterval(function(){var i=$-Date.now();if(i<=0)return clearInterval(a);var o=50*(i/15e3);confetti(Object.assign({},n,{colors:["#ffffff"], particleCount:o,origin:{x:r(.1,.3),y:Math.random()-.2}})),confetti(Object.assign({},n,{colors:["#ffffff"],particleCount:o,origin:{x:r(.7,.9),y:Math.random()-.2}}))},250)}; 207var fireworksred=function(){var $=Date.now()+15e3,n={startVelocity:30,spread:360,ticks:60,zIndex:10};function r($,n){return Math.random()*(n-$)+$}var a=setInterval(function(){var i=$-Date.now();if(i<=0)return clearInterval(a);var o=50*(i/15e3);confetti(Object.assign({},n,{colors:["#ff0000"], particleCount:o,origin:{x:r(.1,.3),y:Math.random()-.2}})),confetti(Object.assign({},n,{colors:["#ff0000"],particleCount:o,origin:{x:r(.7,.9),y:Math.random()-.2}}))},250)}; 208var fireworksorange=function(){var $=Date.now()+15e3,n={startVelocity:30,spread:360,ticks:60,zIndex:10};function r($,n){return Math.random()*(n-$)+$}var a=setInterval(function(){var i=$-Date.now();if(i<=0)return clearInterval(a);var o=50*(i/15e3);confetti(Object.assign({},n,{colors:["#ff8c00"], particleCount:o,origin:{x:r(.1,.3),y:Math.random()-.2}})),confetti(Object.assign({},n,{colors:["#ff8c00"],particleCount:o,origin:{x:r(.7,.9),y:Math.random()-.2}}))},250)}; 209var fireworksyellow=function(){var $=Date.now()+15e3,n={startVelocity:30,spread:360,ticks:60,zIndex:10};function r($,n){return Math.random()*(n-$)+$}var a=setInterval(function(){var i=$-Date.now();if(i<=0)return clearInterval(a);var o=50*(i/15e3);confetti(Object.assign({},n,{colors:["#E1AD01"], particleCount:o,origin:{x:r(.1,.3),y:Math.random()-.2}})),confetti(Object.assign({},n,{colors:["#E1AD01"],particleCount:o,origin:{x:r(.7,.9),y:Math.random()-.2}}))},250)}; 210var fireworksgreen=function(){var $=Date.now()+15e3,n={startVelocity:30,spread:360,ticks:60,zIndex:10};function r($,n){return Math.random()*(n-$)+$}var a=setInterval(function(){var i=$-Date.now();if(i<=0)return clearInterval(a);var o=50*(i/15e3);confetti(Object.assign({},n,{colors:["#006400"], particleCount:o,origin:{x:r(.1,.3),y:Math.random()-.2}})),confetti(Object.assign({},n,{colors:["#006400"],particleCount:o,origin:{x:r(.7,.9),y:Math.random()-.2}}))},250)}; 211var fireworksblue=function(){var $=Date.now()+15e3,n={startVelocity:30,spread:360,ticks:60,zIndex:10};function r($,n){return Math.random()*(n-$)+$}var a=setInterval(function(){var i=$-Date.now();if(i<=0)return clearInterval(a);var o=50*(i/15e3);confetti(Object.assign({},n,{colors:["#00008b"], particleCount:o,origin:{x:r(.1,.3),y:Math.random()-.2}})),confetti(Object.assign({},n,{colors:["#00008b"],particleCount:o,origin:{x:r(.7,.9),y:Math.random()-.2}}))},250)}; 212var fireworkspurple=function(){var $=Date.now()+15e3,n={startVelocity:30,spread:360,ticks:60,zIndex:10};function r($,n){return Math.random()*(n-$)+$}var a=setInterval(function(){var i=$-Date.now();if(i<=0)return clearInterval(a);var o=50*(i/15e3);confetti(Object.assign({},n,{colors:["#800080"], particleCount:o,origin:{x:r(.1,.3),y:Math.random()-.2}})),confetti(Object.assign({},n,{colors:["#800080"],particleCount:o,origin:{x:r(.7,.9),y:Math.random()-.2}}))},250)}; 213var fireworkspink=function(){var $=Date.now()+15e3,n={startVelocity:30,spread:360,ticks:60,zIndex:10};function r($,n){return Math.random()*(n-$)+$}var a=setInterval(function(){var i=$-Date.now();if(i<=0)return clearInterval(a);var o=50*(i/15e3);confetti(Object.as
213sign({},n,{colors:["#e75480"], particleCount:o,origin:{x:r(.1,.3),y:Math.random()-.2}})),confetti(Object.assign({},n,{colors:["#e75480"],particleCount:o,origin:{x:r(.7,.9),y:Math.random()-.2}}))},250)}; 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233// Snow 234 235var snowdefault=function(){var duration= 15 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,animationEnd=Date.now()+duration,skew=1;function randomInRange(a,n){return Math.random()*(n-a)+a}!function a(){var n=animationEnd-Date.now(),t=Math.max(200,n/duration*500);skew=Math.max(.8,skew-.001),confetti({particleCount:1,startVelocity:0,ticks:t,origin:{x:Math.random(),y:Math.random()*skew-.2},colors:["#ffffff"],shapes:["circle"],gravity:randomInRange(.4,.6),scalar:randomInRange(.4,1),drift:randomInRange(-.4,.4)}),n>0&&requestAnimationFrame(a)}();} 236var snowblack=function(){var duration= 15 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,animationEnd=Date.now()+duration,skew=1;function randomInRange(a,n){return Math.random()*(n-a)+a}!function a(){var n=animationEnd-Date.now(),t=Math.max(200,n/duration*500);skew=Math.max(.8,skew-.001),confetti({particleCount:1,startVelocity:0,ticks:t,origin:{x:Math.random(),y:Math.random()*skew-.2},colors:["#000000"],shapes:["circle"],gravity:randomInRange(.4,.6),scalar:randomInRange(.4,1),drift:randomInRange(-.4,.4)}),n>0&&requestAnimationFrame(a)}();} 237var snowred=function(){var duration= 15 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,animationEnd=Date.now()+duration,skew=1;function randomInRange(a,n){return Math.random()*(n-a)+a}!function a(){var n=animationEnd-Date.now(),t=Math.max(200,n/duration*500);skew=Math.max(.8,skew-.001),confetti({particleCount:1,startVelocity:0,ticks:t,origin:{x:Math.random(),y:Math.random()*skew-.2},colors:["#ff0000"],shapes:["circle"],gravity:randomInRange(.4,.6),scalar:randomInRange(.4,1),drift:randomInRange(-.4,.4)}),n>0&&requestAnimationFrame(a)}();} 238var snoworange=function(){var duration= 15 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,animationEnd=Date.now()+duration,skew=1;function randomInRange(a,n){return Math.random()*(n-a)+a}!function a(){var n=animationEnd-Date.now(),t=Math.max(200,n/duration*500);skew=Math.max(.8,skew-.001),confetti({particleCount:1,startVelocity:0,ticks:t,origin:{x:Math.random(),y:Math.random()*skew-.2},colors:["#ff8c00"],shapes:["circle"],gravity:randomInRange(.4,.6),scalar:randomInRange(.4,1),drift:randomInRange(-.4,.4)}),n>0&&requestAnimationFrame(a)}();} 239var snowyellow=function(){var duration= 15 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,animationEnd=Date.now()+duration,skew=1;function randomInRange(a,n){return Math.random()*(n-a)+a}!function a(){var n=animationEnd-Date.now(),t=Math.max(200,n/duration*500);skew=Math.max(.8,skew-.001),confetti({particleCount:1,startVelocity:0,ticks:t,origin:{x:Math.random(),y:Math.random()*skew-.2},colors:["#E1AD01"],shapes:["circle"],gravity:randomInRange(.4,.6),scalar:randomInRange(.4,1),drift:randomInRange(-.4,.4)}),n>0&&requestAnimationFrame(a)}();} 240var snowgreen=function(){var duration= 15 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,animationEnd=Date.now()+duration,skew=1;function randomInRange(a,n){return Math.random()*(n-a)+a}!function a(){var n=animationEnd-Date.now(),t=Math.max(200,n/duration*500);skew=Math.max(.8,skew-.001),confetti({particleCount:1,startVelocity:0,ticks:t,origin:{x:Math.random(),y:Math.random()*skew-.2},colors:["#006400"],shapes:["circle"],gravity:randomInRange(.4,.6),scalar:randomInRange(.4,1),drift:randomInRange(-.4,.4)}),n>0&&requestAnimationFrame(a)}();} 241var snowblue=function(){var duration= 15 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,animationEnd=Date.now()+duration,skew=1;function randomInRange(a,n){return Math.random()*(n-a)+a}!function a(){var n=animationEnd-Date.now(),t=Math.max(200,n/duration*500);skew=Math.max(.8,skew-.001),confetti({particleCount:1,startVelocity:0,ticks:t,origin:{x:Math.random(),y:Math.random()*skew-.2},colors:["#00008b"],shapes:["circle"],gravity:randomInRange(.4,.6),scalar:randomInRange(.4,1),drift:randomInRange(-.4,.4)}
241),n>0&&requestAnimationFrame(a)}();} 242var snowpurple=function(){var duration= 15 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,animationEnd=Date.now()+duration,skew=1;function randomInRange(a,n){return Math.random()*(n-a)+a}!function a(){var n=animationEnd-Date.now(),t=Math.max(200,n/duration*500);skew=Math.max(.8,skew-.001),confetti({particleCount:1,startVelocity:0,ticks:t,origin:{x:Math.random(),y:Math.random()*skew-.2},colors:["#800080"],shapes:["circle"],gravity:randomInRange(.4,.6),scalar:randomInRange(.4,1),drift:randomInRange(-.4,.4)}),n>0&&requestAnimationFrame(a)}();} 243var snowpink=function(){var duration= 15 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,animationEnd=Date.now()+duration,skew=1;function randomInRange(a,n){return Math.random()*(n-a)+a}!function a(){var n=animationEnd-Date.now(),t=Math.max(200,n/duration*500);skew=Math.max(.8,skew-.001),confetti({particleCount:1,startVelocity:0,ticks:t,origin:{x:Math.random(),y:Math.random()*skew-.2},colors:["#e75480"],shapes:["circle"],gravity:randomInRange(.4,.6),scalar:randomInRange(.4,1),drift:randomInRange(-.4,.4)}),n>0&&requestAnimationFrame(a)}();} 244var snowrainbow=function(){var duration= 15 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,animationEnd=Date.now()+duration,skew=1;function randomInRange(a,n){return Math.random()*(n-a)+a}!function a(){var n=animationEnd-Date.now(),t=Math.max(200,n/duration*500);skew=Math.max(.8,skew-.001),confettisaucy({particleCount:1,startVelocity:0,ticks:t,origin:{x:Math.random(),y:Math.random()*skew-.2},colors:["#ffffff"],shapes:["circle"],gravity:randomInRange(.4,.6),scalar:randomInRange(.4,1),drift:randomInRange(-.4,.4)}),n>0&&requestAnimationFrame(a)}();} 245 246 247 248 249 250 251 252 253var confettistop = function() { 254 confetti({particleCount:0}); 255 document.querySelector("confetti").style.display="none"; 256 document.getElementById('canvas').style.height = "0px"; 257}; 258 259 260var settings = function() { 261 $("#hamburger").click() 262 }; 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284// Commands List 285 286if (annyang) { 287 288 //add commands 289 var commands = { 290 'hey saucy *tag' : search, 291 'okay saucy *tag' : search, 292 293 'search': saucysearching, 294 'lets go': saucysearching, 295 296 'type *tag': saucytype, 297 298 'quick actions': saucyquickactions, 299 'quick': saucyquickactions, 300 'actions': saucyquickactions, 301 'fast': saucyquickactions, 302 'speed': saucyquickactions, 303 'lightning': saucyquickactions, 304 305 'preset one': presets1, 306 'preset two': presets2, 307 'preset three': presets3, 308 'preset four': presets4, 309 310 311 312 'subscribe daily': daily, 313 'sub daily': daily, 314 'subscribe weekly': weekly, 315 'sub weekly': weekly, 316 'subscribe monthly': monthly, 317 'sub monthly': monthly, 318 319 'hide' : hidenavigation, 320 'hide saucy' : hidenavigation, 321 'hide nav' : hidenavigation, 322 'show' : shownavigation, 323 'show saucy' : shownavigation, 324 'show navigation' : shownavigation, 325 'show nav' : shownavigation, 326 327 'settings' : settings, 328 'open settings' : settings, 329 'customize' : settings, 330 'reset' : saucyreset, 331 'reset settings' : saucyreset, 332 'reset saucy' : saucyreset, 333 334 335 'scroll down': scrollDownPage, 336 'scroll up': scrollUpPage, 337 338 'test': photosaucy, 339 340 341 342 'confetti': confettidefault, 343 'confetti black': confettiblack, 344 'confetti white': confettiwhite, 345 'confetti red': confettired, 346 'confetti orange': confettiorange, 347 'confetti yellow': confettiyellow, 348 'confetti green': confettigreen, 349 'confetti blue': confettiblue, 350 'confetti purple': confettipurple, 351 'confetti pink': confettipink, 352 353 354 355 356 'snow': snowdefault, 357 'snow black': snowblack, 358 'snow red': snowred, 359 'snow orange': snoworange, 360 'snow yellow': snowyellow, 361 'snow green': snowgreen, 362 'snow blue': snowblue, 363 'snow purple': snowpurple, 364 'snow pink': snowpink, 365 'snow rainbow': snowrainbow, 366 367 'fireworks': fireworksdefault, 368 'fireworks black': fireworksblack, 369 'fireworks white': fireworkswhite, 370 'fireworks red': fireworksred, 371 'fireworks orange': fireworksorange, 372 'fireworks yellow': fireworksyellow, 373 'fireworks green': fireworksgreen, 374 'fireworks blue': fireworksblue, 375 'fireworks purple': fireworkspurple, 376 'fireworks pink': fireworkspink, 377 378 'confetti stop': confettistop, 379 380 381 382 383 384 385 386 387 388 }; 389 390 var notConnected = function () { 391 console.log('not connected'); 392 } 393 394 // OPTIONAL: activate debug mode for detailed logging in the console 395 annyang.debug(); 396 397 // Add some commands 398 annyang.addCommands(commands); 399 400 // Set language 401 annyang.setLanguage('en'); 402 403 // Start listening. 404 annyang.start(); 405 406 annyang.addCallback('error', function (error) { 407 console.log('There was an error during speech recognition==>'+JSON.stringify(error)); 408 }); 409
410 annyang.addCallback('resultMatch', function (userSaid, 411 commandText, phrases) { 412 console.log("commandText==>" + commandText); 413 }); 414 415 // pass local context to a global function called notConnected 416 annyang.addCallback('errorNetwork', notConnected, this); 417 418}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.