skibblenybbles / pinterestplus Goto Github PK
View Code? Open in Web Editor NEWAn improved implementation of the Pinterest "Pin It" button with an HTML5-valid syntax option
License: Other
An improved implementation of the Pinterest "Pin It" button with an HTML5-valid syntax option
License: Other
.
First off, thanks a bunch for this! I am hoping to use it to avoid parsing multiple buttons in one go (a page will contain at least 20 items, each with a Pinterest button).
However, while I have the script working - PinterestPlus.pinit(); works fine - I cannot seem to get it focus on one particular element, and it is parsing them all with the performance impact I am hoping to avoid. I have tried:
PinterestPlus.pinit('class');
PinterestPlus.pinit('id');
PinterestPlus.pinit('div.id');
PinterestPlus.pinit('div.classname);
PinterestPlus.pinit(document.getElementById('id'));
where of course 'id' and 'class' are valid for the divs concerned.
How should I be defining the element?
Thanks!
Andy
Hi Mike,
First off I wanted to thank you for writing this library, it's exactly what I was looking for after a couple rather frustrating attempts in trying to use the code provided by Pinterest in ways that it's not suited for.
Secondly, as the title implies, I'm curious about what kind of licensing were you thinking about releasing this under? I'd like to make use of it on a project I'm working on, license permitting of course.
BR,
Joonas
Hey there,
Firstly thanks for providing such a helpful piece of code.
Today I noticed that Pinterest have moved some of their assets to a different location, so my buttons weren't rendering at all. I went through your javascript and replaced this:
url:window.location.protocol==="https:"?"https://assets.pinterest.com/pinit.html":"http://pinit-cdn.pinterest.com/pinit.html"
With this:
url:window.location.protocol==="https:"?"https://assets.pinterest.com/pinit.html":"http://assets.pinterest.com/pinit.html"
I'm not sure if this is the best fix, but it works for now. Would like to know what you think
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.