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

Offline as2

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Mar 2013
  • Posts: 5703
  • Total likes: 895
  • DansDeals.com Hat Tips 24
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #460 on: December 13, 2021, 11:02:46 AM »
Tried the bot?

It's having some issues I don't have time to deal with.


Sorry, I didn't see these posts until now.


I noticed the little box "click here to make a dd friendly link" or whatever it was wasn't working. I didn't realize I could make it automatically redirect to the affiliate link, so I changed it to that and now it seems to add in the affiliate code automatically. Thanks for your work @Yo ssi and @JoeyShmoe
Memories last forever, make them while you can.

Offline Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 4986
  • Total likes: 1751
  • DansDeals.com Hat Tips 45
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #461 on: December 13, 2021, 12:40:42 PM »
If someone knows some JS I wants to help fix the bet please PM me. Also @joeshmoe if you'd like to incorporate some concepts please let me know.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1235
  • Total likes: 169
  • 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 #462 on: December 13, 2021, 12:44:04 PM »
If someone knows some JS I wants to help fix the bet please PM me. Also @joeshmoe if you'd like to incorporate some concepts please let me know.
Sure, I'll happily work on making them more uniform, and will gladly assist you (although I've never worked on a Telegram bot - can't imagine it's too difficult)
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 4986
  • Total likes: 1751
  • DansDeals.com Hat Tips 45
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #463 on: December 13, 2021, 12:47:33 PM »
Sure, I'll happily work on making them more uniform, and will gladly assist you (although I've never worked on a Telegram bot - can't imagine it's too difficult)
PM sent.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1235
  • Total likes: 169
  • 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 #464 on: December 16, 2021, 10:57:40 AM »
The extension should be updated (you can confirm by checking that you have version 0.9.4).

I know there are some bugs, but I was waiting for approval on the store, so now I can start fixing and adding new stuff.

@Yo ssi I didn't get around to playing with your stuff. I'm gonna PM you later
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline YitzyS

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Jan 2015
  • Posts: 4491
  • Total likes: 9433
  • DansDeals.com Hat Tips 31
  • Gender: Male
    • View Profile
  • Location: Lakewood, NJ
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #465 on: December 16, 2021, 11:06:51 AM »
The extension should be updated (you can confirm by checking that you have version 0.9.4).

I know there are some bugs, but I was waiting for approval on the store, so now I can start fixing and adding new stuff.

@Yo ssi I didn't get around to playing with your stuff. I'm gonna PM you later



Offline Rezol

  • DansDeals Copper Elite
  • *
  • Join Date: Mar 2022
  • Posts: 1
  • Total likes: 0
  • DansDeals.com Hat Tips 0
    • View Profile

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1235
  • Total likes: 169
  • 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 #467 on: April 06, 2022, 10:45:07 AM »
V0.9.5 is out, there was another type of page that wasn't generating the amount correctly, it's fixed in the update

See: https://forums.dansdeals.com/index.php?topic=128698.msg2572429#msg2572429
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Abebee

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Nov 2015
  • Posts: 5268
  • Total likes: 376
  • DansDeals.com Hat Tips 234
  • Gender: Male
    • View Profile
  • Location: New York
  • Programs: National EE
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #468 on: April 06, 2022, 12:10:01 PM »
Not working for me. The $20 should be crossed out and $10 price is not showing up.

GUESS Ynes Card Holder Wallet ($20.00)


Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1235
  • Total likes: 169
  • 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 #469 on: April 06, 2022, 12:11:55 PM »
Not working for me. The $20 should be crossed out and $10 price is not showing up.

GUESS Ynes Card Holder Wallet ($20.00)
I'm guessing it's yet another page style, I'll look into it shortly
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1235
  • Total likes: 169
  • 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 #470 on: April 06, 2022, 12:29:04 PM »
Not working for me. The $20 should be crossed out and $10 price is not showing up.

GUESS Ynes Card Holder Wallet ($20.00)


Fixed in v0.9.6, update should be available already
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Abebee

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

Offline Abebee

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Nov 2015
  • Posts: 5268
  • Total likes: 376
  • DansDeals.com Hat Tips 234
  • Gender: Male
    • View Profile
  • Location: New York
  • Programs: National EE
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #472 on: April 19, 2022, 08:21:12 AM »
First time using telegram bot. Great for mobile. When i tried a second link its not generating link. See attached


Offline Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 4986
  • Total likes: 1751
  • DansDeals.com Hat Tips 45
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #473 on: April 19, 2022, 10:42:01 AM »
First time using telegram bot. Great for mobile. When i tried a second link its not generating link. See attached

Unfortunately the proxy isn't working always, I'm not sure why. If anyone knows a good proxy that amazon doesn't block, I can try and fix it.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 4986
  • Total likes: 1751
  • DansDeals.com Hat Tips 45
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #474 on: April 19, 2022, 03:17:44 PM »
@Abebee

Just took a double look the issue here wasn't the proxy, it was a price error, should be all fixed now :)
I also added a second fallback proxy, which will hopefully make it more stable.



If you know any product with a 'save at checkout' discount please let me know.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Abebee

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Nov 2015
  • Posts: 5268
  • Total likes: 376
  • DansDeals.com Hat Tips 234
  • Gender: Male
    • View Profile
  • Location: New York
  • Programs: National EE
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #475 on: April 27, 2022, 09:46:59 AM »
Price on the page is $17.49, its coming up as $15.49

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


Offline Abebee

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

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1235
  • Total likes: 169
  • 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 #477 on: April 27, 2022, 11:03:36 AM »
Hoppe's No. 9 Gun Cleaning Patch, .270-.35 Caliber (650 Pack) ($6.45 $1.49)


This one seems to be working correctly

Price on the page is $17.49, its coming up as $15.49

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


This one comes up without the current price by me, I have an update that fixes it, I'll upload soon
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 4986
  • Total likes: 1751
  • DansDeals.com Hat Tips 45
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #478 on: April 27, 2022, 11:07:42 AM »
This one comes up without the current price by me, I have an update that fixes it, I'll upload soon
My bot sees the "50% off gift wrap service" and changes the price to half price ;D
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1235
  • Total likes: 169
  • 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 #479 on: April 27, 2022, 11:13:11 AM »
My bot sees the "50% off gift wrap service" and changes the price to half price ;D
Lol
DDF A-Z Link Extension
Chrome
Firefox
Info