Search This Blog

Showing posts with label Firefox 4. Show all posts
Showing posts with label Firefox 4. Show all posts

Thursday, March 24, 2011

Getting MetroLyrics Lyrics Saved As A Text File

MetroLyrics - How to save Lyrics as Text


I recently installed Winamp 5.0+ (whatever version it is) and as part of this I wanted to look for info about artists including Lyrics for songs. I was directed to MetroLyrics.com to get lyrics with the following an example page for a song:

http://www.metrolyrics.com/my-name-is-lyrics-eminem.html

As you can see above, this shows you the lyrics but if you try to get the lyrics you cant cut and paste them, nor can you view the source and get the lyrics text that way. So how to get around this was my thought. After a bit of looking I found the following out. There is a div tag with the following HTML:

<div id="lyrics">&#83;&#116;&#101;&#112;&#32; ... etc ... 

and above this there is a second div with the following id:

<div id="lyricsBox">

I'm not 100% sure how they stop you from saving the text with cut and paste...I have my theories that JavaScript is used to stop you right clicking and perhaps somehow marking the lyrics div as non-selectable via a CNTRL+A key stroke but I'm not sure. What I have noticed is that apart from whatever CSS / JS that is used they also take the lyrics which are converted from characters that are human-readable ASCII to Unicode. Hence in the lyrics div the huge set of '&#xxx;' values are the Unicode conversions of each letter in the Lyrics.

My first thought was to view the source, cut out the Unicode from within the 'lyrics' div and then use a web based converter and convert from Unicode to ASCII:

http://www.1pagedesign.com/unicode_ascii_converter/ 
http://www.mikezilla.com/exp0012.html

However the size limitations of the tools and the fact that there are non Unicode HTML break tags (ie: <br />) embedded in the middle caused some issues. So instead I decided to simply use Firefox's HTML parser to display the div but without whatever CSS and JavaScript is being used to stop the cut and paste. By viewing the source and then searching for the div id's, ie: 'lyricsBox' and 'lyrics', I copy the source from the first 'lyricsBox' div start through to the end of the 'lyrics' div containing the Unicode and then save this in a new HTML file. Since I'm not copying any of the associated CSS or JavaScript the HTML I copy is just a couple of plain DIV's with no formatting or attached JavaScript behavior, which as I mentioned earlier is what I believe stops the use of Cut and Paste. Viewing this file in browser will then correctly and automatically display the lyrics by converting the Unicode to the appropriate ASCII characters without any further interference from you required and with no fancy formatting (ie: plain text display in the browser).

Further by copying the div 'lyricsBox' I not only get the lyrics stored in the other 'lyrics' div but also get the Artist name, song title and songwriter name with a bit of bold formatting to make it stand out a bit. Great!!!

So this is a quick and simple way to get around the blocked cut & paste and still get your hands on a HTML or text version of the lyrics (once the HTML is parsed by the browser and viewed it appears as just plain text so you can easily cut and paste this as just plain text if you so wish and want to store this as text rather than HTML/Unicode characters).  I tend to just copy a number of lyrics files (in the form of the 2 DIV's of info) one after another in a single HTML file and then view the whole lot of them at once.

Enjoy :-)

B.T.W: I thought of this because I first noticed that when the page was in the process of loading prior to it being completely loaded it was still possible to highlight the lyrics text, use CNTRL+A to get the text and not only that but viewing the source prior to the page fully loading still displayed the text as ASCII rather than Unicode. This implied that the removal of the cut & paste ability and the conversion of the text to Unicode was something that happened after the page loaded (ie: triggered by CSS or more likely JavaScript) ... which made me think that removing the JavaScript (or in this case ALL JavaScript on the page) would halt the process and break me in at a point when I cold still get at the text. Originally I thought of using Firebug to break into the DIV element and try to manually remove any associated JavaScript or CSS but my final process described above was a much simpler and easier to use process.

Wednesday, March 23, 2011

Firefox 4.0 - released by March 22nd, 2011 - Finally!!!

Firefox 4.0 - Full Non-Beta/RC Version: released by March 22nd, 2011


So we're finally there!!! After 12 Beta and 2 RC (Release Candidate) releases the full and final version of Firefox 4.0 just came out today!!! The actual set of release notes is at:

http://www.mozilla.com/en-US/firefox/4.0/releasenotes/

And this set of release notes provides the usual list of downloads, features etc., but this one is more detailed and contains an overview of ALL work done in the 4.0 version release over the course of all the various Beta's and RC's. This release notes page is actually quite good on providing the detail of changes in FF4.0. If you haven't been working your way through the Beta's and RC's and upgrading and installing as the go then this release will be a fair change in look and feel and functionality so the release notes will be useful in giving you a look at what was done.

There are also a number of useful links Ive found associated with this release. These include the following which is a cool world map showing the number of downloads that have occurred, where they are occurring and how many per minute. Cool stuff...

http://glow.mozilla.org/

Whats more you can break it down to a per city level using an ARC graph and see totals per country and city as well. Cool stuff I say again. The 'about' page for this reads as follows:

glow.mozilla.org tracks downloads for Firefox 4. When someone clicks the download button on mozilla.com or asks for an upgrade from inside Firefox, we approximate their location based on IP address and store anonymous aggregate location information in our database. Each dot that shows up on the map represents someone who just downloaded Firefox (with a few seconds of latency as we process everything on the back-end). The counter at the top shows the total downloads of Firefox since March 22, 2011, when Firefox 4 was released. The arc chart shows those downloads broken down all the way to the city level.

Whats interesting is that out of 6 million downloads Poland has 150K+ while Australia only has 100k+ and further of these only 6000 or so are from South Australia. C'mon Ozzie's download more!!! And looking closer there are 4000 for Adelaide in general but also about 10 lone entries for Modbury and I reckon I would've fallen under that category for the download I just did not long ago. Crazy I'm one of only 10 Modbury FF4.0 users.
 
 
As a side note FF4.0 has got obvious performance improvements which are summed up neatly and concisely here: http://www.mozilla.com/en-US/firefox/performance/, and some similar but more detailed info from a techy/developer point of view: http://hacks.mozilla.org/2011/03/firefox4-performance/. While on that techy/developer side of things this blog is also useful for all things tech in FF4.0: https://developer.mozilla.org/En/Firefox_4_for_developers
 
 

Thursday, January 20, 2011

Firefox 4 - Beta's version 8 and 9: released January 20th, 2011

Firefox 4 - Beta's version 8, 9 (and now 10): released by January 20th, 2011


Okay so It's now the 20th of January. First blog post for the new year - 2011 - YAY!!!! And what have we here? Well since the last post we've got versions 8 and 9 for Firefox 4 Beta. From what I've read there will be a 10 and probably an 11 before we get an RC (most probably an RC1) followed by the real deal, a clean, no tag, Firefox 4.0 deploy .... finally!!! Crazy days!!! I've been using the Beta's at work and at home for a while now so I'm totally used to the m an din fact the 3.6.xx version or whatever it is that's the stable branch one right now seems so 'old' ... he he he. Bring it on I say. Time to get rid of the BETA tag and go full force baby!!!

Ok, so as always, here's a few release notes links... Just thinking that it'll be a pity when one day the BETA is out and we move on and these luinks will probably die. Ill have a pag3e of broken old links to release notes that dont work. Can only hope that they keep the pages up cos I'm pretty sure I wont be going back to update broken links on past pages. That just ain't ma' style baby.

http://www.mozilla.com/en-US/firefox/4.0b8/releasenotes/
http://www.mozilla.com/en-US/firefox/4.0b9/releasenotes/

It's interesting to view that diagram in my last blog entry and see the original RC1 ship date was going to be October last year ... and at this stage we are in late January with at least one or two more Beta's to go before we get to RC1.  Even Mozilla, the paragon of Open Source, with it's vast hordes of developer geek armies slips on timelines. Makes me feel a hell of a lot better about my slippage at work on project estimates and such forth :-).


Update (27 January 2011):
      http://www.mozilla.com/en-US/firefox/4.0b10/releasenotes/

Thursday, November 18, 2010

Firefox 4 - Beta version 7: released November 10th, 2010

Firefox 4 - Beta version 7: released November 10th, 2010


Ive just upgraded to the release of Firefox 4 - Beta 7 from my currently installed Beta 6 version. Now, normally there isn't much of a difference in the various Beta's ... they are Beta's after all. However, although they aren't mentioned in the release notes, there are a couple of changes that jumped out at me and were quite visible/useful. The first of these that jumped out at me is the 'waiting to load' icon at the top of the page on each TAB which is loading a particular page/URL. In the first few versions of Firefox 4-Beta this used to be a grey clock-like thing which would look like a clock-face and load as the page loaded (ie: as the page loaded the equivalent of a minute hand would move smoothly around and cover progressively more of the clock in a darker grey as opposed to the original lighter grey colour of the circle that it started off as).

Well no more!!!......

Now we are in The Land Of Oz...behold all that is pretty, witty and bright...and I pity all who are still stuck on an old Beta tonight!!!! (Sorry was taken away by a sudden urge to sing...raindrops on roses and whiskas on kittens....etc.). In this latest of Beta's we have a light green circle along the outside outline of what used to be the grey circle and now when the page is loading there is a light breen pulse that is circling clockwise and chasing its own tail to indicate that the browser is still working. Much nicer. This appears where the icon for the page normally appears (in the TAB section) and the icon is replaced by this swirling green circle, until the page re/loads at which point the icon for the page re-appears.

Furthermore the link location under a link now appears, rather than in the status bar, in the navigation bar to the right in light grey text. This looks much nicer, much more subtle than in the bottom status area and now takes up less room as well. The reload button is also now next to this URL text in the URL window. Moved from the forward and back arrow keys where it used to be instead its now moved to the right of the URL which in my opinion apart from taking up less room is also more intuitive. Further with that intuitiveness angle, the reload button is normally white with the reload arrow on it ... however when you hover over it, the background turns blue to more easily show you that you are over it and are able to select it (push/trigger it). This entire background turns red and into a cross instead of the reload button when its waiting for the relaoad to finish since at this point its doing something and hence provides you with the option to stop it (ie: hence the red and the cross to 'stop').

The ability to select Icons, Icons and Text or just text to label the various buttons at the top of the page is great as well. IMHO once you choose this you'll never modify it but nonetheless having it there and able to set it to what you want when you first start using the browser is great.  I personally have selected the 'Use Small Icons' and am also only using the icons rather than a combination of icons and text. This takes up the least amount of room along the top of the screen and I am a big fan of using the minimal amount of space at the top of the browser (unlike my mum who has a dozen different toolbars, icons and other bits and pieces installed in her browser leaving her only a small amount of space in the dead smack bang center of the screen to do anything.

The following is a link to the latest set of release notes for FF4-Beta7 listing the changes that have occurred in this release compared to the last release as well as compared to the last few releases:

http://www.mozilla.com/en-US/firefox/4.0b7/releasenotes/

Note:  Since I wrote the above....its now December 24, 2010 and Beta 8 has come out ...with an astonishing 1415+ bugs fixed in it. Odd seeing as how I cant see any diff and wasn't hitting any bugs in the old version that there could even be that many bugs let alone fixed.

http://www.seedol.com/20105652-mozilla-releases-last-batch-of-firefox-4-beta-8.html

The image below is a timeline: Mozilla's timeline shows plans to issue a Firefox 4 beta in June and make a final version by November. (Photo courtesy of Mozilla Corp retrieved from : http://www.computerworld.com/s/article/9176553/Mozilla_sets_Firefox_4_release_for_November.)

This also gives a timeline similar to the one below: https://wiki.mozilla.org/Firefox/4/Beta