Here’s my problem. I would like to set up a JavaScript Bookmarklet to automatically copy x-lines from a webpage and post it with a Markdown link to MarsEdit.

Here is my list of resources:

Daring Fireball: JavaScript Bookmarklet Builder



div class=”summary”>JavaScript Bookmarklet Builder
So a bookmarklet is a little JavaScript script that’s intended to be run from a web browser’s bookmarks bar or menu. The reason they work as “bookmarks” is that the JavaScript source code is crammed into the form of a URL using the “javascript:” scheme
Developing or modifying bookmarklets can be irritating, to say the least, because of this requirement that the JavaScript code be in the form of a URL
For example, here’s a simple bit of JavaScript that (1) gets the title of the current web page; (2) shows an alert dialog with the title in all caps with an exclamation mark at the end
var str = document.title; alert(str.toUpperCase() + "!");Pretty simple. But that same script, in the form of a bookmarklet, looks like this (all on one line
javascript:var%20str%20=%20document.title; alert(str.toUpperCase()%20+%20%22!%22);In addition to removing line breaks, spaces need to be escaped ( %20 ), and it’s a good idea to escape single- and double-quotes, too. 1 You also need to escape non-ASCII…
So the problem developing bookmarklets is this: You want to write and edit normal JavaScript code, but you need to publish hard-to-read URLs
My solution: A “Make Bookmarklet” Perl script that I run as a BBEdit filter that (1) takes as input a file containing JavaScript source code; (2) creates a bookmarklet URL from that source code; and then (3) places the bookmarklet code in a comment at the…
So, for example, given this trivial JavaScript
var str = document.title; alert(str);My “Make Bookmarklet” script will return

Creating a Javascript Bookmarklet – Tech.pro



div class=”summary”>JavaScript HTML
Creating a Javascript Bookmarklet
For nearly all problems there are probably a hundred different solutions. Recently one solution I have chosen for a few problems has been a Javascript bookmarklet. A bookmarklet is a regular bookmark that runs a bit of Javascript code instead of just…
The bookmarklet today is going to grab a super high-res photo of Amazon Products. Ok, let me explain a little bit more. So, a designer co-worker uses super high-res product images for design mockups. Well, he typically would go scouring the internet for…
a href="/tutorials">SOTC Tutorials</a>So if we were going to do something javascript we could do something like
a href="javascript:location.href=’http://switchonthecode.com/tutorials‘">SOTC Tutorials</a>Now, that just covers the basics of the syntax we are going to use for this. You can see above that to tell the browser to run our
hrefas Javascript we need to start with
javascript:. Ok so let’s jump to something a bit more complicated. The next piece of Javascript is going create an alert with the current time – I know we all love alerts
a href="javascript:(function(){ct=new Date();t=ct.getHours()+’:’+ct.getMinutes();alert(t);})();">Current Time</a>Looking at the code we start by creating anonymous function and inside the function we create a new
So, now if you want to make this a Bookmarklet simply do one of two things

JavaScript Interpreter Bookmarklet



div class=”summary”>JavaScript Interpreter Bookmarklet
Question: Can I have a bookmarklet with the JavaScript interpreter
Answer: Yes. In fact, some JS programmers find that a JavaScript interpreter bookmarklet is very useful. Not only it allows to execute a line of JavaScript code on-the-fly – it also helps you check the state of any variable in your code while viewing your…
To get the JavaScript interpreter prompt, click on the above hyperlink
To add the JavaScript interpreter to your bookmarks, right-click on the hyperlink and choose Add bookmark or Add to Favorites (depending on your browser
This bookmarklet has been tested with both NS4 and MSIE4

JavaScript Bookmarklets



div class=”summary”>Why bother with JavaScript
JavaScript Games #2 – Solitaire
Writing a midi hifi system in JavaScript
JavaScript Beginners Start Here
JavaScript Games
Online JavaScript Resources
JavaScript Bookmarklets
You are here: irt.org | Articles | JavaScript | Miscellaneous | JavaScript Bookmarklets [ previous next
Why not simply bookmark the JavaScript URL
Here is something novel: using JavaScript to make your web experience more enjoyable, when you decide, and with what you want to do – rather than site specific JavaScript code that performs what the web author wants to do

Bookmarklet Creator with Script Includer – Peter Coles



div class=”summary”>Bookmarklet Creator with Script Includer
Enter your javascript code here
Convert to bookmarklet
Why have a bookmarklet creator
I think bookmarklets are great! However, it’s a pain to smoosh your JavaScript into one line and properly URI encode everything. It’s even more of a pain if you want to rely on external scripts in your bookmarklet. Fortunately, I have just packaged all of…
Enter your JavaScript code
Create your bookmarklet
width= "61" height= "16" border= "0" alt= "Cornify" /> </a> <script type= "text/javascript
src= "http://www.cornify.com/js/cornify.js" ></script> Even though they provide a bookmarklet elsewhere on that page, let’s use the above information to write our own
Enter the proper function call in the bookmarklet code section: cornify_add

JavaScript Bookmarklet Tutorial – YouTube



div class=”summary”>JavaScript Bookmarklet Tutorial
We show how to write a JavaScript bookmarklet that loads a JavaScript file which contains the actual bookmarklet payload
Python vs JavaScript Variable Scope by Jose Vidal 325 views
JavaScript & jQuery Tutorial for Beginners – 1 of 9 – Getting Started by tutor4u 308,045 views
So Easy You Can Even Do It in JavaScript: Event-Driven Architecture for Regular Programmers by NextDayVideo 2,893 views
Javascript DOM Manipulations: Dynamic HTML Tutorial by Jose Vidal 2,528 views
Pinterest Tips and a Magic Trick – How to use Bookmarklet by Lora Langston 191 views
json tutorial for beginners learn how to program part 1 JavaScript by Adam Khoury 158,440 views
Meet Storify’s new bookmarklet by StorifyVideos 3,664 views
Javascript Tutorial – Programming Tutorial for Beginners Pt 1 by LearnCode.academy 60,695 views

Creating a Bookmarklet with Remote JavaScript Code – Free Quality Screencasts by Screencasts.org



div class=”summary”>Creating a Bookmarklet with Remote JavaScript Code
In our previous video in the bookmarklet series we showed you how to create a simple bookmarklet where all the code was contained wholly within the bookmarklet itself
In this follow-up screencast we’re going to show you how to include source code from a JavaScript file stored on a remote server
How to create a Bookmarklet with code stored in an external JavaScript file
In our previous screencast in the bookmarklet series we showed you how to create a simple bookmarklet where all the code was contained wholly within the bookmarklet. In this screencast we’re going to show you how to include source code from a JavaScript…
The main reason you’d want to do this is so that you can update the bookmarklet without telling your users to manually update the bookmarklet themselves
We’re going to create a bookmarklet that performs the same browser resizing as in the previous screencast, but this time instead of it being included in the bookmarklet itself, we’re including it from a remote source so that we can transparently update it…
First off we need to create our anonymous function where we’ll put the code to remotely load our JavaScript. We’re using a javascript file for now, but we’ll remove any returns and indentation before embedding it in to the link
Then we need to create a script tag where we’ll include the source of our remote JavaScript file
s. src = ’ http://bookmarklet–720pify.heroku.com/js/720pify.js

Bookmarklet Installation



div class=”summary”>Bookmarklets are implemented using a long URL that begins with " javascript: ". The URL’s JavaScript typically inserts the bookmarklet’s script into the current page, thus giving the bookmarklet the ability to do its work
Installing a bookmarklet on a desktop browser is pretty easy: just drag it to the bookmarks toolbar or right-click it and add it to your favorites. But these techniques don’t work in most mobile browsers. It’s possible to install bookmarklets on mobile…
Here are step-by-step pictures of installing a bookmarklet this way on the iPhone. I look specifically at installing the Mobile Perf bookmarklet , but this technique should work for all bookmarklets and all mobile browsers. (On my Android Nexus S I had to…
Mobile Perf bookmarklet
This adds " #javascript:(function… " to the end of the URL in your browser
Edit the bookmark’s name to be the name of the bookmarklet you’re creating – in this case "Mobile Perf bookmarklet". For some reason you can’t edit the URL at this point. We’ll do that next. Go ahead and hit Save
Let’s edit that bookmark to use the correct URL. Open the bookmark menu and click Edit. Click on the "Mobile Perf bookmarklet" bookmark to edit it
Delete everything up to and including the "#" so that the remaining URL starts with " javascript:(function ". Hit Done three times and you should be back at the browser
Now go to a page you’d like to analyze, for example a Google search for "flowers". Open your bookmarks and select "Mobile Perf bookmarklet" and presto – there’s the Mobile Perf bookmarklet menu. Try clicking on one of the bookmarklets in the menu, for…
Bookmarklets might seem clunky compared to desktop browser tools, but they are a way to gain visibility into mobile browsers today. There’s still work to be done to manage the small screen real estate, but as more bookmarklet development focuses on mobile…

Share Bookmarklet | Twitter Developers



div class=”summary”>Share Bookmarklet
The Share Bookmarklet makes it easy for you to share any webpage on Twitter, even if there isn’t a Tweet Button. It works in all major browsers and is easy to install
Getting the Bookmarklet
To use the bookmarklet just drag the Share on Twitter button to your Bookmarks Bar, browse for a page you like and then click it. The Bookmarks Bar is also known as the Favourites Bar or the Bookmarks Toolbar. In some browsers you may need to go to your…
The Share Bookmarklet can also be created manually. To create the Share Bookmarklet you need to copy the code below into the URL field of a new bookmark
javascript:(function(){window.twttr=window.twttr||{};var D=550,A=450,C=screen.height,B=screen.width,H=Math.round((B/2)-(D/2)),G=0,F=document,E;if(C>A){G=Math.round((C/2)-(A/2))}window.twttr.shareWin=window.open(‘http://twitter.com/share’,’‘,’left=’+H…
If you own a webpage and would like to provide a Tweet Button for your users instead of relying on them having the bookmarklet, take a look at our Tweet Button page
We’ve tested in the most popular browsers and have no known issues, but if the bookmarklet isn’t working you should check your popup blocker settings. You may have a custom toolbar which is stopping the Share Box from working

Bookmarklet – Wikipedia, the free encyclopedia



div class=”summary”>Demonstration of a bookmarklet that counts the number of words on the page. The browser shown is Firefox 3.0 with generic "abrowser" branding on Ubuntu
A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands to extend the browser’s functionality
Bookmarklets are unobtrusive scripts stored as the URL of a bookmark in a web browser or as a hyperlink on a web page . The term is a portmanteau of the terms bookmark and applet, [1] however, an applet is not to be confused with a bookmarklet, just as…
For instance, clicking on a bookmarklet after a selection , might allow the user to be presented with a search engine results page for the search term
Web browsers use URIs for the href attribute of the <a> tag and for bookmarks. The URI scheme , such as http: , file: , or ftp: , specifies the protocol and the format for the rest of the string. Browsers also implement a prefix javascript: that to a…
javascript : ( function
javascript : { arbitrary script } ; void ( 0 ) ; Usage[ edit
Installation" of a bookmarklet is performed by creating a new bookmark, and pasting the code into the URL destination field. Alternatively, if the bookmarklet is presented as a link, under some browsers it can be dragged and dropped onto the bookmark bar…
Steve Kangas of bookmarklets.com coined the term "bookmarklet", [3] which he started to create based on an idea suggested in the Netscape JavaScript Guide. [4] The term favelet was used early on by Tantek Çelik on 6 September 2001 (personal email…
They were a deliberate feature in this sense: I invented the javascript: URL along with JavaScript in 1995, and intended that javascript: URLs could be used as any other kind of URL, including being bookmark-able. In particular, I made it possible to…

Ben Alman » jQuery Bookmarklet Generator



div class=”summary”>jQuery Bookmarklet Generator
This would probably actually be better called “Run some arbitrary code that requires jQuery, loading a minimum required version of jQuery first (but only if necessary), affecting the host page as little as possible Bookmarklet Generator” but that wasn’t…
This boilerplate code is useful for bookmarklets that need jQuery to execute their payload, in situations where you don’t know if jQuery or a specific minimum required version of jQuery will already exist in the page. If you just want to load jQuery…
Use the super-convenient bookmarklet generator
Visit the bookmarklet generator page. It’s super-convenient
Use your brand new bookmarklet
Any bookmarklet-loaded jQuery will always run in noConflict mode, and will only be available inside the callback. It shouldn’t contaminate the page
Multi-line JavaScript code should be wrapped in <pre class="brush:js"></pre
If you’d like to learn more about jQuery or JavaScript, sign up for one of my Bocoup workshops

Bookmarklet :: Add-ons for Firefox



div class=”summary”>Bookmarklet 1.1 No Restart
1. Name of Bookmarklet can be set
2. Javascript Code can be changed
3. External javascript can be injected
4. Show history of created Bookmarklet for current session
6. Editing existing Bookmarklet by dragging it to code text box

JavaScript Bookmarklets – David Bushell – Web Design & Front-end Development – David Bushell make websites. I help small businesses, start-ups, individuals, and fellow web agencies make the most of their web presence.



div class=”summary”>JavaScript Bookmarklets
I love a good JavaScript bookmarklet
A bookmarklet begins with the following shell
Here we’re enclosing a self-invoking function within a basic URI scheme that all browsers understand. When a user clicks the bookmark the browser sees the javascript: prefix and executes the code on the current page
Remember that jQuery might not be available. Bookmarklets should be designed to run on any website (or as many as possible), so don’t use jQuery in the actual bookmarklet code. I’d suggest using this as an opportunity to learn actual JavaScript rather…
var script = document.createElement(‘script’); script.setAttribute(‘type’, ‘text/javascript’); script.setAttribute(‘charset’, ‘UTF–8’); script.setAttribute(‘src’, ‘http://code.jquery.com/jquery–1.7.2.min.js’); document.documentElement.appendChild(script…
It’s best practice to keep your bookmarklet small. I’m pretty sure browsers don’t like users bookmarking 10,000 lines of code, but more importantly it has to be updated manually by each user. By loading external files we can make changes easily. However…
Our final bookmarklet boilerplate
avoid the bookmarklet activating more than once if (window.MyNamespace

mir.aculo.us JavaScript with Thomas Fuchs » DOM Monster Bookmarklet



div class=”summary”>DOM Monster is our answer to JavaScript performance tools that just don’t give you the full picture
DOM Monster is a cross-platform, cross-browser bookmarklet that will analyze the DOM & other features of the page you’re on, and give you its bill of health
We’ll keep the DOM Monster! up to date and feed it with the latest in page analyzing features for you! You don’t have to update or reinstall the bookmarklet to always get the latest and greatest version! Be sure to drag the DOM Monster! to your bookmarks…
Learn more about the DOM Monster! and how to deal with DOM and JavaScript performance issues! Grab a copy of our
JavaScript Rocks! performance ebook

JavaScript Bookmarklet, Multiple Functions, Timer • mozillaZine Forums



div class=”summary”>JavaScript Bookmarklet, Multiple Functions, Timer
I can’t figure out why this script isn’t working as a Firefox Bookmarklet




div class=”summary”>You have JavaScript. You need a bookmarklet . This does that
JavaScript Bookmarklet
Drag this link to your bookmarks bar: My Bookmarklet

Beginner Geek: How to Use Bookmarklets on Any Device



div class=”summary”>Web pages you view in your browser use JavaScript code. That’s why web pages aren’t just static documents anymore — they’re dynamic. A bookmarklet is a normal bookmark with a piece of JavaScript code instead of a web address. When you click or tap the…
Bookmarklets can be used to do something to a web page with a single click. For example, you’ll find bookmarklets associated with web services like Twitter, Facebook, Google+, LinkedIn, Pocket, and LastPass. When you click the bookmarklet, it will run…
Bookmarklets don’t just have to be associated with web services. A bookmarklet you click could modify the appearance of the page, stripping away most of the junk and giving you a clean “reading mode.” It could alter fonts, remove images, or insert other…
Because they just use the standard bookmark system, they can also be used in mobile browsers where you couldn’t run extensions. For example, you could install the Pocket bookmarklet in Safari on an iPad and get an “Add to Pocket” option in Safari. Safari…
If you’re looking for a bookmarklet for a particular service, you’ll generally find the bookmarklet on that service’s site. Websites like Twitter, Facebook, and Pocket host pages where they provide bookmarklets along with browser extensions
Bookmarklets aren’t like programs. They’re really just a piece of text that you can put in a bookmarklet, so you don’t have to download them a specific site. You can get them from practically anywhere — installing them just involves copying a bit of text…
For example, you can just search the web for “reveal password bookmarklet” if you wanted a bookmarklet that will reveal passwords. We’ve covered many of the must-have bookmarklets — and our readers have chimed in too — so take a look at our lists for more…
Bookmarklets are JavaScript links you can place on your browser’s toolbar that add one-click functionality to the browser or webpage…. [Read Article
Earlier this week we asked you to share your favorite bookmarklets—tiny pieces of JavaScript packed into browser bookmarks that enhance… [Read Article
How to Install a Bookmarklet

Web Development Bookmarklets



div class=”summary”>Bookmarklet Description Works in
shell Opens a JavaScript Shell and allows it to access the current page. Details
jsenv Opens a JavaScript Development Environment and allows it to access the current page. Details
view variables Displays all JavaScript variables and functions. Details
onerror status When a JavaScript error occurs, shows the error message in the status bar. Details
onerror alert When a JavaScript error occurs, shows the error message in a dialog. Details
Opens a JavaScript Shell and allows it to access the current page
Opens a JavaScript Development Environment and allows it to access the current page
This bookmarklet supports inline and linked style sheets, imports, and style sheets with data: URLs (such as those created by "test styles"). When style sheets cannot be loaded with XMLHttpRequest (out-of-domain or non-http URLs), it includes them with an…
Also shows classes (e.g. SPAN.newsItemLink) and ids (e.g. DIV#content) when present. The idea of showing classes and ids comes from pixy ’s "List computed styles" bookmarklet

Bookmarklets – www.docjavascript.com | WebReference



div class=”summary”>JavaScript Tools
JavaScript Core
Home / JavaScript / column35
Bookmarklets aren’t new to the JavaScript community. In fact, they can be used in older JavaScript-enabled browsers. However, this topic was never covered in depth. It was pointed out to us by Steve Kangas, author of bookmarklets.com . Visit the site for…
How to utilize the javascript: protocol
How to create a bookmarklet
How to build bookmarklets with our handy Bookmarklet Builder

100+ Useful Bookmarklets For Better Productivity | Ultimate List



div class=”summary”>In a nutshell, bookmarklets are small little applications you can place as browser’s bookmark bar and they each perform a specific function, depending on what they are coded for. Bookmarklets are usually written in Javascript and they are extremely easy…
In this article, we’ll show you some of the most useful bookmarklets for designers, developers or even if you are a net surfer, they might just come in handy. Installing a bookmarklet is simple – all you need to do is drag them to your bookmark toolbar…
Why bookmarklet are cool
Hassle-less installation – Installing a bookmarklet is simple. All you need to do is drag it up to the bookmark toolbar. To remove them, just right click on it and hit delete
Light – If you’ve installed more than 15 add-ons in your Firefox, you’ll probably find it slower to start. Bookmarklets are just couple of lines of Javascript codes. You can have 50 and Firefox doesn’t even lag a bit
Shorten URL – In this case, we use bit.ly’s shortening bookmarklet. Click here for a list of URL shorteners with bookmarklet scripts
Print Screen – Another print screen bookmarklet. By Aviary
Better Readability – This bookmarklet cleans up the page, leaving you with nothing but clean content for better readability. You can create a customized version at Arc90 Lab
Show Password – Set a password and forgot? This bookmarklet takes in your ***** from form field and output you the actual password
Site Info – A bookmarklet that gives you information (advertising network, platform, widgets, etc) of the website you are currently viewing. By sitonomy

Form Bookmarklets



div class=”summary”>Bookmarklet Description Works in
Passwords: You can use this bookmarklet to store URLs with passwords as bookmarks, but if you do, you should be aware of several security issues
Some sites, including many banks and a few other sites such as Yahoo Mail and Microsoft Passport , tell browsers not to remember passwords for visitors using autocomplete="off". This bookmarklet makes the browser ignore autocomplete="off" temporarily…
Use this bookmarklet just before submitting the form with your password in it. When you submit the form, your browser should offer to remember the password (as if the site didn’t use autocomplete="off"); click "Yes". Once your browser has your password…
Thanks to Erich Iseli for making the bookmarklet work on the Passport site
This bookmarklet only works on sites that use autocomplete="off" to prevent your browser from remembering passwords. If the site uses another method to break your browser’s password manager, such as having two password fields or submitting the form using…