CNPJ Generator Bookmarklet

It generates valid CNPJ document with random numbers and display it for you. If jQuery is present on page and have focused element, the bookmarklet fills it.

Source (dgmike.com.br)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3A%28function%28%29%7Bfunction%20randomize%28n%29%7Bvar%20ranNum%3DMath.round%28Math.random%28%29*n%29%3Breturn%20ranNum%3B%7Dfunction%20mod%28dividend%2Cdivisor%29%7Breturn%20Math.round%28dividend-%28Math.floor%28dividend/divisor%29*divisor%29%29%3B%7Dvar%20dotted%3Dtrue%3Bvar%20n%3D9%3Bvar%20n1%3Drandomize%28n%29%3Bvar%20n2%3Drandomize%28n%29%3Bvar%20n3%3Drandomize%28n%29%3Bvar%20n4%3Drandomize%28n%29%3Bvar%20n5%3Drandomize%28n%29%3Bvar%20n6%3Drandomize%28n%29%3Bvar%20n7%3Drandomize%28n%29%3Bvar%20n8%3Drandomize%28n%29%3Bvar%20n9%3D0%3Bvar%20n10%3D0%3Bvar%20n11%3D0%3Bvar%20n12%3D1%3Bvar%20d1%3Dn12*2+n11*3+n10*4+n9*5+n8*6+n7*7+n6*8+n5*9+n4*2+n3*3+n2*4+n1*5%3Bd1%3D11-%28mod%28d1%2C11%29%29%3Bif%28d1%3E%3D10%29d1%3D0%3Bvar%20d2%3Dd1*2+n12*3+n11*4+n10*5+n9*6+n8*7+n7*8+n6*9+n5*2+n4*3+n3*4+n2*5+n1*6%3Bd2%3D11-%28mod%28d2%2C11%29%29%3Bif%28d2%3E%3D10%29d2%3D0%3Bcnpj%3D%27%27+n1+n2+%27.%27+n3+n4+n5+%27.%27+n6+n7+n8+%27/%27+n9+n10+n11+n12+%27-%27+d1+d2+%27%5Cn%27%3Bcnpj+%3D%27%27+n1+n2+n3+n4+n5+n6+n7+n8+n9+n10+n11+n12+d1+d2%3BsetTimeout%28function%28%29%7Bif%28jQuery%26%26jQuery%28%27input%3Afocus%27%29.size%28%29%29%7Bvar%20elm%3DjQuery%28%27input%3Afocus%27%29%3Belm.val%28%27%27+n1+n2+n3+n4+n5+n6+n7+n8+n9+n10+n11+n12+d1+d2%29%3Belm.keyup%28%29%3Belm.change%28%29%3Bif%28fv%3Delm.parents%28%27form%27%29.data%28%27formValidation%27%29%29fv.revalidateField%28elm%29%7Delse%7Balert%28cnpj%29%3B%7D%7D%2C10%29%3B%7D%29%28%29%3B


Rate it:


Tags:

Comments

Comments so far. Add yours.