From 602ca54de6524e478516bd40ff3139162a1691f9 Mon Sep 17 00:00:00 2001 From: Alex Heneveld Date: Tue, 9 Feb 2016 23:24:35 +0000 Subject: [PATCH] use local version of zeroclipboard movie fixes issues in some recent browser (eg latest chrome on latest os x) where the flash "movie" won't load unless it is local. the error it gives is a generic "uncaught exception" in ZeroClipboard activate -> flashState.bridge.setSize. curiously it still works fine in some browsers (firefox) and older chrome was also fine but I'm guessing security modes are being tightened in browsers. none of the other recommended settings for fixing this seem to work: * trustedDomains * trustedOrigin * allowScriptAccess * and even the flash config in the browser it's just a small movie however so should be low impact (smaller than most of our images). put in img path to simplify access. also, zeroclipboard is updated from 1.3.1 to 1.3.5 (latest stable 1.x branch). (2.x branch looks like it might be a bigger api change although some fixes in this area are reported.) note the SWF binary is downloaded on first run of _build/build.sh, similar to as we do for the brooklyn-ui project, and also with a README in that dir --- _build/build.sh | 6 + _layouts/base.html | 4 +- style/js/zeroclipboard/.gitignore | 1 + style/js/zeroclipboard/README.md | 41 + style/js/zeroclipboard/ZeroClipboard.js | 1036 +++++++++++++++++++ style/js/zeroclipboard/ZeroClipboard.min.js | 9 + 6 files changed, 1095 insertions(+), 2 deletions(-) create mode 100644 style/js/zeroclipboard/.gitignore create mode 100644 style/js/zeroclipboard/README.md create mode 100644 style/js/zeroclipboard/ZeroClipboard.js create mode 100644 style/js/zeroclipboard/ZeroClipboard.min.js diff --git a/_build/build.sh b/_build/build.sh index 78b4d1ee..b4c8f151 100755 --- a/_build/build.sh +++ b/_build/build.sh @@ -294,6 +294,12 @@ parse_mode $@ shift parse_arguments $@ +# prep +if [ ! -f style/js/zeroclipboard/ZeroClipboard.swf ] ; then + echo downloading ZeroClipboard.swf + curl -L -o style/js/zeroclipboard/ZeroClipboard.swf http://cdnjs.cloudflare.com/ajax/libs/zeroclipboard/1.3.5/ZeroClipboard.swf +fi + make_jekyll || { echo ERROR: failed jekyll docs build in `pwd` ; exit 1 ; } make_javadoc || { echo ERROR: failed javadoc build ; exit 1 ; } diff --git a/_layouts/base.html b/_layouts/base.html index 29b735f6..0cc6de92 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -24,7 +24,7 @@ {{ content }} - +