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

Offline myi

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Feb 2015
  • Posts: 23544
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
Does that extension manipulate the tag in the URL?
A drop down menu pops up telling me that there's x amount of cash back, click here to activate..
 You must go through the site to activate, doesn't add any tags by having an extension, just causes a drop down option to click on the offer.
 Unlike the ddf link which is on the page as a button.
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
No. Note the wink emoji, I was referring to the rule below.
Oops, I thought you found an issue on the extension, I got excited for a second there :)
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline myi

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Feb 2015
  • Posts: 23544
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
Is there any such extension that could be used on an Android device meaning a mobile phone or you going to have to do it manually by copying and pasting the link ,thanks.
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 there any such extension that could be used on an Android device meaning a mobile phone or you going to have to do it manually by copying and pasting the link ,thanks.
As far as I know there's know extension support on Chrome for Android
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline myi

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Feb 2015
  • Posts: 23544
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
As far as I know there's know extension support on Chrome for Android
I tried to download the extensions while requesting desktop site on an Android tablet and then went to an Amazon page and requested desktop site but still had no luck.
Quote
Need your LG Exalt fixed? Cracked in half? Water damage? Or parts to repair yourself. 347.201.2501

Offline myi

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Feb 2015
  • Posts: 23544
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
As far as I know there's know extension support on Chrome for Android
the only thing I could do was add a shortcut but one was too big so I had to split up into two shortcuts as you can see below.
Quote
Need your LG Exalt fixed? Cracked in half? Water damage? Or parts to repair yourself. 347.201.2501

Offline myi

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Feb 2015
  • Posts: 23544
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
As far as I know there's know extension support on Chrome for Android
do you remember the website where you can enter the whole link and will put you into regular dansdeals link? @TimT thanks
Quote
Need your LG Exalt fixed? Cracked in half? Water damage? Or parts to repair yourself. 347.201.2501

Offline TimT

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Dec 2013
  • Posts: 22077
  • Total likes: 7131
  • DansDeals.com Hat Tips 12
    • View Profile
do you remember the website where you can enter the whole link and will put you into regular dansdeals link? @TimT thanks
@myi do you mean this ?
I just created a bookmarklet that will make a DD link from any amazon item page, and format it with the title so you can paste it into a DDF post.

Here's the code:
Code: [Select]
javascript:(function(){

    var pattern = new RegExp("(https:\/\/www.amazon.com\/).*([dg]p\/)(?:product\/)?(..........).*", "i");
    var match = location.href.match(pattern);
    var URL = match[1] + "dp/" + match[3] +"/?tag=cl03f-20&smid=ATVPDKIKX0DER";
window.prompt("Press control-c","[url="+URL+"]"+document.title+"[/url]");void(0);

})()

As a reminder, to create a 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 posted above.

Maybe a mod can add it to this thread: When Posting Amazon Deals, Please Make A DD Link

It might need a little tweaking, so let me know if you have a link that it doesn't work on.

Offline lubaby

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Jun 2010
  • Posts: 5335
  • Total likes: 736
  • DansDeals.com Hat Tips 12
    • View Profile

Offline myi

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Feb 2015
  • Posts: 23544
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
IINM he is referring to this:
we will make that a he, but yes that's exactly what I'm looking for, thanks.
@myi do you mean this ?
Nope, was looking for something to use on a browser, lubaby posted the one I was looking for, but thanks for the response, I appreciate it.
Quote
Need your LG Exalt fixed? Cracked in half? Water damage? Or parts to repair yourself. 347.201.2501

Offline myi

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Feb 2015
  • Posts: 23544
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
That, and the fact that even if you tried to access the discounts, they're in very generic fields. I have an idea I want to explore today
Did this project fail? ;)
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
Did this project fail? ;)
Never got around to play with it, I might give it another try
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline good sam

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Jun 2011
  • Posts: 3340
  • Total likes: 558
  • DansDeals.com Hat Tips 10
    • View Profile
Wondering: if I access a link on mobile and it directs to the Amazon app, is the merchant link still preserved?
If you don't care why would you comment?
HT: DMYD

Offline aygart

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: May 2008
  • Posts: 17404
  • Total likes: 14342
  • DansDeals.com Hat Tips 14
    • View Profile
    • Lower Watt Energy Brokers
  • Programs: www.lowerwatt.com
For some reason neither the bookmarklet nor the extension are working for me now. Could it be the Keepa or CCC extension?
Feelings don't care about your facts

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12863
  • Total likes: 3321
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
For some reason neither the bookmarklet nor the extension are working for me now. Could it be the Keepa or CCC extension?
No clue, did you try disabling those extensions and seeing what happens? It makes sense that they could affect the DD extension, but it would surprise me if they affect the bookmarklet too.
Workflowy. You won't know what you're missing until you try it.

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
For some reason neither the bookmarklet nor the extension are working for me now. Could it be the Keepa or CCC extension?
Hmmmm, I have both Keepa and CCC chrome extensions installed, and the DDF extension is working for me. Did you try disabling Keepa and CCC?
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12863
  • Total likes: 3321
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
For some reason neither the bookmarklet nor the extension are working for me now. Could it be the Keepa or CCC extension?
Also can you post a link that's not working? Maybe it's not all of them.
Workflowy. You won't know what you're missing until you try it.

Offline aygart

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: May 2008
  • Posts: 17404
  • Total likes: 14342
  • DansDeals.com Hat Tips 14
    • View Profile
    • Lower Watt Energy Brokers
  • Programs: www.lowerwatt.com
Meanwhile today both the extension and the bookmarklet are working in both FF and Chrome. Yesterday it wasn't working in either.
Feelings don't care about your facts

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
Meanwhile today both the extension and the bookmarklet are working in both FF and Chrome. Yesterday it wasn't working in either.
Good to hear
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline aygart

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: May 2008
  • Posts: 17404
  • Total likes: 14342
  • 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 #139 on: August 09, 2017, 11:52:24 AM »
Many of the posts which seem to have been made using the bookmarklet or addin have not been clickable in Tapa for me such as this one
http://forums.dansdeals.com/index.php?topic=82556.0



$152.96 - Amazon.com : Outsunny 4-Piece Cushioned Outdoor Rattan Wicker Chair and Loveseat Furniture Set : Patio, Lawn & Garden




$221.78 - Amazon.com : Outsunny 4-Piece Outdoor Rattan Wicker Loveseat and Chair Set : Patio, Lawn & Garden




$234.95 - Amazon.com : Outsunny 4-Piece Cushioned Outdoor Rattan Wicker Sofa Sectional Patio Furniture Set : Patio, Lawn & Garden




$296.83 - Amazon.com: Outsunny 4 Piece Outdoor Aluminum Patio Conversation Lounge Set: Patio, Lawn & Garden




$356.81 - Amazon.com : Outsunny 4pc Modern Sectional Patio Furniture Conversation Set - Grey : Patio, Lawn & Garden




$222.55 (clip $20 coupon) - Amazon.com : Outsunny 3-Piece Outdoor Rattan Wicker Sofa and Chaise Lounge Set - Brown and Tan : Patio, Lawn & Garden




$70.13 - Amazon.com : Outsunny 50" Blossoming Garden Decorative Patio Park Bench : Patio, Lawn & Garden




$167.31 - Amazon.com: Outsunny 12’ x 12’ Steel Hexagonal Gazebo w/ Side Panels - Black/Beige: Patio, Lawn & Garden




$57.17 - Amazon.com : Outsunny 10' Solar Powered LED Lit Market Patio Umbrella - Wine Red : Patio, Lawn & Garden




$40 - Amazon.com : Outsunny 2-Person Folding Aluminum Love Seat Camping Chair - Red : Sports & Outdoors




$36.64 - Amazon.com : Outsunny 6.5' x 4.67' x 2.5' Outdoor Compact Walk-in Greenhouse : Patio, Lawn & Garden


« Last Edit: August 09, 2017, 11:56:52 AM by aygart »
Feelings don't care about your facts