Web Browser Discussion - FlashPeak Online Forum

Web Browser Software Forum. Discuss FlashPeak software products: SlimBrowser, IntelliComplete, BlazeFtp, etc.
It is currently Sun Apr 22, 2018 11:41 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject:
PostPosted: Fri Aug 27, 2004 8:39 am 
Offline
Newbie

Joined: Tue Jul 15, 2003 9:04 am
Posts: 8
Location: Sweden
I wrote this JavaScript that can be used in SlimBrowser to show the price of an eBay auction in SEK (Swedish kronor).

It could easily be adapted for other currencies.

Code:
// Exchange rate
   rate = 7.655;

// USD
   var match = /US \$([0-9.]*)</m.exec(document.body.innerHTML);

// Not USD
   var match2 = /US \$(.*)\)/m.exec(document.body.innerHTML);

   if (match2 == null) {
     var price = match[1];
   } else {
     var price = match2[1];
   }

   price = price * rate;

   alert("Cirka "+price+" kronor.");

_________________
<a href='http://www.johannaost.com' target='_blank'><img src='http://www.johannaost.com/button1.jpg' border='0' alt='user posted image'></a>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group