- #
Remove dashes in numbers

Script key: Remove dashes in numbers

Posted by @sammyjojo

Install

Details

Label - #
Voice Over Remove dashes in numbers
Script
"undefined"===typeof String.prototype.a&&(String.prototype.a=function(c,b){for(var a;a=c.exec(this);)matchedString=a[0],b(a.index,matchedString.length,matchedString)});"undefined"===typeof String.prototype.c&&(String.prototype.c=function(c,b,a,d){"undefined"===typeof d&&(d=this.length);this.slice(a,d-a).a(c,function(c,d,f){b(c+a,d,f)})});"undefined"===typeof String.prototype.b&&(String.prototype.b=function(c,b,a){void 0===typeof a&&(a=this.length);return this.slice(0,b)+c+this.slice(a)});
function g(c,b,a){this.index=c;this.length=b;this.d=a}(function(){var c,b=getSelectedText();""!=b?c=setSelectedText:(b=getText(),c=setText);var a=[];b.a(/[0-9]+-([0-9]+-?)+/g,function(b,c,d){(d=d.replace(/-/g,""))&&a.push(new g(b,c,d))});if(0<a.length){for(var d=0;d<a.length;++d)var e=a[d],b=b.b(e.d,e.index,e.index+e.length);c(b)}})();

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus