-
-
Save influxweb/a2d946afcbdc8bab9e8edc7d95d1d4f1 to your computer and use it in GitHub Desktop.
Revisions
-
cuth revised this gist
Jul 11, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,12 +3,12 @@ ```js (function (d) { var w = d.documentElement.offsetWidth, t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT), b; while (t.nextNode()) { b = t.currentNode.getBoundingClientRect(); if (b.right > w || b.left < 0) { t.currentNode.style.setProperty('outline', '1px dotted red', 'important'); console.log(t.currentNode); } }; -
cuth revised this gist
Jul 10, 2014 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,9 +3,11 @@ ```js (function (d) { var w = d.documentElement.offsetWidth, t = d.createTreeWalker(d.body,NodeFilter.SHOW_ELEMENT), b; while (t.nextNode()) { b = t.currentNode.getBoundingClientRect(); if (b.right > w || b.left < 0) { t.currentNode.style.setProperty('outline','1px dotted red','important'); console.log(t.currentNode); } @@ -16,5 +18,5 @@ Bookmarklet ``` javascript:(function(d){var w=d.documentElement.offsetWidth,t=d.createTreeWalker(d.body,NodeFilter.SHOW_ELEMENT),b;while(t.nextNode()){b=t.currentNode.getBoundingClientRect();if(b.right>w||b.left<0){t.currentNode.style.setProperty('outline','1px dotted red','important');console.log(t.currentNode);}};}(document)); ``` -
cuth revised this gist
Jul 9, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ (function (d) { var w = d.documentElement.offsetWidth, t = d.createTreeWalker(d.body); while (t.nextNode()) { if (t.currentNode.offsetWidth > w) { t.currentNode.style.setProperty('outline','1px dotted red','important'); console.log(t.currentNode); -
cuth revised this gist
Jul 9, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ t = d.createTreeWalker(d.body); while(t.nextNode()) { if (t.currentNode.offsetWidth > w) { t.currentNode.style.setProperty('outline','1px dotted red','important'); console.log(t.currentNode); } }; @@ -16,5 +16,5 @@ Bookmarklet ``` javascript:(function(d){var w=d.documentElement.offsetWidth,t=d.createTreeWalker(d.body);while(t.nextNode()){if(t.currentNode.offsetWidth > w){t.currentNode.style.setProperty('outline','1px dotted red','important');console.log(t.currentNode);}};}(document)); ``` -
cuth revised this gist
Jul 9, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ t = d.createTreeWalker(d.body); while(t.nextNode()) { if (t.currentNode.offsetWidth > w) { t.currentNode.style.outline = '1px dotted red !important'; console.log(t.currentNode); } }; @@ -16,5 +16,5 @@ Bookmarklet ``` javascript:(function(d){var w=d.documentElement.offsetWidth,t=d.createTreeWalker(d.body);while(t.nextNode()){if(t.currentNode.offsetWidth > w){t.currentNode.style.outline='1px dotted red !important';console.log(t.currentNode);}};}(document)); ``` -
cuth revised this gist
Jul 9, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ t = d.createTreeWalker(d.body); while(t.nextNode()) { if (t.currentNode.offsetWidth > w) { t.currentNode.style.outline = '1px dotted red'; console.log(t.currentNode); } }; @@ -15,5 +16,5 @@ Bookmarklet ``` javascript:(function(d){var w=d.documentElement.offsetWidth,t=d.createTreeWalker(d.body);while(t.nextNode()){if(t.currentNode.offsetWidth > w){t.currentNode.style.outline='1px dotted red';console.log(t.currentNode);}};}(document)); ``` -
cuth revised this gist
Jul 9, 2014 . 1 changed file with 14 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,19 @@ # Debug Horizontal Scroll ```js (function (d) { var w = d.documentElement.offsetWidth, t = d.createTreeWalker(d.body); while(t.nextNode()) { if (t.currentNode.offsetWidth > w) { console.log(t.currentNode); } }; }(document)); ``` Bookmarklet ``` javascript:(function(d){var w=d.documentElement.offsetWidth,t=d.createTreeWalker(d.body);while(t.nextNode()){if(t.currentNode.offsetWidth > w){console.log(t.currentNode);}};}(document)); ``` -
cuth created this gist
Jul 9, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ # Debug Horizontal Scroll ```js var docWidth = document.documentElement.offsetWidth, treeWalker = document.createTreeWalker(document.body); while(treeWalker.nextNode()) { if (treeWalker.currentNode.offsetWidth > docWidth) { console.log(treeWalker.currentNode); } }; ```