This post is now out of date: please go read about the new 'fixlinks.js'.
So I really dislike adding target="_blank" to all my links that go offsite or adding <base target="blank"> and to remembering unset for links that stay on site.
So I added little bit javascript top of my template I call an onload
body tag that modifies all the <a href> tags on the page. It
runs with following logic. If the link is different anonymize using google url
redirector and open a new tab if it's the same host replace this window. At
some point I'll fix it to honor target="_blank" attribute in the <a href>
if there is one.
Wednesday, March 23, 2005
Sunday, March 20, 2005
including scripts in blogger
So I created this blog to document some scripts I wrote or found useful and to share them with people. I don't expect people to read this, but I do hope that someone searching for something will find the info here if it's pertinent.
The first thing I wanted to do was put my scripts here without having to put them on my own server, but blogger doesn't provide a way, sure I could just paste the text of the script into a blogger entry or even play with the <plaintext> tag, but it's not very readable is it? I also learned that blogger doesn't like <script> tags in entries either, but it will allow you to put onclick javascript handlers in links or forms, so I created a perl script that given a file outputs the javascript you'd need to put into an onclick handler to popup a new window with your script in it.
So in full on recursiveness I first used it on itself and below you can click to pop up a new window with my bloggerquote script in it. It's useful to pipe the output into pbcopy (osx) to put the command output into the clipboard, xclip does this for x-windows systems, windows users might be able to modify it to use Win32::clipboard
The very DAY after I create this ourmedia.org was announced, giving you lifetime free hosting which might be a better solution (maybe)....
Screw it, the fancy HTML escaping and stuff was breaking in the blogger compose box so I've given up on it... plus I'm no longer on blogspot.com I'm here on my own domain.
The first thing I wanted to do was put my scripts here without having to put them on my own server, but blogger doesn't provide a way, sure I could just paste the text of the script into a blogger entry or even play with the <plaintext> tag, but it's not very readable is it? I also learned that blogger doesn't like <script> tags in entries either, but it will allow you to put onclick javascript handlers in links or forms, so I created a perl script that given a file outputs the javascript you'd need to put into an onclick handler to popup a new window with your script in it.
So in full on recursiveness I first used it on itself and below you can click to pop up a new window with my bloggerquote script in it. It's useful to pipe the output into pbcopy (osx) to put the command output into the clipboard, xclip does this for x-windows systems, windows users might be able to modify it to use Win32::clipboard
The very DAY after I create this ourmedia.org was announced, giving you lifetime free hosting which might be a better solution (maybe)....
Screw it, the fancy HTML escaping and stuff was breaking in the blogger compose box so I've given up on it... plus I'm no longer on blogspot.com I'm here on my own domain.
Subscribe to:
Posts (Atom)