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
| /* | |
| Display value with ::after (CSS) | |
| input[type="range"] {position: relative} | |
| input[type="range"]::after { | |
| content: attr(value); | |
| position: absolute; | |
| left: 105%; | |
| top: 0; | |
| color: #555 |
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 debug = true; | |
| function trace(o, message){ | |
| if(navigator.userAgent.indexOf('MSIE') >= 0) { | |
| return false; | |
| } | |
| if(debug){ | |
| if(message) console.group(message); | |
| if(o instanceof Array){ |
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
| for i in * ; do uglifyjs $i -m -o "$(echo $i | cut -d . -f 1).min.js" ; done |
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
| alert(([{}][-1] + "")[4] + ([{}][3] + "")[~-1]+ ([{}][3] + "")[~-1]+ ([{}][3] + "")[~-1]+ ([{}][3] + "")[~-1]+ ([{}][3] + "")[~-1]+ ([{}][3] + "")[~-1]+ ([{}][3] + "")[~-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
| /usr/bin/gnome-session-quit --no-prompt |
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 rgb2Hex = function(r) { | |
| var t = "#", n = r.split("(")[1].split(")")[0].split(","); | |
| t += parseInt(n[0]).toString(16) + parseInt(n[1]).toString(16) + parseInt(n[2]).toString(16); | |
| return t | |
| } |
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 toggle = function (r,className1) { | |
| var regex = new RegExp("(?:^|\\s+)" + className1 + "(?:\\s+|$)"); | |
| r.className = (regex.test(r.className)) ? r.className.replace(regex," ") : r.className + ' '+className1; | |
| return r.className; | |
| }; | |
| var changeClass = function (r,className1,className2) { | |
| var regex = new RegExp("(?:^|\\s+)" + className1 + "(?:\\s+|$)"); | |
| if( regex.test(r.className) ) { |
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.trim=function(){return this.replace(/^\s\s*/, '').replace(/\s\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
| var color = { | |
| rgb : function() { | |
| var color = [Math.floor(Math.random()*256),Math.floor(Math.random()*256),Math.floor(Math.random()*256)]; | |
| return 'rgb('+color.join(',')+')'; | |
| }, | |
| rgb2Hex : function(color) { | |
| var hex = "#", | |
| c = color.split('(')[1].split(')')[0].split(','); | |
| hex += parseInt(c[0]).toString(16)+parseInt(c[1]).toString(16)+parseInt(c[2]).toString(16); |
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 ucFirst(string) { | |
| return string.charAt().toUpperCase() + string.slice(1); | |
| } | |
| /* | |
| ucFirst('bonjour') => Bonjour | |
| */ |
OlderNewer