User talk:Lunchboxhero/monobook.js

From Wikipedia, the free encyclopedia

Contents

[edit] Headline 1

i tried this every time with empty cache:

1) reload this code page it didnt work


2) save code in a seperate temp.js file(most likely won't work)

and open it

--Roaming 11:03, 13 December 2005 (UTC)


You need to copy the code that is on User:Lunchboxhero/monobook.js to your user monobook.js page. In your case, it would be User:Roaming/monobook.js.Lunchboxhero
THANKS WORKS GREAT out of the box this A9.com replacement for amazon.com code in the respective line worked also well for me, should work with the bookpage or seach enginepage of choice replacing 'www ... ' with page of choice (not really there is a minor disapt about the program) document.links[i].href='http://www.a9.com/isbn%20'+RegExp.$1;



[edit] Headline 2

Please sir, I cannot get it to work either. I use a mozilla browser. Can you please look at my page and advice me how it is wrong? User:Engwar/monobook.js A human 03:10, 31 December 2005 (UTC) A: sure i douls look at you page




Would the cache reloading instructions be any different for Opera? I just tried your script and still get the Book sources article. -thanks, Onceler 19:07, 14 February 2006 (UTC)

[edit] Firefox/Mozilla/Opera workaround.

I tried to set this up in Firefox and it wouldn't work. So I set it up in IE. Opened Firefox back up, and it works. Voila. Try the same fix for other browsers. If it doesnt work just hit it with a hammer.

[edit] Minor (random) suggestion

Not meaning to be patronising, but you don't necessarily need the variable ln here:

        var ln = document.links[i].href.match(/isbn=(.*)/);
        if (ln) {
          document.links[i].href='http://www.amazon.com/exec/obidos/ASIN/'+RegExp.$1;
        }

This would work too:

        if( document.links[i].href.match(/isbn=(.*)/) ) {
          document.links[i].href='http://www.amazon.com/exec/obidos/ASIN/'+RegExp.$1;
        }

It's small, but I figure that this code is used lots so it might make a noticeable difference. *shrugs* It's up to you though, Mr. Lunchboxhero. :) -- drrngrvy tlk @ 19:26, 28 August 2006 (UTC)

[edit] Adapt to make $wgBookstoreListEn serve an Amazon.com affiliate bookstore

Dear LBH:

I'm trying to rework $wgBookstoreListEn in Language.php so that the ISBN Book Source link tells Amazon that the user is coming into the Amazon site from my site. I've modified the relevant line in

/* private */ $wgBookstoreListEn = array(

       "AddALL" => "http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN",
       "PriceSCAN" => "http://www.pricescan.com/books/bookDetail.asp?isbn=$1",
       "Barnes & Noble" => "http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1",
       "Amazon.com" => "http://www.amazon.com/exec/obidos/ISBN=$1"

to:

       "Amazon.com" => "http://www.amazon.com/exec/obidos/ISBN=$1/ref=ase/theclausewitzhomA/" 

but the link produced is still simply http://www.amazon.com/exec/obidos/ISBN=0385720386.

Any idea what the problem is?

Thanks,

Chris

[edit] Amazon: Looking for something?

Your code works, but the link produced http://www.amazon.com/exec/obidos/ASIN/8877500182 caused Amazon to say "We're sorry. The Web address you entered is not a functioning page on our site." There seems to be some problem, but I'm not sure how to fix it. -- Jreferee 20:10, 20 October 2006 (UTC)

Amazon doesn't have a book with that ISBN number.

Lunchboxhero