Last active
December 25, 2015 15:39
-
-
Save designfrontier/6999515 to your computer and use it in GitHub Desktop.
line length marker now with Jquery inclusion built in
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
javascript:!function(){var a=document.createElement("script"),b=function(){var a=$("p"),b=0,c="",d="";for(b=0;b<a.length;b++)c=$(a[b]).text(),d=c.slice(0,45)+"*"+c.slice(45,70)+"*"+c.slice(70),$(a[b]).text(d)};a.src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js",document.getElementsByTagName("head")[0].appendChild(a),setTimeout(b,500)}(); |
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
javascript:!function(){ | |
var jq = document.createElement('script') | |
, insertMarkers = function(){ | |
var a=$("p") | |
,b=0 | |
,c="" | |
,d=""; | |
for(b=0;b<a.length;b++){c=$(a[b]).text(),d=c.slice(0,45)+"*"+c.slice(45,70)+"*"+c.slice(70),$(a[b]).text(d)}; | |
}; | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
setTimeout(insertMarkers, 500); | |
}(); |
turned it into a link so you can grab either revision one (the raw js) or revision two (the link version)
Paste the code as the URL for your bookmark in the bookmark bar of your browser and then you can use it on any site. Requires jQuery at the moment.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A quick and dirty script to put line length flags (*) in all the paragraphs on a page for working with responsive breakpoints.