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 351430 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!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #240 on: November 23, 2018, 01:21:58 AM »
    I’ve been using the Chrome extension bookmark for the past while, I truly loved it for the times I would post deals from my computer, thanks etech & joey smoey. But I got to say it’s very very annoying that any time I would want to go back a page on my browser I would have to click the back button at least 2 times simultaneously to go back a page, not to mention when a family member would be using the computer shopping on amazon I always felt bad they had no clue why the back button doesn’t work on amazon and while trying with multiple clicks on the back button it wouldn’t budge the page only reload. So it seems I’m going to have to revert to the  good old method, the bookmarklet. unless there’s a way to avoid having to click the back arrow/button multiple times before being able to go back a page. I’m curios to know is only on my computer or is this a common side effect? Does this work better on Firefox? @JoeyShmoe @etech0
« Last Edit: November 23, 2018, 01:34:50 AM by myi »
Quote
Need your LG Exalt fixed? Cracked in half? Water damage? Or parts to repair yourself. 347.201.2501

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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #241 on: November 23, 2018, 08:26:20 AM »
    I’ve been using the Chrome extension bookmark for the past while, I truly loved it for the times I would post deals from my computer, thanks etech & joey smoey. But I got to say it’s very very annoying that any time I would want to go back a page on my browser I would have to click the back button at least 2 times simultaneously to go back a page, not to mention when a family member would be using the computer shopping on amazon I always felt bad they had no clue why the back button doesn’t work on amazon and while trying with multiple clicks on the back button it wouldn’t budge the page only reload. So it seems I’m going to have to revert to the  good old method, the bookmarklet. unless there’s a way to avoid having to click the back arrow/button multiple times before being able to go back a page. I’m curios to know is only on my computer or is this a common side effect? Does this work better on Firefox? @JoeyShmoe @etech0
I have the same problem with the chrome extension. @JoeyShmoe any ideas/advice?
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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #242 on: December 05, 2018, 08:55:29 AM »
@myi @etech0 Sorry for the late reply.

I'm not following, this happens when you use the extension and click on the button to copy the link? I just tried it and it worked fine (I clicked on the button to copy the link, then clicked on the back button to go back and it worked the first time). Can you give me an example product where it happens?
DDF A-Z Link Extension
Chrome
Firefox
Info

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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #243 on: December 05, 2018, 09:48:13 AM »
@myi @etech0 Sorry for the late reply.

I'm not following, this happens when you use the extension and click on the button to copy the link? I just tried it and it worked fine (I clicked on the button to copy the link, then clicked on the back button to go back and it worked the first time). Can you give me an example product where it happens?
Even without clicking the button, every time you visit a product page on amazon, the page loads and then loads again (with the button I assume). So if you want to go back to your search results, you have to click the back button twice.
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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #244 on: December 05, 2018, 09:59:35 AM »
Even without clicking the button, every time you visit a product page on amazon, the page loads and then loads again (with the button I assume). So if you want to go back to your search results, you have to click the back button twice.
Wierd, I don't have that issue, just clicked on a random deal on DDMS and didn't have any reloads, back button wasn't even available (since it opens as a new tab). Which version of Chrome are you using?
DDF A-Z Link Extension
Chrome
Firefox
Info

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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #245 on: December 05, 2018, 10:09:51 AM »
Wierd, I don't have that issue, just clicked on a random deal on DDMS and didn't have any reloads, back button wasn't even available (since it opens as a new tab). Which version of Chrome are you using?
I don't see it either when clicking a link from DDMS, but it always happens when clicking through search results. Can you try searching for something, click a product, and then see?

Not sure what version I'm in but I've had this issue for a really long time
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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #246 on: December 05, 2018, 10:24:21 AM »
I don't see it either when clicking a link from DDMS, but it always happens when clicking through search results. Can you try searching for something, click a product, and then see?

Not sure what version I'm in but I've had this issue for a really long time
Just had an epiphany! There's a setting to redirect to Dan's referral link, do you have that enabled? If yes, disable and test (I should be able to fix it if it's that)
DDF A-Z Link Extension
Chrome
Firefox
Info

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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #247 on: December 05, 2018, 12:36:40 PM »
Just had an epiphany! There's a setting to redirect to Dan's referral link, do you have that enabled? If yes, disable and test (I should be able to fix it if it's that)
Yes! That's what's causing the issue, I disabled it and it stopped reloading each page. The problem is that I did want that feature enabled - if you could fix it that'd be great!
Workflowy. You won't know what you're missing until you try it.

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!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #248 on: December 05, 2018, 12:44:38 PM »
Wierd, I don't have that issue, just clicked on a random deal on DDMS and didn't have any reloads, back button wasn't even available (since it opens as a new tab). Which version of Chrome are you using?
Doesn't seem like your fully understanding the error.
Basically if you go onto a page on amazon and type In the search bar "shoes" and you click in multiple different links and then decide to go back a page and look at the search results again as you didn't like the product you clicked on, what will happen now should you try to click the back button on the page, the page will reload but won't go back a page. Now the only way to go back a page when having the chrome extension enabled on the page is to simultaneously click the back back twice which will then cause the page to go back one page to your previous search results.
 So don't try it on a link from ddms, rather with any page on amazon where you went into another link from the original page and now want to go back a page.(you can also click on a page from the ddms but that's not the issue here. It's the browser extension for the amazon copy and paste for the deals which is causing the back reload issue.)

 Hope I was a bit clearer.   
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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #249 on: December 05, 2018, 03:12:30 PM »
Doesn't seem like your fully understanding the error.
Basically if you go onto a page on amazon and type In the search bar "shoes" and you click in multiple different links and then decide to go back a page and look at the search results again as you didn't like the product you clicked on, what will happen now should you try to click the back button on the page, the page will reload but won't go back a page. Now the only way to go back a page when having the chrome extension enabled on the page is to simultaneously click the back back twice which will then cause the page to go back one page to your previous search results.
 So don't try it on a link from ddms, rather with any page on amazon where you went into another link from the original page and now want to go back a page.(you can also click on a page from the ddms but that's not the issue here. It's the browser extension for the amazon copy and paste for the deals which is causing the back reload issue.)

 Hope I was a bit clearer.
Did you try disabling this setting?
Just had an epiphany! There's a setting to redirect to Dan's referral link, do you have that enabled? If yes, disable and test (I should be able to fix it if it's that)
Seems to have worked for @etech0
Yes! That's what's causing the issue, I disabled it and it stopped reloading each page. The problem is that I did want that feature enabled - if you could fix it that'd be great!
DDF A-Z Link Extension
Chrome
Firefox
Info

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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #250 on: December 05, 2018, 03:12:57 PM »
Yes! That's what's causing the issue, I disabled it and it stopped reloading each page. The problem is that I did want that feature enabled - if you could fix it that'd be great!
I should be able to, I'll let you know when done

ETA: I might not have the original code, it was on my work computer and I left the job, I need to see if I have it :'(
« Last Edit: December 05, 2018, 03:17:27 PM by JoeyShmoe »
DDF A-Z Link Extension
Chrome
Firefox
Info

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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #251 on: December 05, 2018, 04:02:51 PM »
I should be able to, I'll let you know when done

ETA: I might not have the original code, it was on my work computer and I left the job, I need to see if I have it :'(
:( you can't extract it from the extension?
Workflowy. You won't know what you're missing until you try it.

Offline stooges44

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Jan 2017
  • Posts: 6453
  • Total likes: 2746
  • DansDeals.com Hat Tips 269
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #252 on: December 05, 2018, 04:07:09 PM »

ETA: I might not have the original code, it was on my work computer and I left the job, I need to see if I have it :'(

Ouch
If it's not free shipping it's not worth 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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #253 on: December 05, 2018, 11:40:15 PM »
I was able to find the code B"H!

I just published an update which should fix the issue (it'll still have to load the page twice, but the back button should work as intended).

@etech0 @myi please test when you get the update (version 0.9) and let me know

TIA
DDF A-Z Link Extension
Chrome
Firefox
Info

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
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #254 on: December 05, 2018, 11:41:54 PM »
I was able to find the code B"H!

I just published an update which should fix the issue (it'll still have to load the page twice, but the back button should work as intended).

@etech0 @myi please test when you get the update (version 0.9) and let me know

TIA
Wow that was fast! Is there any way to manually update or do I have to wait for it to happen by itself?
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
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 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
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: 1276
  • Total likes: 254
  • 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 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!
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.
Quote
Need your LG Exalt fixed? Cracked in half? Water damage? Or parts to repair yourself. 347.201.2501

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
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.