Giter Site home page Giter Site logo

Comments (2)

tomhodgins avatar tomhodgins commented on May 20, 2024

Hi Zhouzi.

Re HTTPS:

The fact that the Dragon demo page is not hosted on HTTPS shouldn't be an issue, when you're using the dragon.js code as a bookmarklet, 100% of the code of the bookmarklet is stored within your browser so it can be loaded into whatever page you have loaded, whether that page was retrieved via HTTP or HTTPS. It doesn't actually access any code from the network when it runs :)

Re: homepage + link

In my mind, this is a one-line file that I had saved as a Gist (which is version-controlled and publically accessible but not very visible) and so creating an entire github project for it I viewed as making a big homepage for that little bit of code already.

I do think eventually hosting the demo page and more information on Github itself might be a good idea - if the branch is switched to gh-pages and there's an index.html in the repository we would we able to access the test right from Github, as well as have a page where people could drag the link into their address bar.

The reason I have not done this is that Github pages does not yet support HTTPS, and a lack of time :) I've been busy building some new things!

As a method for installing bookmarklets, dragging a link doesn't help you at all in the browsers where adding a bookmarklet needs the most assistance: Mobile Safari (iOS). In the browsers I wrote this too to use, dragging links to an address bar isn't a feature of that browser. Also, many browsers will refuse to display a link to JavaScript (instead of a URL) as a link, meaning that if the purpose of putting a 'draggable link' on the page is to make it easy - if for any reason it doesn't work that's harder to troubleshoot than following the directions of creating a bookmark manually that you can repeat until you get it right.

Here's a link to the JS of Dragon right here, but I'm not sure what I could/would do with this in most of the browsers where I want to use it:

Bookmark Dragon.js

In some, it may not show up as a clickable link simply because the URL isn't to another page.

from dragon.

zhouzi avatar zhouzi commented on May 20, 2024

My bad, I've been a bit unclear so in case my point was confusing, here is what I meant. There are two ways to create a bookmarklet:

  1. Add a bookmark and paste the whole library's code, starting with javascript:
    • No http/https issues
    • The library code is not updated when changes are made
  2. Add a bookmark that creates and insert a script element pointing to the script
    • Must be hosted on an https source
    • The library code is automatically updated

But if I've suggested to add a draggable link it is mostly because to give a try to dragon.js I had to find the source code, copy it, add a bookmark and paste the code. While with such link I would have to just drag it to the bookmark bar ^^

Anyway, once again I get your points and the fact that you just want to have fun building things quickly :)

from dragon.

Related Issues (5)

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.