Uncategorized

Bonus Feature for MT Bookmarklet

Scott Leslie recently posted some well deserved praise for Bookmarklets (little Javascripts to perform tasks), citing them as vastly under-used but powerful tools in your web browser.

The MovableType Bookmarklet makes blogging any website a snap, see our Blogging with the MT Bookmarklet summary.

But by pure accident, I discovered this tool has an added bonus.

The MT Bookmarklet tool is even a bit more powerful because it can also grab a portion of text from the page you are viewing, and include that in your blog editing form.


That little chunk of text in my quotebox came direct from the blog entry I hit with the MTBookmarklet. (see that link for the full details, pictures and all)

Not only does it build a hypertext link to any web site in view in the blog entry form, if you can highlight any chunk of text on the web page, the bookmarklet can transport that test as well to your new entry.

This is what you could use to pull a small quote from any web page when you are commenting about it.

I will harp again, but be sure to somehow indicate a difference in a blob of text taken out of another site from your own voice.

There is way too much “regurgi-blogging” going on- people that create a new blog entry and simply insert en masse, some text lifted from another site.

Profile Picture for Alan Levine aka CogDog
An early 90s builder of the web and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person.

Comments

  1. Hey Alan, the ability to copy out text and place prepopulate it onto a form as part of a bookmarklet is very cool. I’m not sure how the MT one does it – the Radio Express one uses

    javascript:Q=”;if(top.frames.length==0){if(document.selection)Q=document.selection.createRange().text;else if(document.getSelection)Q=document.getSelection()};void(location.href=’htp://127.0.0.1:5335/system/pages/radioExpress?t=’+escape(Q)+’&u=’+escape(location.href)+’&n=’+escape(document.title));

    The main idea being to use document.selection object and then pass it as part of the form posting parameters. Once one understands this principle, it’s amazing the uses one can see – e.g. wouldn’t it make sense to build a bookmarklet to help with adding a learning object record to a repository, and be able to select some of the relevant text from a page as the starting text for a description field

    (I’ll bet you’ve already built this and that’s tomorrow’s post, you sly devil!)

  2. The MT one is fairliy similar, it is also passing some paramters used to set up the form options:

    javascript:d=document;t=d.selection?d.selection.createRange().text:d.getSelection();void(window.open(‘http://jade.mcli.dist.maricopa.edu/cgi-bin/mt/mt.cgi?is_bm=1&bm_show=trackback,category,allow_comments,allow_pings,convert_breaks,excerpt,text_more&__mode=view&_type=entry&link_title='+escape(d.title)+'&link_href='+escape(d.location.href)+'&text='+escape(t),’_blank’,’scrollbars=yes,width=400,height=800,status=yes,resizable=yes,scrollbars=yes’))

    It sends you through a CGI script to verify that one is logged in (if not you get the login screen, and then it moves the info into the form).

    The one I use most is a Google one that does a search ona selected chunk of text:

    javascript:q=document.getSelection();for(i=0;i<frames.length;i++){q=frames[i].document.getSelection();if(q)break;}if(!q)void(q=prompt(‘Enter%20text%20to%20search%20using%20Google.%20You%20can%20also%20highlight%20a%20word%20on%20this%20web%20page%20before%20clicking%20Google%20Search.’,”));if(q)location.href=’http://www.google.com/search?client=googlet&q='+escape(q)

    And no, I am not as sly as you think. The approach you describe would work only for objects that are themselves web pages, but I guess could concievably be built.

    But what I could see is a bookmarklet that would call a server script that could scavenge a page for RDF tags (auto-discovery) and pull up a form for creating a TrackBack ping- this would allow anyone to create TrackBack, not just an MT user (all of our MLX packing slips now have this as a feature).

    Then again, no one really understands Trackback….

Comments are closed.