SHARE
TWEET

Untitled

a guest Oct 3rd, 2012 30 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getImgWeight(post) {
  2.         var inf = $c(aib.cFileInfo, post).textContent.match(/\d+[\.\d\smkк]*[bб]/i)[0],
  3.                 w = parseFloat(inf.match(/[\d\.]+/));
  4.         if(/MB/.test(inf)) {
  5.                 w = w * 1e3;
  6.         }
  7.         if(/\d\s*B/.test(inf)) {
  8.                 w = (w / 1e3).toFixed(2);
  9.         }
  10.         return +w;
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top