Topic Wiki

UPDATE:
@JoeyShmoe did a great job creating a Chrome Extension and a Firefox Extension to save us all the hassle of setting up a bookmarklet. The extension will place a button on any Amazon product page. When you click the button it will copy a link to your clipboard, which you can paste into any DDF post. The post will then contain the product title, image, and a working link to the product.

Thanks @JoeyShmoe!

NEW OPTION!
Works on mobile or desktop
Telegram Bot | Website


---

For anyone who doesn't want to install a browser extension, read below how to set up the bookmarklet:

Here is a bookmarklet that will make a DD link from any amazon item page, and format it with the title and an image so you can paste it into a DDF post.

Example:

Little Tikes Rocking Horse Magenta ($34.07)



(Not sure what a bookmarklet is? Read more about them in this thread: http://forums.dansdeals.com/index.php?topic=61269.5.)

Here's how to install the bookmarklet:

1. If you don't currently see a row of bookmarks on the top of your browser, you will need to show the bookmarks bar.
- In Chrome, click the 3 vertical dots at the top right of your screen, click Settings, and click Always Show the Bookmarks Bar.
- In Firefox, click the 3 horizontal lines at the top right of your screen, and click Customize. Then click Show/Hide Toolbars (bottom left of your screen) and check off the Bookmarks Toolbar.

2. Copy the following code. (To do so, click the SELECT button and then press control-c on your keyboard.)
Code: [Select]
javascript: (function() {
    var pattern = new RegExp("(https:\/\/www.amazon.com\/).*([dg]p\/)(?:product\/)?(..........).*|(https:\/\/smile.amazon.com\/).*([dg]p\/)(?:product\/)?(..........).*", "i"),
        match = location.href.match(pattern),
        image = document.getElementById('landingImage').src;
    var price = "";
    if (document.getElementById('priceblock_dealprice') !== null) {
        price = " (" + document.getElementById('priceblock_dealprice').innerHTML + ")";
    } else if (document.getElementById('priceblock_ourprice') !== null) {
        price = " (" + document.getElementById('priceblock_ourprice').innerHTML + ")";
    }
    var URL = (match[1] !== undefined) ? match[1] + "dp/" + match[3] + "/?tag=cl03f-20&smid=ATVPDKIKX0DER" : match[4] + "dp/" + match[6] + "/?tag=cl03f-20&smid=ATVPDKIKX0DER";
    var result = "[url=" + URL + "]" + document.title + price + "[/url][br][br][url=" + URL + "][img]" + image + "[/img][/url]";
    if (document.execCommand('copy') !== false) {
        var ddLink = document.createElement('span'),
            range = document.createRange();
        ddLink.id = "ddLink";
        ddLink.innerText = result;
        document.body.appendChild(ddLink);
        range.selectNode(document.getElementById('ddLink'));
        window.getSelection().addRange(range);
        document.execCommand('copy');
        document.getElementById('ddLink').remove();
        setTimeout(function() {
            alert('DD link copied to clipboard...')
        }, 1000);
    } else {
        window.prompt("Press control-c", result);
    }
    void(0);
})()

3. To create the bookmarklet, right click on your bookmarks bar and click "Add page" (if you're in Chrome) or "New bookmark" (Firefox).

For the Name, enter whatever you want (eg: Dan Amazon link), and for the URL/Location enter the code above, which you already copied.

4. Click Save (Chrome) or Add (Firefox)

To use the bookmarklet, simply click on the bookmark you created (in step 3) when you are on any amazon product page. Follow the prompts (you may need to press control-c to copy what pops up), and then paste it into any DDF post.

Enjoy!

Disclaimer: The code might need a little tweaking, so let me know if you have a link that it doesn't work on. If there are any changes I will update the wiki.
« Last edited by Yo ssi on February 23, 2021, 07:57:42 PM »

Author Topic: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon  (Read 355536 times)

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1286
  • Total likes: 254
  • DansDeals.com Hat Tips 0
  • Gender: Male
    • View Profile
  • Location: Lakewood
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #480 on: April 27, 2022, 11:36:04 AM »
@Abebee please update your extension to 0.9.7 (lemme know if you need a hand with that), should fix the above issue
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Abebee

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Nov 2015
  • Posts: 6396
  • Total likes: 597
  • DansDeals.com Hat Tips 735
  • Gender: Male
    • View Profile
  • Location: New York
  • Programs: National EE
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #481 on: April 27, 2022, 11:41:23 AM »
@Abebee please update your extension to 0.9.7 (lemme know if you need a hand with that), should fix the above issue
Updated, will let you know. TY

Offline WonderingYid

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Jun 2021
  • Posts: 1558
  • Total likes: 298
  • DansDeals.com Hat Tips 3
    • View Profile
  • Location: New York
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #482 on: April 27, 2022, 03:26:54 PM »
Price on the page is $17.49, its coming up as $15.49

Mr. Coffee Iced Coffee Maker, Black ($39.99 $15.49)


Buy box for me is $15.49 warehouse deals.

Offline Abebee

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Nov 2015
  • Posts: 6396
  • Total likes: 597
  • DansDeals.com Hat Tips 735
  • Gender: Male
    • View Profile
  • Location: New York
  • Programs: National EE

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1286
  • Total likes: 254
  • DansDeals.com Hat Tips 0
  • Gender: Male
    • View Profile
  • Location: Lakewood
The Children's Place Boys Sleeve Top and Shorts Snug Fit Cotton 2 Piece Pajama Sets ($18.98 $7.48)



second deal today not taking it to size/color etc. TY
That might be a hard nut to crack, but I'll work on trying to figure out something
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6801
  • Total likes: 2637
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
That might be a hard nut to crack, but I'll work on trying to figure out something
Regex
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1286
  • Total likes: 254
  • DansDeals.com Hat Tips 0
  • Gender: Male
    • View Profile
  • Location: Lakewood
Regex
Assuming you mean for the URL? No need for a regex. I'd rather look for a variable on the page with that info like I'm using the ASIN now
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1286
  • Total likes: 254
  • DansDeals.com Hat Tips 0
  • Gender: Male
    • View Profile
  • Location: Lakewood
Regex
Also, using the URL still only gives a type not the size
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6801
  • Total likes: 2637
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Assuming you mean for the URL? No need for a regex. I'd rather look for a variable on the page with that info like I'm using the ASIN now
Let me know if you find one please
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Abebee

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Nov 2015
  • Posts: 6396
  • Total likes: 597
  • DansDeals.com Hat Tips 735
  • Gender: Male
    • View Profile
  • Location: New York
  • Programs: National EE

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6801
  • Total likes: 2637
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
@Yo ssi
Thanks! That's a strange one because in my test code (using essentially the same code) it does work. Anyway I'll add it to the list.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6801
  • Total likes: 2637
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
@Euclid will be happy to note that I'm officially making my code open source in honor of my 5000th(!) post

All I can say is, be it a thread or a bug, I definitely had fun!
p.s. still looking at that poll result...

I'm hoping someone will have fun with the mess I created



Believe it or not, this wasn't generated with DDF Link Generator :) Telegram Bot | Website

_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6801
  • Total likes: 2637
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #492 on: November 06, 2022, 02:03:58 PM »
New Update!

  • Now the bot lets you use one click(!) to auto fill out a new thread in the forum for you and preview it.
  • Also added one click link to search DDF for the ASIN



Telegram Bot | Website
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Abebee

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Nov 2015
  • Posts: 6396
  • Total likes: 597
  • DansDeals.com Hat Tips 735
  • Gender: Male
    • View Profile
  • Location: New York
  • Programs: National EE
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #493 on: November 06, 2022, 10:35:08 PM »
New Update!

  • Now the bot lets you use one click(!) to auto fill out a new thread in the forum for you and preview it.
  • Also added one click link to search DDF for the ASIN



Telegram Bot | Website
Very cool. Is there anyway to customize the bot to post in my thread?

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6801
  • Total likes: 2637
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #494 on: November 06, 2022, 10:59:22 PM »
Very cool. Is there anyway to customize the bot to post in my thread?
Not unless I change it for everyone, you can though copy the link and replace the board number with your topic.
So for example you'd switch ...action=post;board=26.0;subject=... to ...action=post;topic=118515;subject=...

Kind of loose the speed though :/
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Online aygart

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: May 2008
  • Posts: 18360
  • Total likes: 14562
  • DansDeals.com Hat Tips 14
    • View Profile
    • Lower Watt Energy Brokers
  • Programs: www.lowerwatt.com
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #495 on: November 15, 2022, 11:17:31 PM »
Lol. Looks like the link generator doesn't support thousands.
Feelings don't care about your facts

Offline TzviR

  • Dansdeals Platinum Elite + Lifetime Silver Elite
  • *****
  • Join Date: Sep 2020
  • Posts: 707
  • Total likes: 704
  • DansDeals.com Hat Tips 3
    • View Profile
    • [b]Learn to play for a kumzits in 5 weeks!
  • Location: Fl
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #496 on: December 01, 2022, 09:27:13 PM »
I haven't used the DDF link generator in a while but I tried using it tonight but it's not working. Does it still work?

My  prizes from CV :)

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6801
  • Total likes: 2637
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #497 on: December 01, 2022, 10:31:28 PM »
I haven't used the DDF link generator in a while but I tried using it tonight but it's not working. Does it still work?
Sometimes not, but for most products it's working
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline mevinyavin

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Sep 2022
  • Posts: 1834
  • Total likes: 2279
  • DansDeals.com Hat Tips 1
  • Gender: Male
    • View Profile
    • Laptop help/deal request template
  • Location: Yerushalayim
  • Programs: Windows 10 and 11 Home, Word/Excel/Publisher 2021, Wordweb, McGill English Dictionary of Rhyme, VLC, Torat Emet, 7-Zip, Lightshot, Calibre, FDM, FreeFileSync, Teracopy, Handbreak, Lightshot
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #498 on: January 04, 2023, 01:23:01 AM »
Just noticed this because the OP posted somewhere else. Added.
(I am always sharing Amazon links for my computer help gemach. May as well give a Yid some parnassah.)
Quote from: ExGingi
Echo chambers are boring and don't contribute much to deeper thinking and understanding!

Offline Abebee

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Nov 2015
  • Posts: 6396
  • Total likes: 597
  • DansDeals.com Hat Tips 735
  • Gender: Male
    • View Profile
  • Location: New York
  • Programs: National EE
« Last Edit: March 29, 2023, 12:02:35 PM by Abebee »