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

Online Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 3397
  • Total likes: 1025
  • DansDeals.com Hat Tips 38
  • Gender: Male
    • View Profile
  • Programs: @myi so list them as Dan does!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #360 on: February 23, 2021, 03:18:15 PM »
Will a picture suffice?


Offline myi

  • Dansdeals Lifetime 20K Presidential Platinum Elite
  • ********
  • Join Date: Feb 2015
  • Posts: 20703
  • Total likes: 1551
  • DansDeals.com Hat Tips 312
  • Gender: Male
    • View Profile
  • Location: InMyPants! 🙈
  • Programs: 2Many2List!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #361 on: February 23, 2021, 04:52:46 PM »
Will a picture suffice?

Now we need it installed onto/into the forum.
There's room for more buttons.
Don't try to be someone else , be who you are because everyone else is taken.

Online Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 3397
  • Total likes: 1025
  • DansDeals.com Hat Tips 38
  • Gender: Male
    • View Profile
  • Programs: @myi so list them as Dan does!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #362 on: February 23, 2021, 06:47:28 PM »
Now we need it installed onto/into the forum.
There's room for more buttons.
@jj1000 for some reason didn't like that idea.
I wanted it to auto detect amazon links and automatically add a tag, or the full deal upon request.

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 11950
  • Total likes: 1975
  • 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 #363 on: February 23, 2021, 06:59:56 PM »
Maybe a custom "New post" button on the amazon board where you put in the asin and it does the rest
Workflowy. You won't know what you're missing until you try it.

Online Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 3397
  • Total likes: 1025
  • DansDeals.com Hat Tips 38
  • Gender: Male
    • View Profile
  • Programs: @myi so list them as Dan does!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #364 on: February 23, 2021, 07:47:28 PM »
Maybe a custom "New post" button on the amazon board where you put in the asin and it does the rest
That wouldn't work for master threads and replies.
When typing a username you get a drop-down of usernames like @ user.., the same can be implemented anytime an amazon link is detected you can get a drop-down with an option for tagged link or a full featured link.

Online Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 3397
  • Total likes: 1025
  • DansDeals.com Hat Tips 38
  • Gender: Male
    • View Profile
  • Programs: @myi so list them as Dan does!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #365 on: February 23, 2021, 07:57:55 PM »
Wiki updated

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 11950
  • Total likes: 1975
  • 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 #366 on: February 23, 2021, 10:55:14 PM »
That wouldn't work for master threads and replies.
but might be easier to implement
Workflowy. You won't know what you're missing until you try it.

Online Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 3397
  • Total likes: 1025
  • DansDeals.com Hat Tips 38
  • Gender: Male
    • View Profile
  • Programs: @myi so list them as Dan does!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #367 on: February 23, 2021, 10:57:53 PM »
but might be easier to implement
True, although a button in post editor might make more sense and should be about the same.

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 11950
  • Total likes: 1975
  • 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 #368 on: February 23, 2021, 11:11:01 PM »
True, although a button in post editor might make more sense and should be about the same.
true, but I don't know how these things work
Workflowy. You won't know what you're missing until you try it.

Online YitzyS

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Jan 2015
  • Posts: 2986
  • Total likes: 5154
  • DansDeals.com Hat Tips 21
  • Gender: Male
    • View Profile
  • Location: Lakewood, NJ
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #369 on: February 23, 2021, 11:27:29 PM »
I updated the site link try again.
https://sites.google.com/view/ddflink
Still not working. But I primarily use the desktop sites, so don't form your applet around me.

Offline yungermanchik

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Nov 2018
  • Posts: 1054
  • Total likes: 720
  • DansDeals.com Hat Tips 0
    • View Profile
  • Location: Previous Signatures: If you chapped hana'ah from a post, like it; You think you know the answers and things are the way they seem.. it just ain't so -The Rebbe from Lublin-
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #370 on: February 24, 2021, 02:25:57 PM »
True, although a button in post editor might make more sense and should be about the same.
You mean like the "Add image to post" button. that's a great idea!
Small people talk about other people.
Average people talk about things
BIG PEOPLE TALK ABOUT IDEAS.

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 11950
  • Total likes: 1975
  • 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 #371 on: February 24, 2021, 02:51:50 PM »
You mean like the "Add image to post" button. that's a great idea!
or the same way you can embed youtube videos with [youtube]
Workflowy. You won't know what you're missing until you try it.

Online Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 3397
  • Total likes: 1025
  • DansDeals.com Hat Tips 38
  • Gender: Male
    • View Profile
  • Programs: @myi so list them as Dan does!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #372 on: March 08, 2021, 12:46:32 AM »
New exciting update:

  • Added suggested intelligent subject name.
  • Squished a few itchy bugs.
  • Special thanks to @YitzyS.

All feedback is welcome, secret formula will not be disclosed.

(So far available for telegram only)

Online Yo ssi

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Aug 2019
  • Posts: 3397
  • Total likes: 1025
  • DansDeals.com Hat Tips 38
  • Gender: Male
    • View Profile
  • Programs: @myi so list them as Dan does!
Re: Amazon DD Bookmarklet: Have Chrome Make A DDF Friendly Link On Amazon
« Reply #373 on: March 08, 2021, 01:09:38 AM »
or the same way you can embed youtube videos with [youtube]
Not too hard to implement




Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 11950
  • Total likes: 1975
  • 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 #374 on: March 08, 2021, 09:18:13 AM »
Not too hard to implement



nice, though I would call it [amazon]asin[/amazon]
Workflowy. You won't know what you're missing until you try it.