Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getImgWeight(post) {
- var inf = $c(aib.cFileInfo, post).textContent.match(/\d+[\.\d\smkк]*[bб]/i)[0],
- w = parseFloat(inf.match(/[\d\.]+/));
- if(/MB/.test(inf)) {
- w = w * 1e3;
- }
- if(/\d\s*B/.test(inf)) {
- w = (w / 1e3).toFixed(2);
- }
- return +w;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement