Git Product home page Git Product logo

awld-js's People

Contributors

nrabinowitz avatar paregorios avatar ryanfb avatar sfsheath avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awld-js's Issues

EOL image assets

Hi Seb,

When loading EOL resources, the EOL description has relative paths to image resources. When used on Open Context, clients look for the image resources on Open Context, not the EOL so as to avoid $)$ errors?

Perhaps modules/eol.js can be fixed (a hack) with something like:

description = description.replace("/assets/","http://eol.org/assets/");

Thanks!
-Eric

handle 404s gracefully

Currently, if the JS attempts to retrieve a resource from a supported domain, but doesn't get any content, it goes ahead and displays a blank popup on hover. It would be nice if "failed" links didn't exhibit this behavior.

doesn't detect HTTPS URIs

Many resources (including recently Pleiades) are moving to HTTPS, so people will be adding HTTPS URIs to new documents and wanting the script to work. Currently, it passes over HTTPS URIs e.g. for Pleiades entirely.

is the library still maintained?

I was reviewing my own Mediawiki / AWLD bridge extension but I realized that 5 years without updates probably mean this library is not maintained anymore. Is this correct?

when on https, JS should try all links with that protocol

Currently, if the page containing the JS and links is served over https but the individual links are coded with http URLs, only a blank popup displays on modern browsers (because of mixed content security practices). A better solution would seem to be: if the containing page has been served via HTTPS, rewrite any links to try with HTTPS; if 404 then don't display a pop-up at all.

Some APIs (e.g. Wikipedia) return 503 with lots of simultaneous requests

In loading the test page, a lot of the Wikipedia resources randomly show or don't show based on the Wikipedia API endpoint returning HTTP 503 (Service unavailable) randomly when a lot of requests are made at once.

There are a few different approaches that might help fix this:

  • set cache to true with requests (and make sure we're actually using cache?) so that we don't request all resources on every page load if they're already in the cache
  • make a per-service request buffer and request resources serially to avoid overload
  • only make requests on link mouseover instead of requesting all resources on page load (though this may result in unacceptable delay?)
  • make a request error handler that can retry requests after a (random, exponential backoff?) delay

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.