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

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
The complicated part is that amazon doesn't display both prices on the page, but just because the OP is getting 15% (or 5%) off, doesn't mean that everyone else will.
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
DDF A-Z Link Extension
Chrome
Firefox
Info

Online etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12864
  • Total likes: 3322
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Stay tuned everyone, something really cool is in the works!
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: 6454
  • Total likes: 2751
  • DansDeals.com Hat Tips 269
    • View Profile
Stay tuned everyone, something really cool is in the works!

Shows you the price history as well? That would be incredible!
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
Hey all!

I decided to take @etech0's hard work to the next level and make a Chrome Extension (Firefox extension in the works already). It's very much still in Alpha stages, so I'll appreciate any feedback y'all can give me :)

The link is https://chrome.google.com/webstore/detail/dansdeals-amazon-link-gen/lddihjecngahaibhimfijbikbkoajhgi, see screenshot attached to see how it works. All it does is add a button under the price of the item which when clicked copies the code to your clipboard.

Thanks @etech0 for all of the help!! I couldn't have done this without you starting this :)
« Last Edit: June 23, 2017, 11:36:29 AM by JoeyShmoe »
DDF A-Z Link Extension
Chrome
Firefox
Info

Online username

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Jul 2008
  • Posts: 4531
  • Total likes: 602
  • DansDeals.com Hat Tips 14
  • Gender: Male
    • View Profile
  • Location: C Heights
  • Programs: ┌──────────────────┐ │───> Ữ₴ΣЯИΛΜӘ <─── │ └──────────────────┘
^^^

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
^^^
Not working on this product?
https://www.amazon.com/gp/product/B0088X1J2Y/ref=s9u_simh_gw_i3?ie=UTF8&fpl=fresh&pd_rd_i=B0088X1J2Y&pd_rd_r=2VYXNED1YSVPDPX3JTM0&pd_rd_w=8iffW&pd_rd_wg=D0YwM&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=&pf_rd_r=GA3KAXE3BF4GGFYJ4BER&pf_rd_t=36701&pf_rd_p=781f4767-b4d4-466b-8c26-2639359664eb&pf_rd_i=desktop
There's no price on this product

ETA: If you click on the other items, the info on the page changes but it doesn't reload the page, so the extension doesn't know to add the button, I'll work on fixing it
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
There's no price on this product

ETA: If you click on the other items, the info on the page changes but it doesn't reload the page, so the extension doesn't know to add the button, I'll work on fixing it
Version 0.4 is up, (will take some time until it's live). It fixes the issue @username brought up, when you click on a different option of the same item it generates a new button. (If the item doesn't have a price then the button won't show since you can't buy it anyway)

ETA: New version is live, the extension will auto update at some point, but if you want to force update it, type into the URL bar chrome://extensions > Check Developer Mode > click on Update extensions now (see screenshot)
« Last Edit: June 23, 2017, 02:12:41 PM by JoeyShmoe »
DDF A-Z Link Extension
Chrome
Firefox
Info

Online etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12864
  • Total likes: 3322
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
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: 23544
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
Hey all!

I decided to take @etech0's hard work to the next level and make a Chrome Extension (Firefox extension in the works already). It's very much still in Alpha stages, so I'll appreciate any feedback y'all can give me :)

The link is https://chrome.google.com/webstore/detail/dansdeals-amazon-link-gen/lddihjecngahaibhimfijbikbkoajhgi, see screenshot attached to see how it works. All it does is add a button under the price of the item which when clicked copies the code to your clipboard.

Thanks @etech0 for all of the help!! I couldn't have done this without you starting this :)
Wow you guys are amazing ! 
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
I'm thinking of pushing an update to the extension which automatically redirects you to Amazon with @Dan's referral code, so whenever you click on an Amazon link you'll be supporting DansDeals. I would like to ask y'all if you think it's right to do it, what if somebody clicks on an Amazon link from another blog? Who should be supported from that transaction?
DDF A-Z Link Extension
Chrome
Firefox
Info

Online etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12864
  • Total likes: 3322
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
I'm thinking of pushing an update to the extension which automatically redirects you to Amazon with @Dan's referral code, so whenever you click on an Amazon link you'll be supporting DansDeals. I would like to ask y'all if you think it's right to do it, what if somebody clicks on an Amazon link from another blog? Who should be supported from that transaction?
It's an good idea, but maybe it should be a separate extension? (Or even the same extension, but let it be a feature that could be turned on and off.) I'm not sure if everyone who wants this one will want both features.
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
It's an good idea, but maybe it should be a separate extension? (Or even the same extension, but let it be a feature that could be turned on and off.) I'm not sure if everyone who wants this one will want both features.
Good idea, I'll look into it
DDF A-Z Link Extension
Chrome
Firefox
Info

Online etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12864
  • Total likes: 3322
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
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!
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
It's an good idea, but maybe it should be a separate extension? (Or even the same extension, but let it be a feature that could be turned on and off.) I'm not sure if everyone who wants this one will want both features.
Version 0.6 (which should be live soon) will have an Options link (you can access it either by right clicking on the extension icon or by finding the extension in chrome://extensions), there's a single option there - Automatically redirect all Amazon links to Dan's referral link - which when checked will automatically redirect you to the same Amazon link you were at with the addition of @Dan's referral code. The setting is marked as false initially
DDF A-Z Link Extension
Chrome
Firefox
Info

Online etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12864
  • Total likes: 3322
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Version 0.6 (which should be live soon) will have an Options link (you can access it either by right clicking on the extension icon or by finding the extension in chrome://extensions), there's a single option there - Automatically redirect all Amazon links to Dan's referral link - which when checked will automatically redirect you to the same Amazon link you were at with the addition of @Dan's referral code. The setting is marked as false initially
awesome!
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: 23544
  • Total likes: 2427
  • DansDeals.com Hat Tips 356
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
if this is unchecked it wont pull dan in the referral link?
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
if this is unchecked it wont pull dan in the referral link?
This is only for when you get to a product otherwise, not through DDF and you don't have Dan's referral. If this is checked it'll reload the page with Dan's referral code in the URL. The button that generates the code is the same regardless of the checkbox
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Live N Learn

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Mar 2015
  • Posts: 3799
  • Total likes: 332
  • DansDeals.com Hat Tips 3
  • Gender: Male
    • View Profile
".איזהו חכם, הלומד מכל אדם"

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
Sound the alarms!  ;)
Does that extension manipulate the tag in the URL?
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Live N Learn

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Mar 2015
  • Posts: 3799
  • Total likes: 332
  • DansDeals.com Hat Tips 3
  • Gender: Male
    • View Profile
Does that extension manipulate the tag in the URL?

No. Note the wink emoji, I was referring to the rule below.

-No referral offers or discussion of referral offers and/or toolbars or shopping portals are allowed on the forums
".איזהו חכם, הלומד מכל אדם"