Kashub's Code Barn - "lol"

podświetlone jako qbasic (dodał(a) lol @ 2011-01-10 14:06:20)

Twoja wyszukiwarka
Podświetl ten kod w:
Ostatnio dodane:
Losowe wpisy:
(FUNCTION(a){var c=(a.browser.msie?"paste":"input")+".mask";var b=(WINDOW.orientation!=undefined);a.mask={definitions:{"9":"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9ąćęłńóśźżĄĆĘŁŃÓŚŹŻ]"}};a.FN.extend({caret:FUNCTION(e,f){IF(this.length==0){RETURN}IF(typeof e=="number"){f=(typeof f=="number")?f:e;RETURN this.each(FUNCTION(){IF(this.setSelectionRange){this.focus();this.setSelectionRange(e,f)}ELSE{IF(this.createTextRange){var g=this.createTextRange();g.collapse(true);g.moveEnd("character",f);g.moveStart("character",e);g.SELECT()}}})}ELSE{IF(this[0].setSelectionRange){e=this[0].selectionStart;f=this[0].selectionEnd}ELSE{IF(document.selection&&document.selection.createRange){var d=document.selection.createRange();e=0-d.duplicate().moveStart("character",-100000);f=e+d.text.length}}RETURN{begin:e,END:f}}},unmask:FUNCTION(){RETURN this.trigger("unmask")},mask:FUNCTION(j,d){IF(!j&&this.length>0){var f=a(this[0]);var g=f.DATA("tests");RETURN a.map(f.DATA("buffer"),FUNCTION(l,m){RETURN g[m]?l:null}).join("")}d=a.extend({placeholder:"_",completed:null},d);var k=a.mask.definitions;var g=[];var e=j.length;var i=null;var h=j.length;a.each(j.split(""),FUNCTION(m,l){IF(l=="?"){h--;e=m}ELSE{IF(k[l]){g.push(new RegExp(k[l]));IF(i==null){i=g.length-1}}ELSE{g.push(null)}}});RETURN this.each(FUNCTION(){var r=a(this);var m=a.map(j.split(""),FUNCTION(x,y){IF(x!="?"){RETURN k[x]?d.placeholder:x}});var n=false;var q=r.VAL();r.DATA("buffer",m).DATA("tests",g);FUNCTION v(x){WHILE(++x<=h&&!g[x]){}RETURN x}FUNCTION t(x){WHILE(!g[x]&&--x>=0){}FOR(var y=x;y<h;y++){IF(g[y]){m[y]=d.placeholder;var z=v(y);IF(z<h&&g[y].test(m[z])){m[y]=m[z]}ELSE{break}}}s();r.caret(Math.max(i,x))}FUNCTION u(y){FOR(var A=y,z=d.placeholder;A<h;A++){IF(g[A]){var B=v(A);var x=m[A];m[A]=z;IF(B<h&&g[B].test(x)){z=x}ELSE{break}}}}FUNCTION l(y){var x=a(this).caret();var z=y.keyCode;n=(z<16||(z>16&&z<32)||(z>32&&z<41));IF((x.begin-x.END)!=0&&(!n||z==8||z==46)){w(x.begin,x.END)}IF(z==8||z==46||(b&&z==127)){t(x.begin+(z==46?0:-1));RETURN false}ELSE{IF(z==27){r.VAL(q);r.caret(0,p());RETURN false}}}FUNCTION o(B){IF(n){n=false;RETURN(B.keyCode==8)?false:null}B=B||WINDOW.event;var C=B.charCode||B.keyCode||B.which;var z=a(this).caret();IF(B.ctrlKey||B.altKey||B.metaKey){RETURN true}ELSE{IF((C>=32&&C<=125)||C>186){var x=v(z.begin-1);IF(x<h){var A=STRING.fromCharCode(C);IF(g[x].test(A)){u(x);m[x]=A;s();var y=v(x);a(this).caret(y);IF(d.completed&&y==h){d.completed.CALL(r)}}}}}RETURN false}FUNCTION w(x,y){FOR(var z=x;z<y&&z<h;z++){IF(g[z]){m[z]=d.placeholder}}}FUNCTION s(){RETURN r.VAL(m.join("")).VAL()}FUNCTION p(y){var z=r.VAL();var C=-1;FOR(var B=0,x=0;B<h;B++){IF(g[B]){m[B]=d.placeholder;WHILE(x++<z.length){var A=z.charAt(x-1);IF(g[B].test(A)){m[B]=A;C=B;break}}IF(x>z.length){break}}ELSE{IF(m[B]==z[x]&&B!=e){x++;C=B}}}IF(!y&&C+1<e){/*r.VAL("");w(0,h)*/}ELSE{IF(y||C+1>=e){s();IF(!y){r.VAL(r.VAL().substring(0,C+1))}}}RETURN(e?B:i)}IF(!r.attr("readonly")){r.one("unmask",FUNCTION(){r.unbind(".mask").removeData("buffer").removeData("tests")}).bind("focus.mask",function(){q=r.val();var x=p();s();setTimeout(function(){if(x==j.length){r.caret(0,x)}else{r.caret(x)}},0)}).bind("blur.mask",function(){p();if(r.val()!=q){r.change()}}).bind("keydown.mask",l).bind("keypress.mask",o).bind(c,function(){setTimeout(function(){r.caret(p(true))},0)})}p()})}})})(jQuery);
| Katalog Sklepów internetowych | | Foteliki samochodowe | | Sklep z oponami | | Dyskretny sexshop internetowy | | Sklep z artykułami dla zwierząt | | Skróć link | | Blogi za darmo | | Skróć link | | Gnieżdżewo |