Subscribe for updates and more.

JavaScript Bookmarklets

Planted 02021-01-19

A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands that add new features to the browser.

Want to save JavaScript into a bookmarklet? Use Coles Bookmarklet Creator.

My Bookmarklets

Test them out by clicking the links. To use them anywhere simply drag the links to your bookmark bar.

Docs view toggles a Google doc between ‘edit’ and ‘preview’.

javascript:(function() {
  let path = window.location.pathname;
  if (path.endsWith('/edit')) {
    path = path.replace('/edit', '/preview');
  } else if (path.endsWith('/preview')) {
    path = path.replace('/preview', '/edit');
  }
  window.location.pathname = path;
})();

Remove URL Parameters removes URL parameters and copies the URL to the clipboard.

Word Counter returns an alert with the word count of text you’ve selected.

Lorem Ipsum turns all text on the page into lorem ipsum text.

Reveal Bullshit is a best-of-breed, mission-critical enterprise JavaScript bookmarklet that will empower you to evaluate the high impact of market-driven text on any Web resource, cultivating process-centric innovation and out-of-the-box thinking.

ANDI is ANDI is an open source project created by the Accessible Solutions Branch of the Social Security Administration to test websites for accessibility.

Link to official page for Reveal Bullshit and Link to official page for ANDI.

ct.css

Take a look inside your <head> with ct.css.