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 411840 times)

Online Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 7496
  • Total likes: 3105
  • DansDeals.com Hat Tips 66
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #500 on: November 26, 2023, 09:09:17 PM »
@Dan may want to consider making a Amazon page. Then when using an affiliate link it shows a nice message in the app.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Aerial Dag

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Jun 2013
  • Posts: 1103
  • Total likes: 95
  • DansDeals.com Hat Tips 7
    • View Profile
  • Location: MS Desert
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #501 on: February 15, 2024, 09:43:11 AM »
If I want Dan to get credit for an amazon purchase, I can always just click on any Amazon link on the DDMS and then go through purchasing the actual product I want, right?

Online Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 7496
  • Total likes: 3105
  • DansDeals.com Hat Tips 66
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #502 on: February 15, 2024, 07:12:04 PM »
If I want Dan to get credit for an amazon purchase, I can always just click on any Amazon link on the DDMS and then go through purchasing the actual product I want, right?
Don't think so
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Online AsherO

  • Global Moderator
  • Dansdeals Lifetime 25K Presidential Platinum Elite
  • **********
  • Join Date: May 2008
  • Posts: 32117
  • Total likes: 8951
  • DansDeals.com Hat Tips 79
    • View Profile
  • Location: NYC
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #503 on: March 26, 2024, 07:59:28 PM »
Website in the Wiki doesn’t seem to work for me
DDF FFB (Forum From Birth)

Online Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 7496
  • Total likes: 3105
  • DansDeals.com Hat Tips 66
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #504 on: March 26, 2024, 08:22:34 PM »
Website in the Wiki doesn’t seem to work for me
Yup, neither does the bot, haven't had time to upkeep the code, but it has been made open source.

I definitely post less deals because of that
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/