I've updated the Blogger Markdown support user script (original post) for Greasemonkey.
Improvements:
- Preview now shows Markdown converted to HTML.
- Added a link to the Markdown syntax page (open's in a new tab).
I've updated the Blogger Markdown support user script (original post) for Greasemonkey.
Improvements:
I needed to insert an anchor element before an other element in my Select element filter user script because I wanted the anchor to fit in the page's existing tab order. Also, I didn't want the anchor to push the other element to the right, so it needed to be positioned absolutely. You might know that you need to position absolute positioned element relative to the root elements or the first non-static positioned parent node. Here's the javascript code I used to determine the anchor's position:
var posY = 0; var posX = 0; var currOffsetParent = elementToInsertBefore; do { if ( document.defaultView.getComputedStyle(currOffsetParent, null) .getPropertyValue('position') == 'static' ) { posY += currOffsetParent.offsetTop; posX += currOffsetParent.offsetLeft; } else break; } while (currOffsetParent = currOffsetParent.offsetParent);
Finally, the Filter large form selects user script for Greasemonkey is no longer experimental. I decided to fix the two biggest problems of this script: poor positioning and poor usability.
Here's a detailed improvements list:
select
element is inserted to display the filter results and the magnifier is positions absolutely.select
s with optgroup
s because of the separate results select
.select
's onchange
function will be executed when the select was changed by the filter (this was broken since Greasemonkey 0.6.4).I like to write posts in 'Edit HTML' mode because I want to have clean, semantic HTML on my blog. I'm happy that I can use Markdown now to write my posts and convert them to HTML using my user script (based on js-markdown) because this is much faster then writing HTML.
My post announcing the user script had little info on Markdown. I'm not going to copy the complete Markdown syntax here, but I will put a short example in this post to give you an indication of how Markdown can help you writing HTML.
Markdown example:
# Clean & quick HTML writing This is a [Markdown](http://daringfireball.net/projects/markdown/) example. It is intended to be as *easy-to-read* and *easy-to-write* as is feasible. * List item 1 **strong** * List item 2 `code` > Blockquoted text
Resulting HTML:
<h1>Clean & quick HTML writing</h1> <p>This is a <a href="http://daringfireball.net/projects/markdown/">Markdown</a> example. It is intended to be as <em>easy-to-read</em> and <em>easy-to-write</em> as is feasible.</p> <ul> <li>List item 1 <strong>strong</strong></li> <li>List item 2 <code>code</code></li> </ul> <blockquote> <p>Blockquoted text</p> </blockquote>
This one is for the Dutch readers:
Het Omroep.nl video's direct linken user script (oorspronkelijke post) voor Greasemonkey is verbeterd:
bb.iets.rm
heet. Door deze aanname konden nieuwe video's van de VPRO niet bekeken worden.I was using Johan's Google Reader Subscribe user script (see the post on his blog) for some time now. I just loved it. The only downside was that it draw a lot of attention and it slowed scrolling down on my laptop. If you've got the same problem you might like Jasper's Google Reader subscribe user script for Greasemonkey. It was designed to use as little screen size as possible. It only adds a feed icon in the top right corner. When you mouse over the feed icon the subscribe links are shown.
I could copy Johan's code but I chose to rewrote the code to experiment with XPath
queries. Man, they are powerful!
Implemented improvement suggested by Chris Wetherell.
After writing a post on userscripts.org improvement suggestions, I decided that I would write a userscripts.org myaccount improvements user script for Greasemonkey to improve some things on the myaccount page:
Thanks to Esquifit's feedback, the Google open all user script (original post) for Greasemonkey can now open HTML versions of PDF files, Word documents etcetera.
It is also no longer based on the first div
on the result page which made it interfere with others scripts.
Two moths ago I published a post on how to custom format your Blogger backlinks. The only downside on this script is that your MainOrArchivePage
will appear slow because after each item a small Javascript needs to be loaded from blogger.com. Today I wrote a speed up for this. I now only insert a placeholder span
and do the rest of the needed scripting at the bottom of the page.
Here is the script to place on the MainOrArchivePage
(after the link to the comments for example):
<script type="text/javascript"> //<![CDATA[ document.write('· <a href="<$BlogItemPermalinkUrl$>#links">Links: <span id="BLc<$BlogItemNumber$>">?</span></a>'); if (! BL_BacklinkCount) var BL_BacklinkCount = new Array(); BL_BacklinkCount['<$BlogItemNumber$>'] = document.getElementById('BLc<$BlogItemNumber$>'); //]]> </script>
Here is the script to put at the bottom of your page (after the Blogger
close tag):
<MainOrArchivePage> <script type="text/javascript"> //<![CDATA[ for (var item in BL_BacklinkCount) { document.write('<script type="text/javascript" src="http://www.blogger.com/dyn-js/backlink_count.js?blogID=<$BlogID$>&postID='+ item +'"></scr'+'ipt>'); } //]]> </script> </MainOrArchivePage>
Userscript.org is a great initiative, it really is. Jesse and Britt are doing a great job responding to feedback e-mails, adding feature and even helping me out by resetting my password in the days you were unable to do it your self. However, there are a few things that I would like to see improved or added.
I hope these ideas will be implemented in the coming version of userscripts.org.
Update 2006-01-07: How could I forget this one:
Update 2006-01-08: I wrote a user script to improve some things on the myaccount page.
What the heck. After writing a Blogger Markdown support user script for Greasemonkey I could as well write a Markdown textarea
s user script. It is also based on js-markdown and it enables you to convert Markdown formatted text in textarea
s to HTML in one single click.
When you prefer to write your posts in HTML, you might be pleased to hear that I've created a Blogger Markdown support user script for Greasemonkey. It is based on js-markdown and it enables you to convert Markdown formatted text to HTML in one single click.
Initial version
After many requests for a version of the Hotmail rich composer user script (original post) that would work in Firefox 1.5 with Greasemonkey 0.6.4 I finally had time to update it.
This script had my lowest priority since I don't use Hotmail that much and I expected that Microsoft would upgrade Hotmail (which hasn't happened yet). There was also a lot of code rewriting involved and little time available.
I've updated the Blogger tag adder user script (original post) again (grumbl) so you can use it on the restyled BlogThis!.
HTML, CSS, Javascript and more