{"id":364118,"date":"2022-03-28T11:15:41","date_gmt":"2022-03-28T18:15:41","guid":{"rendered":"https:\/\/css-tricks.com\/?p=364118"},"modified":"2022-03-28T11:15:43","modified_gmt":"2022-03-28T18:15:43","slug":"web-development-bookmarklets","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/web-development-bookmarklets\/","title":{"rendered":"6 Useful Bookmarklets to Boost Web Development"},"content":{"rendered":"\n

A bookmarklet is a JavaScript-based bookmark that adds to a web browser. I\u2019d like to show you some awesome web browser hacks to aid your web development workflow and how to convert those hacks into time-saving bookmarklets.<\/p>\n\n\n\n\n\n\n

    \n
  1. \nActivating design mode<\/a><\/li>
  2. \nApplying a background to everything<\/a><\/li>
  3. \nSimulating events<\/a><\/li>
  4. \nSetting cookies<\/a><\/li>
  5. \nToggling classes<\/a><\/li>
  6. \nColor widget bookmark<\/a><\/li>
  7. \nWhat other bookmarklets can you think of?<\/a><\/li><\/ol>\n\n

    Activating design mode<\/h3>\n\n\n

    Design mode (styled as designMode<\/code> since it\u2019s a JavaScript property<\/em>) is for who like to experiment with variations of copy on a live website. For example, copywriters who like to observe how content reads within the flow of the website\u2019s design, or, say, designers who want to ensure that text fits comfortably within a certain space at a certain font size.<\/p>\n\n\n\n

    JavaScript has a mightily simple feature that can render an entire HTML document editable. It works exactly<\/em> like HTML\u2019s contenteditable=\"true\"<\/code> name-value attribute (or contentEditable=\"true\"<\/code> in JavaScript) but for the whole document. If you\u2019d like to see how it works, start by entering the browser\u2019s console using the relevant keyboard shortcut:<\/p>\n\n\n\n