Skip to content

Instantly share code, notes, and snippets.

@designfrontier
Last active December 25, 2015 15:39
Show Gist options
  • Save designfrontier/6999515 to your computer and use it in GitHub Desktop.
Save designfrontier/6999515 to your computer and use it in GitHub Desktop.
line length marker now with Jquery inclusion built in
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)}();
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);
}();
@designfrontier
Copy link
Author

A quick and dirty script to put line length flags (*) in all the paragraphs on a page for working with responsive breakpoints.

@designfrontier
Copy link
Author

turned it into a link so you can grab either revision one (the raw js) or revision two (the link version)

@designfrontier
Copy link
Author

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