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

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 5078
  • Total likes: 1804
  • DansDeals.com Hat Tips 53
  • Gender: Male
    • View Profile
Can it say the actual end time?
That gets complicated with different time zones etc.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 5078
  • Total likes: 1804
  • DansDeals.com Hat Tips 53
  • Gender: Male
    • View Profile
Or can click on links.
Whoa! I was just looking to make this site better...
So was I, so was I..
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline OutThere

  • Dansdeals Bronze Elite
  • *
  • Join Date: May 2021
  • Posts: 42
  • Total likes: 2
  • DansDeals.com Hat Tips 0
  • Gender: Male
    • View Profile
    • Precious Metals Live Prices
  • Location: Brooklyn
The strike-thru feature doesn't work on the Chrome extension.
Check Out My Website Here!

Online aygart

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: May 2008
  • Posts: 14820
  • Total likes: 10467
  • DansDeals.com Hat Tips 14
    • View Profile
    • Lower Watt Energy Brokers
  • Programs: www.lowerwatt.com
That gets complicated with different time zones etc.
Is it better to pick a time zone to standardize? Lets say 80% of DDF using Amazon links is on EST, can it just include "Expires 4:00PM EST" or the like? THis is how it is displayed on DDMS
Feelings don't care about your facts

Offline lcm

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Jul 2019
  • Posts: 1079
  • Total likes: 381
  • DansDeals.com Hat Tips 5
    • View Profile
  • Location: 5th paragraph of https://www.dansdeals.com/sms/


To answer your question the answer is no. Deals here are (unfortunately?) only for people who can add the time left to the time of the post.

What?!?! You can't put in dynamic text or an iframe of the timer?!!

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 5078
  • Total likes: 1804
  • DansDeals.com Hat Tips 53
  • Gender: Male
    • View Profile

What?!?! You can't put in dynamic text or an iframe of the timer?!!
🤷‍♂️
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Online etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12505
  • Total likes: 2667
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF

What?!?! You can't put in dynamic text or an iframe of the timer?!!
And it'll automatically call your phone 5 minutes before it expires
Workflowy. You won't know what you're missing until you try it.

Online lubaby

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Jun 2010
  • Posts: 5293
  • Total likes: 686
  • DansDeals.com Hat Tips 12
    • View Profile
And it'll automatically call your phone 5 minutes before it expires
While we're at it:
Even better. It should just be a smart bot with multi-step processing.

1: it should just auto-order you every deal (to guarantee inventory),
2: send you a text / notification letting you know the item and price and to see if you actually want to keep it,
3: if you respond NO, it can cancel the order for you.

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 5078
  • Total likes: 1804
  • DansDeals.com Hat Tips 53
  • Gender: Male
    • View Profile
While we're at it:
Even better. It should just be a smart bot with multi-step processing.

1: it should just auto-order you every deal (to guarantee inventory),
2: send you a text / notification letting you know the item and price and to see if you actually want to keep it,
3: if you respond NO, it can cancel the order for you.
Welcome to my life ;D

Just imagine buying all those things @boro boy posts!
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Online etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 12505
  • Total likes: 2667
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Welcome to my life ;D

Just imagine buying all those things @boro boy posts!
bringing Subscribe & Save to the next level
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: 5078
  • Total likes: 1804
  • DansDeals.com Hat Tips 53
  • Gender: Male
    • View Profile
Thank you for the feedback. I'm aware of it, and I'll fix it iyh when I get a chance.


New Update! (Web & Telegram)
  • Fixed title strikethrough bug.
  • Rearranged the code (again!).
  • Added Prime Member discounts and all its calculations (!).
  • Added DDF Channel support.
  • Thank you @TzviR.

Telegram Bot | Website
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 5078
  • Total likes: 1804
  • DansDeals.com Hat Tips 53
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #431 on: October 18, 2021, 12:06:08 AM »
New Update!
  • Created a new self hosted proxy.
  • Added CCC & Keepa links (Telegram).

Telegram Bot | Website
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Euclid

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Jun 2010
  • Posts: 3697
  • Total likes: 3844
  • DansDeals.com Hat Tips 3
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #432 on: October 18, 2021, 12:23:06 AM »
  • Created a new self hosted proxy.
What's the proxy used for?

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 5078
  • Total likes: 1804
  • DansDeals.com Hat Tips 53
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #433 on: October 18, 2021, 12:24:27 AM »
What's the proxy used for?
Scraping amazon
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 5078
  • Total likes: 1804
  • DansDeals.com Hat Tips 53
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #434 on: November 22, 2021, 08:59:57 PM »
New Update!

Amazon recently made a massive change to how they list product prices on their pages, causing the famed chrome extension (thank you @JoeyShmoe) to stop working for lots of items (for example this works and this doesn't). This update should fix this issue for the average item.

  • Smothered the price bug.
  • Made DDF link great again!

Telegram Bot | Website


If you find something that isn't working please let me know.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline YitzyS

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Jan 2015
  • Posts: 4585
  • Total likes: 10035
  • DansDeals.com Hat Tips 34
  • Gender: Male
    • View Profile
  • Location: Lakewood, NJ
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #435 on: November 22, 2021, 09:37:24 PM »
New Update!

Amazon recently made a massive change to how they list product prices on their pages, causing the famed chrome extension (thank you @JoeyShmoe) to stop working for lots of items (for example this works and this doesn't). This update should fix this issue for the average item.

  • Smothered the price bug.
  • Made DDF link great again!

Telegram Bot | Website


If you find something that isn't working please let me know.
This has become really annoying. Any way to fix it on Chrome?

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 5078
  • Total likes: 1804
  • DansDeals.com Hat Tips 53
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #436 on: November 22, 2021, 09:46:12 PM »
This has become really annoying. Any way to fix it on Chrome?
The extension has to be updated.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline JoeyShmoe

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2014
  • Posts: 1235
  • Total likes: 171
  • 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 #437 on: December 07, 2021, 01:24:42 PM »
New Update!

Amazon recently made a massive change to how they list product prices on their pages, causing the famed chrome extension (thank you @JoeyShmoe) to stop working for lots of items (for example this works and this doesn't). This update should fix this issue for the average item.
I've been disconnected from DDF for a while now (work and life got in the way B"H). @Yo ssi great job!

If there's still any interest in updating the extension and/or the bookmarklet code, I'll gladly update it, I don't want to spend time on it if the Telegram Bot and Website are superior
DDF A-Z Link Extension
Chrome
Firefox
Info

Offline Euclid

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Jun 2010
  • Posts: 3697
  • Total likes: 3844
  • DansDeals.com Hat Tips 3
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #438 on: December 07, 2021, 01:40:18 PM »
I've been disconnected from DDF for a while now (work and life got in the way B"H). @Yo ssi great job!

If there's still any interest in updating the extension and/or the bookmarklet code, I'll gladly update it, I don't want to spend time on it if the Telegram Bot and Website are superior
@Yo ssi @JoeyShmoe probably makes sense for both of you to open source your code, so future members could take it over from you if either of you go "on leave". And don't be embarrassed about ugly code - no one cares; this isn't meant to be enterprise grade software.

Offline as2

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Mar 2013
  • Posts: 5712
  • Total likes: 909
  • DansDeals.com Hat Tips 24
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #439 on: December 07, 2021, 01:42:19 PM »
I was actually looking for the button the other day, and figured the extension was out of date. I don't use it super often, but would definitely like to have it back.
Memories last forever, make them while you can.