/^(d*([.,](?=d{3}))?d+)+((?!\2)(?R)(?1)\K\R\n\r[a-z\d])[.,]dd)?$/
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
| // ==UserScript== | |
| // @name JamExchange Player | |
| // @namespace jamexchange | |
| // @description JamExchange Room @SO Live Radio like Player with "User Requests" (YoutTube only) | |
| // @include http://chat.stackoverflow.com/rooms/39426/* | |
| // @version 1.1.0 | |
| // @grant none | |
| // ==/UserScript== | |
| /* |
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
| javascript:(function(){$(".answer").each(function(i,n){if(n.id!==('answer'+document.location.hash).replace(/#/,'-'))n.style.display="none"})})() |
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 hashCode(str) { | |
| var hash = 0; | |
| str += '!'; | |
| for (var i = 0; i < str.length; i++) { | |
| hash = str.charCodeAt(i) + ((hash << 5) - hash); | |
| } | |
| return -hash; | |
| } | |
| function colorCode(i) { | |
| return '#' + (Math.min((i >> 24) & 0xFF, 200).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 setContrast(rgb, perc) | |
| { | |
| perc = perc / 100; | |
| ret = {} | |
| Object.keys(rgb).map(function(v) { | |
| col = rgb[v]; | |
| if (perc <= 0) { | |
| col += (col - 128) * perc; // ---> 128 | |
| } else { | |
| if (col < 128) { |
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 setContrast(rgb, perc) | |
| { | |
| ret = {} | |
| Object.keys(rgb).map(function(v) { | |
| col = rgb[v]; | |
| if (perc <= 0) { | |
| col += (col - 128) * perc / 100; // ---> 128 | |
| } else { | |
| if (col < 128) { | |
| //bad start |
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
| /* | |
| * @param rgb = Object {r, g, b} | |
| * @param percent = int (-100 to 100) | |
| */ | |
| function shadeColorTone(rgb, percent) | |
| { | |
| perc = 1 + percent / 100; | |
| ret = {} | |
| Object.keys(rgb).map(function(v) { | |
| col = rgb[v]; |
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
| Number.prototype.fee=function(fee){return /%$/.test(fee)?this-this*parseInt(fee)/100:this-fee} | |
| /* | |
| // 5 off | |
| parseInt('100').fee(5) | |
| // 15% off |
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.abbr = function() {return this.replace(/[aeiou]+/g,'')}; | |
| //eg: | |
| 'people'.abbr() |
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
| document.body.removeChild(document.querySelector('.blogger-clickTrap')) |
NewerOlder