Page 1 of 1

Bookmarklets - Cumulus examples

Posted: Fri 27 Sep 2013 10:40 pm
by beteljuice
Bookmarklets ?

Very basically - bookmarks can run JavaScript in your browser.

What does this mean ?

You can modify ANY html page in your browser window :o

This is the way eg. you can have 'plug-ins' that change the colours or styles of the page you are viewing.

Do a bit of reseach or see: http://coding.smashingmagazine.com/2010 ... th-jquery/

Then go to: beteljuice test
bookmarklets.zip
Are they useful ? - the beteljuice is not overly impressed,
.... but I suppose if you spend most of your time full screen on a single page and you need to know what your weather station is doing ......

The beteljuice has put together three examples (OK the first is from the top link) using differing amounts of 'complication' to obtain the input you desire.

I've zipped them up and put a README to get you going.
How complex and what information you want to display is upto you ;)

Edit: The examples are all JavaScript, but of course your content could be created by any means you like, it may even be a 'static' picture of your daughters pet pony :?

Many thanks go to Ken True (SaratogaWX) who has given permission to redistribute his ajax??wx.js scripts and ajax-images graphics library used by the 'weather bar'
... and to ....
Steve, who has greatly assisted with testing (Even if he did throw me a Chrome problem I didn't know existed !)

Re: Bookmarklets - Cumulus examples

Posted: Sat 28 Sep 2013 9:33 am
by mcrossley
I'll take a look at this later. I have used bookmarklets before to test how scripts will work on other sites, for instance the flying bird and snow background scripts I played with.

Re: Bookmarklets - Cumulus examples

Posted: Sat 28 Sep 2013 1:37 pm
by beteljuice
@Mark - you should have denied all knowledge ...

... now someone will expect you to design a fly-away status monitor :lol:

Technobabble;

The booklet 'wrapper' looks for a uniquely named function.
If it does NOT exist, it is created by an anonymous function (to assist in reducing vars / id conflicts)
The unique function (usually) pulls in an external .js to make life easier for coding.
Eventually a uniquely named <div> is created, you could just code your content in there,
... but I've used <iframe>, again for ease of coding, and it doesn't matter what code or names you put in there because there won't be any conflicts.