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!

---

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.

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

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1154
  • Total likes: 79
  • 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 #255 on: December 05, 2018, 11:44:12 PM »
Wow that was fast! Is there any way to manually update or do I have to wait for it to happen by itself?
I believe you have to wait for Google to push it, but it should happen within 12-24 hours
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline etech0

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Dec 2013
  • Posts: 9385
  • Total likes: 312
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #256 on: December 05, 2018, 11:47:29 PM »
I believe you have to wait for Google to push it, but it should happen within 12-24 hours
I think I can wait that long :) thanks!
Workflowy. You won't know what you're missing until you try it.

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1154
  • Total likes: 79
  • 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 #257 on: December 05, 2018, 11:55:58 PM »
I think I can wait that long :) thanks!
Actually, you can go to chrome://extensions/ and tick "Developer Mode" on the top right hand corner, once developer mode is enabled you can click on "Update" on the left hand side to force update all of your extensions
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline myi

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Feb 2015
  • Posts: 16291
  • Total likes: 1030
  • DansDeals.com Hat Tips 285
  • Gender: Male
    • View Profile
  • Location: Brooklyn /Israel /Lakewood /TorontoCanada!
  • Programs: 2Many2List!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #258 on: December 06, 2018, 12:55:47 AM »
Actually, you can go to chrome://extensions/ and tick "Developer Mode" on the top right hand corner, once developer mode is enabled you can click on "Update" on the left hand side to force update all of your extensions
Will try tom when I'm near my computer. Thanks for all your effort, and time spent for this.
Don't try to be someone else , be who you are because everyone else is taken.

Offline etech0

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Dec 2013
  • Posts: 9385
  • Total likes: 312
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #259 on: December 06, 2018, 09:56:05 AM »
Actually, you can go to chrome://extensions/ and tick "Developer Mode" on the top right hand corner, once developer mode is enabled you can click on "Update" on the left hand side to force update all of your extensions
Looks like that fixed it - thanks!!! It also fixed another issue where if you were looking at an item which came in different colors or sizes, each time you changed the color or size you had to wait for the page to reload.

Much appreciated!
Workflowy. You won't know what you're missing until you try it.

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1154
  • Total likes: 79
  • 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 #260 on: December 06, 2018, 09:57:21 AM »
Looks like that fixed it - thanks!!! It also fixed another issue where if you were looking at an item which came in different colors or sizes, each time you changed the color or size you had to wait for the page to reload.

Much appreciated!

Awesome! Thanks for the update
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline myi

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Feb 2015
  • Posts: 16291
  • Total likes: 1030
  • DansDeals.com Hat Tips 285
  • Gender: Male
    • View Profile
  • Location: Brooklyn /Israel /Lakewood /TorontoCanada!
  • Programs: 2Many2List!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #261 on: December 06, 2018, 02:17:06 PM »
Looks like that fixed it - thanks!!! It also fixed another issue where if you were looking at an item which came in different colors or sizes, each time you changed the color or size you had to wait for the page to reload.

Much appreciated!
I guess it's time to reload the extension. Thanks @JoeyShmoe and thanks @etech0
Don't try to be someone else , be who you are because everyone else is taken.

Offline myi

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Feb 2015
  • Posts: 16291
  • Total likes: 1030
  • DansDeals.com Hat Tips 285
  • Gender: Male
    • View Profile
  • Location: Brooklyn /Israel /Lakewood /TorontoCanada!
  • Programs: 2Many2List!
Don't try to be someone else , be who you are because everyone else is taken.

Offline etech0

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Dec 2013
  • Posts: 9385
  • Total likes: 312
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #263 on: April 14, 2019, 09:33:28 PM »
Is it only me? or this one item doesn't work?

https://www.amazon.com/dp/B000HDK0DC/?tag=cl03f-20&smid=ATVPDKIKX0DER&th=1
same here. the old version of the bookmarklet, which doesn't pull in the image, works. My guess is that this full screen image works differently than most product images.
Workflowy. You won't know what you're missing until you try it.

Offline ludmila

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2012
  • Posts: 5136
  • Total likes: 263
  • DansDeals.com Hat Tips 0
    • View Profile
  • Location: IND
  • Programs: Hilton Diamond,Marriott Platinum,SPG Platinum.
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #264 on: April 14, 2019, 09:37:55 PM »
same here. the old version of the bookmarklet, which doesn't pull in the image, works. My guess is that this full screen image works differently than most product images.
+1 Same here.
I was the Best,still the Best, and will always be the Best.
Pele Good,Maradona Better, George Best.

Offline yesitsme

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Dec 2014
  • Posts: 1553
  • Total likes: 186
  • DansDeals.com Hat Tips 4
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #265 on: April 14, 2019, 10:00:41 PM »
Hint Hint, Take a look @ camel Camel you won't need to reinvent the wheel

Offline etech0

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Dec 2013
  • Posts: 9385
  • Total likes: 312
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
@JoeyShmoe  are you able to make an option to automatically redirect links to smile.amazon.com?
Workflowy. You won't know what you're missing until you try it.

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1154
  • Total likes: 79
  • DansDeals.com Hat Tips 0
  • Gender: Male
    • View Profile
  • Location: Lakewood
@JoeyShmoe  are you able to make an option to automatically redirect links to smile.amazon.com?
I believe that option existed at some point and I had to remove it for some reason. I'll revisit
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline etech0

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Dec 2013
  • Posts: 9385
  • Total likes: 312
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
I believe that option existed at some point and I had to remove it for some reason. I'll revisit
Thanks!
Workflowy. You won't know what you're missing until you try it.

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1154
  • Total likes: 79
  • DansDeals.com Hat Tips 0
  • Gender: Male
    • View Profile
  • Location: Lakewood
I believe that option existed at some point and I had to remove it for some reason. I'll revisit
Thanks!

Extension was updated. Version 0.9.1 has an option to redirect to Amazon Smile. I also cleaned up some of the code, which included redirecting before the page loaded so you won't see a page load then reload just to add the tag or smile.amazon...
DDF A-Z Link Extension
Chrome
Firefox
Info