Created
November 30, 2018 05:29
-
-
Save patrickkettner/6e691666446ed120d4341bf86623e7c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(a) { | |
if (!a) return 0; | |
var b = s_ed("div"); | |
b.style.position = "absolute"; | |
b.style.whiteSpace = "pre"; | |
b.style.font = "16px arial,sans-serif"; | |
a = s_OH(a); | |
s_Rc(b, a); | |
document.body.appendChild(b); | |
a = Math.round(b.offsetWidth); | |
document.body.removeChild(b); | |
return a | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment