Giter VIP home page Giter VIP logo

embedd's People

Contributors

greenkeeper[bot] avatar greenkeeperio-bot avatar prayagverma avatar tgallant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

embedd's Issues

This repo needs maintenance

This repo needs maintenance
throws error when response.data return an array in dataFmt (reddit)

embeddSpec.dataFmt = (response, cb) => {
  if (!response.data && Array.isArray(response)) {
    response = response[0];
  }
  [...]

"Add a comment" button

Is there any way to have a snippet or javascript method which return an url to post comment on a service?
Something like:

<script src="embedd.js">
    {
        "url": "https://www.eff.org/deeplinks/2015/10/closing-loopholes-europes-net-neutrality-compromise",
        "add_comment_link": ["hn", "reddit"],
        "debug": true
    } 
</script>

Or any other way to add it.
And maybe another message when url is not found on a service, like, "Post this article on Hacker News to comment".

What to do when there are no comments, or no active thread?

IMHO, it should give an option to -> share at Reddit when there are no comments, rather it throws the JS error,

embedd.min.js:1 Uncaught (in promise) Error: Callback was already called.
    at embedd.min.js:1
    at <anonymous>
(anonymous) @ embedd.min.js:1
Promise.catch (async)
t @ embedd.min.js:1
(anonymous) @ embedd.min.js:1
n @ embedd.min.js:1
wr @ embedd.min.js:1
a.hasComments @ embedd.min.js:1
(anonymous) @ embedd.min.js:1
i @ embedd.min.js:1
(anonymous) @ embedd.min.js:1
N @ embedd.min.js:1
(anonymous) @ embedd.min.js:1
Pe @ embedd.min.js:1
We @ embedd.min.js:1
h.init @ embedd.min.js:1
(anonymous) @ embedd.min.js:1
t @ embedd.min.js:1
(anonymous) @ embedd.min.js:1
(anonymous) @ embedd.min.js:1

Strange is the same thing works well, when I integrate the Cloudflare app "Embeddit". Do you have different scripts supplied to Cloudflare vs. hosted here?

Some embedding suggestions

I believe adding the following tags to the provided <script> tag could offer some end-user benefits

  • defer
    Adding comments shouldn't hold a higher priority over any other page content

  • crossorigin="anonymous"
    Prevents embedd.io from eavesdropping on the page content

Some outside links are missing target="_blank"-attribute

Line 15 in "templates/comment.html" should read:
{{#permalink}}<span><a href="{{permalink}} target="_blank"">{{subreddit}}</a></span>{{/permalink}}
Also, the links in the comment bodies (actual comment texts) should have a target="_blank"-attribute but I'm not so sure how to do that (using mustache?).

Cheers :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.