Here's my favelet (#2490)

Home

Javascript crapola

Dec
142004
Getting an error saying

"Depracated method document.getSelection() call. Please use window.getSelection() instead"

in a favelet that I've written... only thing is document.getSelection() works and window.getSelection() doesn't, what's that all about?

Paid off my very last council tax installment to Hackney Council it seems, by paying next months in advance... the lady on the phone was very odd saying "Ooh, well done!". Does this mean they don't expect people in Hackney to actually pay? This would explain why it's so bloody high, if I was the person who was subsidising everyone else... by the time payments start up again we'll be based permanently inFolkestone...
TweetComment / reply

Which browser are you using? window.getSelection() should work under FF...

Which browser are you using? window.getSelection() should work under FF...
15 Dec TweetComment / reply

I set up a "favelet" under FF today and had no problem or reports of deprecated functions - what are

I set up a "favelet" under FF today and had no problem or reports of deprecated functions - what are you trying to do?
15 Dec TweetComment / reply

Here's my favelet

Hope this will reproduce OK on here:

javascript:function%20s(h){r='';t=0;for(i=0;i'){t=0;}else{if(!t)r+=c}}return%20r}w=window;d=document;l=location;q='';f='';if(!q&&w.getSelection){q=w.getSelection();f+='w.gs'+q+'%250D%250A'}if(!q&&d.getSelection){q=d.getSelection();f+='d.gs'+q+'%250D%250A'}if(!q&&d.selection){q=d.selection.createRange().text;f+='d.s'+q+'%250D%250A'}if(!q){q=d.body.innerHTML;f+='d.b'+q+'%250D%250A'}l.href=('http://www.clarkeology.com/cgi-bin/board.cgi?mPrecis='+l.href+'&mSubject='+escape(d.title)+'&mText='+s(q)+'%250D%250A[['+escape(l.href)+'%250D%250A%250D%250A'+s(q))

Those are arbitrary breaks in there, it should all be on one line... getSelection does work, but it's clashing with something else, the results of my function s() aren't being appended to the URL... that's the prob with writing these things on just one line, it's a bit hard to debug! I need to write it out in full and then write a sort of compiler that'll shrink the code as much as poss... I will do some more work on this today, it might be all good by the time you see it. Well, hopefully...


Glossary:

javascript: a major programming language of the internets, mostly how I make my living
16 Dec TweetComment / reply

Hmmm

Hmmm... I get problems with it interpreting the charAt() method on my FireFox... Might have some time to play this afternoon through.
22 Dec TweetComment / reply

Not sure why that's broken

You're right though, as just javascript:function%20s(h){r='';t=0;for(i=0;i'){t=0};if(!t){r+=c}}return%20r}w=window;d=document;l=location;q='';;f='';if(!q&&w.getSelection){q=w.getSelection();f+='w.gs'+q+'%250D%250A'}if(!q&&d.getSelection){q=d.getSelection();f+='d.gs'+q+'%250D%250A'}if(!q&&d.selection){q=d.selection.createRange().text;f+='d.s'+q+'%250D%250A'}if(!q){q=d.body.innerHTML;f+='d.b'+q+'%250D%250A'}l.href=('http://www.clarkeology.com/cgi-bin/board.cgi?mPrecis='+l.href+'&mSubject='+escape(d.title)+'&mText='+'%20%20[['+escape(l.href)+'%250A%250D%250A%250D'+q)]]
works, but my function s() is trimming out the HTML and truncating... it was working OK, will have to backtrack a bit...


Glossary:

javascript: a major programming language of the internets, mostly how I make my living
22 Dec TweetComment / reply

Fixed it now

Recommended / related
Still got some debugging crap in here:

javascript:function%20s(q){r='';t=0;for(i=0;i'){t=0};if(!t){r+=c}}return%20r}w=window;d=document;l=location;q='';f='';if(!q&&w.getSelection){q=w.getSelection();f+='w.gs'+q+'%250D%250A'}if(!q&&d.getSelection){q=d.getSelection();f+='d.gs'+q+'%250D%250A'}if(!q&&d.selection){q=d.selection.createRange().text;f+='d.s'+q+'%250D%250A'}if(!q){q=d.body.innerHTML;f+='d.b'+q+'%250D%250A'}l.href=('http://www.clarkeology.com/cgi-bin/board.cgi?mPrecis='+escape(l.href)+'&mSubject='+escape(d.title)+'&mText='+'%5B%5B'+escape(l.href)+'%5D%5D%250A%250D'+s(escape(q))) Blog posting favelet

had to escape the contents of the select before passing it into the function, the function was getting nothing...


Glossary:

javascript: a major programming language of the internets, mostly how I make my living
22 Dec TweetComment / reply

Paul Clarke's - I live and work in Hythe near Folkestone, Kent. wed to Clare and father to two, I am a software engineer, and I do mostly javascript, Node, python, ruby, and php. I like pubbing, restaurants, home automation and other diy jiggery-pokery, history, genealogy, TV, popbitch, squirrels, pirates ☠, lego, and time travel.

Also from the same week

Some more blog posts from the same week as .

Old Street Art Pranks Saw a wacky situationist prank at Old Street this... [Mon 13 December 2004]

Hmm: "Recently our company released a string quartet... [Tue 14 December 2004]

Javascript crapola Getting an error saying "Depracated method... [Tue 14 December 2004]

am back from eastern europe bruvs...was proper cold and... [Tue 14 December 2004]

It's hard to know It's seeming to make sense that they're trying to control... [Wed 15 December 2004]

Hmm, having a lot of Apple related computer problems there! [Wed 15 December 2004]

Looking forward to The Tears We're off to see The Tears tomorrow night, if the... [Wed 15 December 2004]

yeah, they're not related though When I get a password for the iMac I might well plug the... [Wed 15 December 2004]

How you getting on with Bulldog DSL btw? [Wed 15 December 2004]

Who reads these service agreements anyway? > Dear Paul: > > Posting links in forums and on message... [Wed 15 December 2004]

Which browser are you using? window.getSelection()... [Wed 15 December 2004]

I set up a "favelet" under FF today and had no problem or... [Wed 15 December 2004]

fine thanks although i just have their 1mb service which is provided... [Wed 15 December 2004]

Here's my favelet Hope this will reproduce OK on here:... [Thu 16 December 2004]

Secret Franz Ferdinand gig Writing the number one Stoke Newington website, and... [Thu 16 December 2004]

oo - get them... That's not very nice - who's network? [Thu 16 December 2004]

Commission Junction [Thu 16 December 2004]

Just spoken to Special Mail Special mail , like special needs... anyway the guy... [Thu 16 December 2004]

You can all rest easy now The tickets showed up... [Thu 16 December 2004]

Tears before bedtime (I think nme.com already used "Tears in Heaven") So, I... [Fri 17 December 2004]

haha, can't believe clare got id'd!! Nice here and now... [Fri 17 December 2004]

Inspiration Decided to sort out a work page today that was taking 15... [Fri 17 December 2004]

Hmmm Hmmm... I get problems with it interpreting the charAt()... [Wed 22 December 2004]

Not sure why that's broken You're right though, as just... [Wed 22 December 2004]

Fixed it now Still got some debugging crap in here:... [Wed 22 December 2004]

share save docker bulgaria micropub payers park chambers wfh hospital orlando scottevest center parcs premier inn beetle follies tower bridge vegan raspberry pi new york holiday tax pay day ad blocker pizza go ape harbour arm working from home shares sofia harry potter studios inn doors mortgage

Paul Clarke

Links

Latest

Todo:

Projects

Privacy policy