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

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #380 on: March 13, 2021, 11:00:54 PM »
Oh, seems i'm not following this thread enough.

 Never downloaded Telegram, am i really missing out?
A website was made as well (I personally like the telegram bot better)
https://sites.google.com/view/ddflink
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #381 on: April 07, 2021, 01:03:40 AM »
New Update:

  • Added "Save At Checkout" support, with all it's proper calculations. (Telegram only)
  • Fixed amazon marketplace issue.
  • Added lighting deals support to web.
  • Special thanks to @SPGDUDE.

_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Complete rewrite in the works (for internal code)
As well as a fix for the bug of math issues when calculating longer then 3 digits (due to the comma)
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Complete rewrite in the works (for internal code)
As well as a fix for the bug of math issues when calculating longer then 3 digits (due to the comma)


_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Online YitzyS

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Jan 2015
  • Posts: 5552
  • Total likes: 13697
  • DansDeals.com Hat Tips 34
  • Gender: Male
    • View Profile
  • Location: Lakewood, NJ

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Revamped New Update - now live

  • Complete rewrite of entire source code!
  • Squished the bug with math issues when calculating longer then 3 digits (due to the comma).
  • Added "Save At Checkout" support, with all it's proper calculations to web.
  • Added Intelligent Subject Titles to web.
  • Added error warnings to web.
  • Added smarter warnings to telegram & web.
  • Small web UI changes.
  • Added "Extra savings" support to telegram & web.
  • Added "Extra savings" calculations to telegram & web.
  • Future proofed - made updates easily be applied to both platforms.

Telegram Bot | Website
« Last Edit: May 07, 2021, 02:42:41 AM by Yo ssi »
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
8) @Yo ssi I think there's another bug to squash
New update:
Telegram Bot | Website
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline TzviR

  • Dansdeals Platinum Elite + Lifetime Silver Elite
  • *****
  • Join Date: Sep 2020
  • Posts: 669
  • Total likes: 665
  • DansDeals.com Hat Tips 3
    • View Profile
    • [b]Learn to play for a kumzits in 5 weeks!
  • Location: Fl
@Yo ssi I added the DDF link generator to my allowed websites list but the website is not working. What other sites do I need to add for it to work?



My  prizes from CV :)

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
@Yo ssi I added the DDF link generator to my allowed websites list but the website is not working. What other sites do I need to add for it to work?


It uses a Google app script, it starts with script.google.com
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline TzviR

  • Dansdeals Platinum Elite + Lifetime Silver Elite
  • *****
  • Join Date: Sep 2020
  • Posts: 669
  • Total likes: 665
  • DansDeals.com Hat Tips 3
    • View Profile
    • [b]Learn to play for a kumzits in 5 weeks!
  • Location: Fl
It uses a Google app script, it starts with script.google.com
ok I’ll try that. Thanks!

My  prizes from CV :)

Offline TzviR

  • Dansdeals Platinum Elite + Lifetime Silver Elite
  • *****
  • Join Date: Sep 2020
  • Posts: 669
  • Total likes: 665
  • DansDeals.com Hat Tips 3
    • View Profile
    • [b]Learn to play for a kumzits in 5 weeks!
  • Location: Fl
It uses a Google app script, it starts with script.google.com
Added that and it still doesn’t work. Any other ideas?

My  prizes from CV :)

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Added that and it still doesn’t work. Any other ideas?
Does this link work?
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline TzviR

  • Dansdeals Platinum Elite + Lifetime Silver Elite
  • *****
  • Join Date: Sep 2020
  • Posts: 669
  • Total likes: 665
  • DansDeals.com Hat Tips 3
    • View Profile
    • [b]Learn to play for a kumzits in 5 weeks!
  • Location: Fl
Nope. It’s not blocked just brings me to a blank page. Script.google.com does work though.




My  prizes from CV :)

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
Try unblocking the link in my above post
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
https://www.dansdeals.com/shopping-deals/amazon/fingertip-pulse-oximeter-5-83-amazon/

It's cool how efficient the bot has become, for the above deal this would be the result: (nothing edited)

LPOW Pulse Oximeter Fingertip, Blood Oxygen Saturation Monitor for Pulse Rate, Heart Rate Monitor and SpO2 Levels with OLED Screen Display Batteries and Lanyard Included $19.99 $5.83

Extra Savings: 61% off with promo code ODXZE56R.



Generated with DDF Link Generator Telegram Bot | Website


It recognizes there's a percentage discount, and does the appropriate math.
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Online YitzyS

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Jan 2015
  • Posts: 5552
  • Total likes: 13697
  • DansDeals.com Hat Tips 34
  • Gender: Male
    • View Profile
  • Location: Lakewood, NJ
https://www.dansdeals.com/shopping-deals/amazon/fingertip-pulse-oximeter-5-83-amazon/

It's cool how efficient the bot has become, for the above deal this would be the result: (nothing edited)

It recognizes there's a percentage discount, and does the appropriate math.
Meh, not impressed. It should say, "but this item can be free if your medical insurance is..."  :P

Offline TzviR

  • Dansdeals Platinum Elite + Lifetime Silver Elite
  • *****
  • Join Date: Sep 2020
  • Posts: 669
  • Total likes: 665
  • DansDeals.com Hat Tips 3
    • View Profile
    • [b]Learn to play for a kumzits in 5 weeks!
  • Location: Fl
Try unblocking the link in my above post
After unblocking it is still just giving me a blank white screen
« Last Edit: May 11, 2021, 11:44:48 PM by TzviR »

My  prizes from CV :)

Offline Yo ssi

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Aug 2019
  • Posts: 6657
  • Total likes: 2588
  • DansDeals.com Hat Tips 60
  • Gender: Male
    • View Profile
After unblocking it is still just giving me a blank white screen
Try unblocking:
https://apis.google.com/
https://gstatic.com/
https://googleusercontent.com/
(all Google sites)
_    ,
' )  /
 /  / __   _   _   o
(__/_(_)  /_)_/_)_<_
 //
(/

Offline TzviR

  • Dansdeals Platinum Elite + Lifetime Silver Elite
  • *****
  • Join Date: Sep 2020
  • Posts: 669
  • Total likes: 665
  • DansDeals.com Hat Tips 3
    • View Profile
    • [b]Learn to play for a kumzits in 5 weeks!
  • Location: Fl

My  prizes from CV :)

Online YitzyS

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Jan 2015
  • Posts: 5552
  • Total likes: 13697
  • DansDeals.com Hat Tips 34
  • Gender: Male
    • View Profile
  • Location: Lakewood, NJ
Working now! Thanks!
Do you know which site it was that made it work? I'm having the same issues...