This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ! function() { | |
| var s = document.createElement("script"); | |
| s.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js", | |
| s.type = "text/javascript", | |
| s.addEventListener("load", function() { | |
| // your jquery code goes here! | |
| // don't forget to minify: http://jscompress.com/ | |
| }), | |
| document.getElementsByTagName("body")[0].appendChild(s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function numberWithCommas(x) { | |
| return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String.prototype.replaceAll = function(search, replacement) { | |
| var target = this; | |
| return target.replace(new RegExp(search, 'g'), replacement); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String.prototype.repeat||(String.prototype.repeat=function(t){"use strict";if(null==this)throw new TypeError("can't convert "+this+" to object");var r=""+this;if(t=+t,t!=t&&(t=0),0>t)throw new RangeError("repeat count must be non-negative");if(t==1/0)throw new RangeError("repeat count must be less than infinity");if(t=Math.floor(t),0==r.length||0==t)return"";if(r.length*t>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var e="";1==(1&t)&&(e+=r),t>>>=1,0!=t;)r+=r;return e}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function validateEmail(email) { | |
| var re = /^([\w\.\-_]+)?\w+@[\w-_]+(\.\w+){1,}$/igm; | |
| return re.test(email); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.wait = function(delay, context){ | |
| var deferred = $.Deferred(); | |
| var timer = setTimeout(function(){ | |
| deferred.resolveWith(context || deferred); | |
| }, delay); | |
| deferred.fail(function(){ | |
| clearTimeout(timer); | |
| }); | |
| return deferred; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getSearchParameters() { // return site URL parameters as an Object | |
| var prmstr = decodeURIComponent(window.location.search.substr(1)); | |
| console.log(prmstr); | |
| if (prmstr) { | |
| var params = {}; | |
| var prmarr = prmstr.split("&"); | |
| for ( var i = 0; i < prmarr.length; i++) { | |
| var tmparr = prmarr[i].split("="); | |
| params[tmparr[0]] = tmparr[1]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var rounds = $('.section.euro_main_table .rounds .round'); | |
| // tabs | |
| $('.section.euro_main_table .tabs .tab').each(function(index, value) { | |
| $(this).on('click.tab', function() { | |
| // console.log(index); | |
| $(this).addClass('active').siblings().removeClass('active'); | |
| rounds[index] && rounds.removeClass('active').eq(index).addClass('active'); | |
| }); | |
| }); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| $( window ).load(function() { | |
| function mediaSize() { | |
| var w = $(this).outerWidth(); | |
| if (w >= 1200) { | |
| return 'lg'; | |
| } else if (w >= 992 && w < 1200) { | |
| return 'md'; | |
| } else if (w >= 768 && w < 992) { | |
| return 'sm'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Dear maintainer: | |
| // When I wrote this code, only I and God | |
| // knew what it was. | |
| // Now, only God knows! | |
| // So if you are done trying to 'optimize' | |
| // this routine (and failed), | |
| // please increment the following counter | |
| // as a warning to the next guy: |