Thursday, December 18, 2008

Bookmarklet to find cheapest service to call a mobile from a fixed line for the current time and day

Callchecker (UK) has a great service to lookup the best 0845/0870 service to call a UK mobile from your fixed line telephone. This varies by weekday, evening or weekend rate. The following bookmarklet looks up the right page based on the time on your computer.
javascript:(function(){
var t='weekday',d=new Date();
if(d.getDay()==0||d.getDay()==6){t='weekend'}else{
if(d.getHours()>17||d.getHours<8){t='evening'}};
window.location='http://callchecker.moneysavingexpert.com/\
ukcallchecker/mobile-numbers/'+t
})()

Here it is as a bookmark that you can test out or drag and drop into your browser Bookmarks.

Thursday, December 11, 2008

Bookmarklet to add recycle comment in GreenMetropolis

I'm selling a fair number of my old paperbacks on GreenMetropolis.com. When listing a book I invariably want to note that I will send in recycled packaging in the comments field. I was using iMacro to speed this up but I've finally got around to creating a simple bookmarklet to do the same thing. Here it is:

javascript:(
function(){
var cmts=document.getElementsByTagName('TEXTAREA');
for(var ic=0;ic<cmts.length;ic++){
if(cmts[ic].name=='comment'){
cmts[ic].value+='I will send with reused or recycled packaging.'
}
}
}
)()

And here it is as a link you can drag and drop into your own bookmarks or try it out by clicking on it here: Add note to TextArea



Reset text area

This would be fairly easy to customize for your own text or to adapt to a different form that you use regularly and get tired of typing in the same old text or if you are familiar with RegEx tweaking the text you already have in the text box. For example changing the text in the text box to Title Case or Shout.

Tuesday, December 9, 2008

Creating an intelligent shortcut (bookmarklet) in Firefox

On of the frequent address shortcuts I use in Firefox is to redirect "w sometext" in the address bar to lookup a term (sometext) in Wikipedia. As I frequently go to my "Watchlist" in Wikipedia I though it would be neat to default to that page if I had not specified a term. A little research and I'd worked out how to get this to work as a bookmarklet. In the address bar any text added to the shortcut is referenced as "%s".

Using this basic structure it would be pretty easy to add a more complex set of conditions to make the same shortcut do many more things, such as looking up a book and working out if the text you put in was an ISBN or a title.

Here's my example formatted so you can read it:


javascript:(
function(){
  if("%s".length==0){
     // Default
    window.location="http://en.wikipedia.org/wiki/Special:Watchlist"
  }else{
     // Wikipedia lookup
    window.location="http://en.wikipedia.org/wiki/%s"
  }
}
)()


And here it is formatted as a link you can drop into your bookmarks, don't forget to edit it so that it has "w" as a keyword/shortcut:
Wikipedia lookup

Monday, December 1, 2008

Moving my mobile number from Virgin to the evil ASDA / Wal*mart empire

Sadly Virgin aren't doing all that much to compete with the johnny-cum-lately ASDA. ASDA are currently charging a flat rate for PAYG of 8p/min for all UK landline and all mobile calls with 4p per text message. Virgin claimed to charge 15p/min and 3p for texts on PAYG but in practice (as I don't know anyone using Virgin and my usage is so low it was never worth buying a "bundle") their charges were actually a whopping 40p/min and 12p/text.

It's a great pity but as my average bill even at these rates is always less than £5/month I can't afford to ignore the ASDA deal.

Transfer happened this weekend. I emailed Virgin via their website on Thursday, phoned ASDA with the transfer code on Friday and my mobile number was tranferred today. Surprisingly painless compared to the last time I had to do this (it took 3 weeks).