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

Offline myi

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Feb 2015
  • Posts: 23540
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
The button comes up that way because they manually changed the style for buttons. You can still click on the link...

... although, this has a totally different page style, so something is broken and errors when you click on the link  >:(
Is it because it's a prime now product! Or shouldnt make a difference?
Quote
Need your LG Exalt fixed? Cracked in half? Water damage? Or parts to repair yourself. 347.201.2501

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1276
  • Total likes: 254
  • DansDeals.com Hat Tips 0
  • Gender: Male
    • View Profile
  • Location: Lakewood
Is it because it's a prime now product! Or shouldnt make a difference?
Looks like they use a total different styling for Prime Now. I'll dig into it when I get a chance. Shouldn't be too hard to crack
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
It would be nice to set up a small website (or subdomain) for mobile users, so they can easily copy the amazon link and receive a nice formatted link in return, @joe shmoe are you willing / able to make this?
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12861
  • Total likes: 3316
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
It would be nice to set up a small website (or subdomain) for mobile users, so they can easily copy the amazon link and receive a nice formatted link in return, @joe shmoe are you willing / able to make this?
I would think it shouldn't be a big deal since the code (in the extension) is already there... but it's not something I know how to do :(
Workflowy. You won't know what you're missing until you try it.

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
I would think it shouldn't be a big deal since the code (in the extension) is already there... but it's not something I know how to do :(
I could probably figure it out, but it would nice for it to be like amazon.dansdeals.com
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12861
  • Total likes: 3316
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
I could probably figure it out, but it would nice for it to be like amazon.dansdeals.com
Might need to get @Dan involved then...
Workflowy. You won't know what you're missing until you try it.

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
It would be nice to set up a small website (or subdomain) for mobile users, so they can easily copy the amazon link and receive a nice formatted link in return, @joe shmoe are you willing / able to make this?
Also to add automatically copying to clipboard (on the extension as well) would be a nice added touch.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12861
  • Total likes: 3316
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Also to add automatically copying to clipboard (on the extension as well) would be a nice added touch.
The Chrome extension does that already
Workflowy. You won't know what you're missing until you try it.

Offline Abebee

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Nov 2015
  • Posts: 6380
  • Total likes: 591
  • DansDeals.com Hat Tips 735
  • Gender: Male
    • View Profile
  • Location: New York
  • Programs: National EE
It would be nice to set up a small website (or subdomain) for mobile users, so they can easily copy the amazon link and receive a nice formatted link in return, @joe shmoe are you willing / able to make this?
Just curious - Is there an efficient way to find deals on mobile?

Offline myi

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Feb 2015
  • Posts: 23540
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
I could probably figure it out, but it would nice for it to be like amazon.dansdeals.com
Go for it, the challenge is on!  ;)
Quote
Need your LG Exalt fixed? Cracked in half? Water damage? Or parts to repair yourself. 347.201.2501

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Just curious - Is there an efficient way to find deals on mobile?
What's your efficient way on a desktop?
Go for it, the challenge is on!  ;)
I'll leave it for the pros
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12861
  • Total likes: 3316
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
What's your efficient way on a desktop?I'll leave it for the pros
Trade secret!
Workflowy. You won't know what you're missing until you try it.

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Trade secret!
My point exactly...
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline yungermanchik

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Nov 2018
  • Posts: 2667
  • Total likes: 2047
  • DansDeals.com Hat Tips 2
    • View Profile
  • Location: Previous Signatures: If you chapped hana'ah from a post, like it; You think you know the answers and things are the way they seem.. it just ain't so -The Rebbe from Lublin-
What is the walmart.com version of this bookmarklet?
Small people talk about other people.
Average people talk about things
BIG PEOPLE TALK ABOUT IDEAS.

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12861
  • Total likes: 3316
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
What is the walmart.com version of this bookmarklet?
IIRC it was discussed but building the links was more complicated
Workflowy. You won't know what you're missing until you try it.

Offline yesitsme

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Dec 2014
  • Posts: 5020
  • Total likes: 2237
  • DansDeals.com Hat Tips 4
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #295 on: November 27, 2020, 03:27:15 PM »
It would be nice to set up a small website (or subdomain) for mobile users, so they can easily copy the amazon link and receive a nice formatted link in return, @joe shmoe are you willing / able to make this?
Are looking to paste a Amazon link and get it back with the referral link?
["-"]

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #296 on: November 27, 2020, 03:31:14 PM »
Are looking to paste a Amazon link and get it back with the referral link?
Yes, more particularly with the picture and info, like the extension.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline yesitsme

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Dec 2014
  • Posts: 5020
  • Total likes: 2237
  • DansDeals.com Hat Tips 4
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #297 on: November 27, 2020, 03:38:14 PM »
Yes, more particularly with the picture and info, like the extension.
the concept started that way but not with all formatting
http://forums.perpetualtalk.com/lab/amazon.html
Just paste in the link.
domain changed
["-"]

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #298 on: November 27, 2020, 03:43:49 PM »
the concept started that way but not with all formattingdomain changed
Did it change or is it absolute?

The idea is on mobile to be able to easily add the link in.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline yesitsme

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Dec 2014
  • Posts: 5020
  • Total likes: 2237
  • DansDeals.com Hat Tips 4
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #299 on: November 27, 2020, 03:45:50 PM »
Did it change or is it absolute?

The idea is on mobile to be able to easily add the link in.
change
["-"]