Last active
August 29, 2015 14:02
-
-
Save pdebelak/09e6f27f55463a09113b to your computer and use it in GitHub Desktop.
Way to find all elements on a page with a negative text-indent value for Dan Yoachim
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 find_lefts() { | |
var all = document.getElementsByTagName('*'); | |
var left_elements = []; | |
for (var i=0;i<all.length;i++) { | |
ti = window.getComputedStyle(all[i]).getPropertyValue('text-indent'); | |
if (ti.match(/-/)) { | |
left_elements.push(all[i]); | |
} | |
} | |
return left_elements; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment