jekyll-theme-hydejack 7.5.2 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +1 -4
- data/README.md +139 -86
- data/_includes/body/analytics.html +36 -0
- data/_includes/{comments.html → body/comments.html} +0 -0
- data/_includes/{footer.html → body/footer.html} +4 -2
- data/_includes/body/index.html +22 -0
- data/_includes/body/main.html +18 -0
- data/_includes/{menu.html → body/menu.html} +1 -0
- data/_includes/{nav.html → body/nav.html} +0 -0
- data/_includes/body/scripts.html +22 -0
- data/_includes/{sidebar.html → body/sidebar.html} +19 -6
- data/_includes/{about.html → components/about.html} +1 -1
- data/_includes/{author.html → components/author.html} +3 -3
- data/_includes/{avatar-tag.html → components/avatar-tag.html} +0 -0
- data/_includes/{srcset-img.html → components/hy-img.html} +24 -8
- data/_includes/{link.html → components/link.html} +0 -0
- data/_includes/{message.html → components/message.html} +0 -0
- data/_includes/{pagination.html → components/pagination.html} +2 -2
- data/_includes/{post-list-item.html → components/post-list-item.html} +0 -0
- data/_includes/{post.html → components/post.html} +21 -10
- data/_includes/{related-posts.html → components/related-posts.html} +1 -1
- data/_includes/components/social-list-item.html +40 -0
- data/_includes/components/social.html +23 -0
- data/_includes/{tag-list.html → components/tag-list.html} +0 -0
- data/_includes/head/index.html +9 -0
- data/_includes/head/links.html +7 -5
- data/_includes/head/meta.html +3 -3
- data/_includes/{page-style.html → head/page-style.html} +1 -1
- data/_includes/head/scripts.html +10 -39
- data/_includes/head/styles.html +42 -15
- data/_includes/header.txt +1 -1
- data/_includes/my-body.html +42 -0
- data/_includes/my-scripts.html +55 -0
- data/_includes/scripts/load-js.js +60 -0
- data/_includes/scripts/load-js.min.js +1 -0
- data/_includes/{smart-url → smart-url.txt} +0 -0
- data/_includes/styles/inline.scss +15 -19
- data/_includes/styles/style.scss +20 -17
- data/_includes/templates/animation.html +1 -1
- data/_includes/templates/back.html +1 -1
- data/_includes/templates/cookies-banner.html +1 -1
- data/_includes/templates/error.html +1 -1
- data/_includes/{templates.html → templates/index.html} +1 -2
- data/_includes/templates/loading.html +1 -1
- data/_includes/templates/permalink.html +1 -1
- data/_layouts/about.html +29 -30
- data/_layouts/base.html +20 -62
- data/_layouts/blog.html +20 -22
- data/_layouts/compress.html +1 -1
- data/_layouts/default.html +13 -18
- data/_layouts/home.html +11 -16
- data/_layouts/list.html +13 -18
- data/_layouts/not-found.html +11 -16
- data/_layouts/page.html +12 -17
- data/_layouts/post.html +15 -20
- data/_layouts/redirect.html +11 -16
- data/_sass/_mixins.scss +10 -15
- data/_sass/_spinner.scss +10 -15
- data/_sass/_variables.scss +35 -19
- data/_sass/hydejack/__inline/_avatar.scss +33 -32
- data/_sass/hydejack/__inline/_base.scss +30 -68
- data/_sass/hydejack/__inline/_break-layout.scss +19 -26
- data/_sass/hydejack/__inline/_content.scss +29 -34
- data/_sass/hydejack/__inline/_footer.scss +19 -26
- data/_sass/hydejack/__inline/_images.scss +38 -0
- data/_sass/hydejack/__inline/_katex.scss +19 -26
- data/_sass/hydejack/__inline/_links.scss +45 -0
- data/_sass/hydejack/__inline/_mark-external.scss +19 -26
- data/_sass/hydejack/__inline/_menu.scss +28 -35
- data/_sass/hydejack/__inline/_sidebar.scss +76 -76
- data/_sass/hydejack/__inline/_social.scss +25 -31
- data/_sass/hydejack/__inline/_utilities.scss +42 -0
- data/_sass/hydejack/__link/_avatar.scss +29 -28
- data/_sass/hydejack/__link/_base.scss +19 -83
- data/_sass/hydejack/__link/_break-layout.scss +35 -34
- data/_sass/hydejack/__link/_content.scss +19 -26
- data/_sass/hydejack/__link/_footer.scss +19 -26
- data/_sass/hydejack/__link/_images.scss +84 -0
- data/_sass/hydejack/__link/_katex.scss +19 -26
- data/_sass/hydejack/__link/_links.scss +53 -0
- data/_sass/hydejack/__link/_mark-external.scss +19 -26
- data/_sass/hydejack/__link/_menu.scss +29 -50
- data/_sass/hydejack/__link/_sidebar.scss +71 -118
- data/_sass/hydejack/__link/_social.scss +19 -26
- data/_sass/hydejack/__link/_utilities.scss +51 -0
- data/_sass/hydejack/_avatar.pre.scss +26 -20
- data/_sass/hydejack/_base.pre.scss +22 -88
- data/_sass/hydejack/_break-layout.pre.scss +26 -23
- data/_sass/hydejack/_content.pre.scss +20 -23
- data/_sass/hydejack/_footer.pre.scss +10 -15
- data/_sass/hydejack/_images.pre.scss +77 -0
- data/_sass/hydejack/_katex.pre.scss +10 -15
- data/_sass/hydejack/_links.pre.scss +47 -0
- data/_sass/hydejack/_mark-external.pre.scss +10 -15
- data/_sass/hydejack/_menu.pre.scss +31 -38
- data/_sass/hydejack/_sidebar.pre.scss +98 -116
- data/_sass/hydejack/_social.pre.scss +16 -20
- data/_sass/hydejack/_utilities.pre.scss +43 -0
- data/_sass/my-variables.scss +0 -8
- data/_sass/pooleparty/__inline/_base.scss +19 -28
- data/_sass/pooleparty/__inline/_code.scss +19 -26
- data/_sass/pooleparty/__inline/_footer.scss +19 -26
- data/_sass/pooleparty/__inline/_footnotes.scss +19 -26
- data/_sass/pooleparty/__inline/_message.scss +19 -26
- data/_sass/pooleparty/__inline/_pagination.scss +19 -26
- data/_sass/pooleparty/__inline/_posts.scss +19 -26
- data/_sass/pooleparty/__inline/_read-more.scss +25 -0
- data/_sass/pooleparty/__inline/_related.scss +19 -26
- data/_sass/pooleparty/__inline/_table.scss +19 -26
- data/_sass/pooleparty/__inline/_type.scss +25 -39
- data/_sass/pooleparty/__link/_base.scss +19 -26
- data/_sass/pooleparty/__link/_code.scss +19 -26
- data/_sass/pooleparty/__link/_footer.scss +19 -26
- data/_sass/pooleparty/__link/_footnotes.scss +30 -26
- data/_sass/pooleparty/__link/_message.scss +19 -26
- data/_sass/pooleparty/__link/_pagination.scss +19 -26
- data/_sass/pooleparty/__link/_posts.scss +20 -27
- data/_sass/pooleparty/__link/_read-more.scss +45 -0
- data/_sass/pooleparty/__link/_related.scss +19 -26
- data/_sass/pooleparty/__link/_table.scss +19 -26
- data/_sass/pooleparty/__link/_type.scss +27 -48
- data/_sass/pooleparty/_base.pre.scss +10 -17
- data/_sass/pooleparty/_code.pre.scss +10 -15
- data/_sass/pooleparty/_footer.pre.scss +10 -15
- data/_sass/pooleparty/_footnotes.pre.scss +21 -15
- data/_sass/pooleparty/_message.pre.scss +10 -15
- data/_sass/pooleparty/_pagination.pre.scss +10 -15
- data/_sass/pooleparty/_posts.pre.scss +11 -16
- data/_sass/pooleparty/_read-more.pre.scss +36 -0
- data/_sass/pooleparty/_related.pre.scss +10 -15
- data/_sass/pooleparty/_table.pre.scss +10 -15
- data/_sass/pooleparty/_type.pre.scss +24 -50
- data/assets/Resume.pdf +0 -0
- data/assets/bower.json +3 -3
- data/assets/bower_components/fontfaceobserver/.bower.json +33 -0
- data/assets/bower_components/fontfaceobserver/.gitignore +2 -0
- data/assets/bower_components/fontfaceobserver/.travis.yml +16 -0
- data/assets/bower_components/fontfaceobserver/Gruntfile.js +101 -0
- data/assets/bower_components/fontfaceobserver/LICENSE +23 -0
- data/assets/bower_components/fontfaceobserver/bower.json +22 -0
- data/assets/bower_components/fontfaceobserver/exports.js +8 -0
- data/assets/bower_components/fontfaceobserver/externs-commonjs.js +10 -0
- data/assets/bower_components/fontfaceobserver/externs.js +15 -0
- data/assets/bower_components/fontfaceobserver/fontfaceobserver.js +12 -0
- data/assets/bower_components/fontfaceobserver/fontfaceobserver.standalone.js +8 -0
- data/assets/bower_components/fontfaceobserver/package.json +57 -0
- data/assets/bower_components/fontfaceobserver/src/descriptors.js +10 -0
- data/assets/bower_components/fontfaceobserver/src/observer.js +349 -0
- data/assets/bower_components/fontfaceobserver/src/ruler.js +130 -0
- data/assets/bower_components/fontfaceobserver/test/assets/index.html +8 -0
- data/assets/bower_components/fontfaceobserver/test/assets/late.css +1 -0
- data/assets/bower_components/fontfaceobserver/test/assets/sourcesanspro-regular.eot +0 -0
- data/assets/bower_components/fontfaceobserver/test/assets/sourcesanspro-regular.ttf +0 -0
- data/assets/bower_components/fontfaceobserver/test/assets/sourcesanspro-regular.woff +0 -0
- data/assets/bower_components/fontfaceobserver/test/assets/subset.eot +0 -0
- data/assets/bower_components/fontfaceobserver/test/assets/subset.ttf +0 -0
- data/assets/bower_components/fontfaceobserver/test/assets/subset.woff +0 -0
- data/assets/bower_components/fontfaceobserver/test/deps.js +5 -0
- data/assets/bower_components/fontfaceobserver/test/index.html +97 -0
- data/assets/bower_components/fontfaceobserver/test/observer-test.js +465 -0
- data/assets/bower_components/fontfaceobserver/test/ruler-test.js +112 -0
- data/assets/bower_components/fontfaceobserver/vendor/google/base.js +1489 -0
- data/assets/bower_components/katex/.bower.json +7 -6
- data/assets/bower_components/katex/dist/contrib/auto-render.js +790 -0
- data/assets/bower_components/katex/dist/contrib/auto-render.min.js +1 -1
- data/assets/bower_components/katex/dist/contrib/copy-tex.css +12 -0
- data/assets/bower_components/katex/dist/contrib/copy-tex.js +174 -0
- data/assets/bower_components/katex/dist/contrib/copy-tex.min.css +1 -0
- data/assets/bower_components/katex/dist/contrib/copy-tex.min.js +1 -0
- data/assets/bower_components/katex/dist/contrib/mathtex-script-type.js +113 -0
- data/assets/bower_components/katex/dist/contrib/mathtex-script-type.min.js +1 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/katex.css +129 -209
- data/assets/bower_components/katex/dist/katex.js +14381 -9023
- data/assets/bower_components/katex/dist/katex.min.css +1 -1
- data/assets/bower_components/katex/dist/katex.min.js +1 -6
- data/assets/bower_components/katex/flow-typed/match-at.js +3 -0
- data/assets/bower_components/katex/flow-typed/object-assign.js +6 -0
- data/assets/bower_components/katex/package-lock.json +13848 -0
- data/assets/css/hydejack-8.0.0.css +3 -0
- data/assets/img/default-1.jpg +0 -0
- data/assets/img/example-content-ii.jpg +0 -0
- data/assets/img/example-content-iii.jpg +0 -0
- data/assets/img/hydejack-8.jpg +0 -0
- data/assets/img/hydejack-8@0,25x.jpg +0 -0
- data/assets/img/hydejack-8@0,5x.jpg +0 -0
- data/assets/img/projects/hy-drawer.svg +12 -0
- data/assets/img/projects/hy-img.svg +17 -0
- data/assets/img/projects/hy-push-state.svg +13 -0
- data/assets/img/resume.png +0 -0
- data/assets/img/sidebar-bg.jpg +0 -0
- data/assets/img/swipe.svg +22 -0
- data/assets/img/w3m.png +0 -0
- data/assets/js/hydejack-8.0.0.js +46 -0
- data/assets/js/sw.js +318 -0
- data/assets/manifest.json +4 -3
- data/assets/version.json +1 -1
- data/licenses/Apache-2.0.md +1 -4
- data/licenses/GPL-3.0.md +1 -4
- data/licenses/MIT.md +1 -4
- data/licenses/PRO.md +2 -6
- data/licenses/README.md +10 -0
- data/licenses/W3C.md +31 -0
- metadata +107 -94
- data/_includes/blog.html +0 -5
- data/_includes/body.html +0 -25
- data/_includes/head.html +0 -5
- data/_includes/scripts/load-js-deferred.js +0 -68
- data/_includes/scripts/load-js-deferred.min.js +0 -1
- data/_includes/social-list-item.html +0 -34
- data/_includes/social.html +0 -20
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.eot +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.eot +0 -0
- data/assets/bower_components/webfontloader/.bower.json +0 -38
- data/assets/bower_components/webfontloader/CHANGELOG +0 -419
- data/assets/bower_components/webfontloader/Gemfile +0 -3
- data/assets/bower_components/webfontloader/LICENSE +0 -176
- data/assets/bower_components/webfontloader/Rakefile +0 -269
- data/assets/bower_components/webfontloader/bower.json +0 -23
- data/assets/bower_components/webfontloader/browsers.json +0 -133
- data/assets/bower_components/webfontloader/externs.js +0 -19
- data/assets/bower_components/webfontloader/package.json +0 -37
- data/assets/bower_components/webfontloader/src/closure.js +0 -2
- data/assets/bower_components/webfontloader/src/core/cssclassname.js +0 -46
- data/assets/bower_components/webfontloader/src/core/domhelper.js +0 -405
- data/assets/bower_components/webfontloader/src/core/eventdispatcher.js +0 -195
- data/assets/bower_components/webfontloader/src/core/font.js +0 -140
- data/assets/bower_components/webfontloader/src/core/fontmodule.js +0 -16
- data/assets/bower_components/webfontloader/src/core/fontmoduleloader.js +0 -47
- data/assets/bower_components/webfontloader/src/core/fontruler.js +0 -60
- data/assets/bower_components/webfontloader/src/core/fontwatcher.js +0 -171
- data/assets/bower_components/webfontloader/src/core/fontwatchrunner.js +0 -249
- data/assets/bower_components/webfontloader/src/core/initialize.js +0 -97
- data/assets/bower_components/webfontloader/src/core/nativefontwatchrunner.js +0 -69
- data/assets/bower_components/webfontloader/src/core/stylesheetwaiter.js +0 -48
- data/assets/bower_components/webfontloader/src/core/webfont.js +0 -97
- data/assets/bower_components/webfontloader/src/modules.yml +0 -34
- data/assets/bower_components/webfontloader/src/modules/custom.js +0 -63
- data/assets/bower_components/webfontloader/src/modules/fontdeck.js +0 -66
- data/assets/bower_components/webfontloader/src/modules/google/fontapiparser.js +0 -181
- data/assets/bower_components/webfontloader/src/modules/google/fontapiurlbuilder.js +0 -77
- data/assets/bower_components/webfontloader/src/modules/google/googlefontapi.js +0 -54
- data/assets/bower_components/webfontloader/src/modules/monotype.js +0 -110
- data/assets/bower_components/webfontloader/src/modules/typekit.js +0 -73
- data/assets/bower_components/webfontloader/webfontloader.gemspec +0 -191
- data/assets/bower_components/webfontloader/webfontloader.js +0 -17
- data/assets/js/hydejack-7.5.2.js +0 -249
@@ -1,133 +0,0 @@
|
|
1
|
-
[
|
2
|
-
{
|
3
|
-
"os_version": "XP",
|
4
|
-
"os": "Windows",
|
5
|
-
"browser_version": "12.16",
|
6
|
-
"browser": "opera"
|
7
|
-
},
|
8
|
-
{
|
9
|
-
"os_version": "XP",
|
10
|
-
"os": "Windows",
|
11
|
-
"browser_version": "3.6",
|
12
|
-
"browser": "firefox"
|
13
|
-
},
|
14
|
-
{
|
15
|
-
"os_version": "XP",
|
16
|
-
"os": "Windows",
|
17
|
-
"browser_version": "20.0",
|
18
|
-
"browser": "firefox"
|
19
|
-
},
|
20
|
-
{
|
21
|
-
"os_version": "XP",
|
22
|
-
"os": "Windows",
|
23
|
-
"browser_version": "6.0",
|
24
|
-
"browser": "ie",
|
25
|
-
"timeout": "300"
|
26
|
-
},
|
27
|
-
{
|
28
|
-
"os_version": "XP",
|
29
|
-
"os": "Windows",
|
30
|
-
"browser_version": "7.0",
|
31
|
-
"browser": "ie",
|
32
|
-
"timeout": "300"
|
33
|
-
},
|
34
|
-
{
|
35
|
-
"os_version": "XP",
|
36
|
-
"os": "Windows",
|
37
|
-
"browser_version": "8.0",
|
38
|
-
"browser": "ie"
|
39
|
-
},
|
40
|
-
{
|
41
|
-
"os_version": "8",
|
42
|
-
"os": "Windows",
|
43
|
-
"browser_version": "10.0 Desktop",
|
44
|
-
"browser": "ie"
|
45
|
-
},
|
46
|
-
{
|
47
|
-
"os_version": "7",
|
48
|
-
"os": "Windows",
|
49
|
-
"browser_version": "9.0",
|
50
|
-
"browser": "ie"
|
51
|
-
},
|
52
|
-
{
|
53
|
-
"os_version": "Mountain Lion",
|
54
|
-
"os": "OS X",
|
55
|
-
"browser_version": "6.0",
|
56
|
-
"browser": "safari"
|
57
|
-
},
|
58
|
-
{
|
59
|
-
"os_version": "Mountain Lion",
|
60
|
-
"os": "OS X",
|
61
|
-
"browser_version": "25.0",
|
62
|
-
"browser": "chrome"
|
63
|
-
},
|
64
|
-
{
|
65
|
-
"os_version": "Snow Leopard",
|
66
|
-
"os": "OS X",
|
67
|
-
"browser_version": "5.0",
|
68
|
-
"browser": "safari"
|
69
|
-
},
|
70
|
-
{
|
71
|
-
"os_version": "5.0",
|
72
|
-
"device": "iPad 2 (5.0)",
|
73
|
-
"os": "ios",
|
74
|
-
"browser": "Mobile Safari",
|
75
|
-
"timeout": "300"
|
76
|
-
},
|
77
|
-
{
|
78
|
-
"os_version": "5.1",
|
79
|
-
"device": "iPad 3rd",
|
80
|
-
"os": "ios",
|
81
|
-
"browser": "Mobile Safari",
|
82
|
-
"timeout": "300"
|
83
|
-
},
|
84
|
-
{
|
85
|
-
"os_version": "6.0",
|
86
|
-
"device": "iPhone 5",
|
87
|
-
"os": "ios",
|
88
|
-
"browser": "Mobile Safari",
|
89
|
-
"timeout": "300"
|
90
|
-
},
|
91
|
-
{
|
92
|
-
"os_version": "4.3.2",
|
93
|
-
"device": "iPad 2",
|
94
|
-
"os": "ios",
|
95
|
-
"browser": "Mobile Safari",
|
96
|
-
"timeout": "300"
|
97
|
-
},
|
98
|
-
{
|
99
|
-
"os_version": "2.3",
|
100
|
-
"device": "Samsung Galaxy S II",
|
101
|
-
"os": "android",
|
102
|
-
"browser": "Android Browser",
|
103
|
-
"timeout": "300"
|
104
|
-
},
|
105
|
-
{
|
106
|
-
"os_version": "2.2",
|
107
|
-
"device": "Samsung Galaxy S",
|
108
|
-
"os": "android",
|
109
|
-
"browser": "Android Browser",
|
110
|
-
"timeout": "300"
|
111
|
-
},
|
112
|
-
{
|
113
|
-
"os_version": "4.2",
|
114
|
-
"device": "LG Nexus 4",
|
115
|
-
"os": "android",
|
116
|
-
"browser": "Android Browser",
|
117
|
-
"timeout": "300"
|
118
|
-
},
|
119
|
-
{
|
120
|
-
"os_version": "4.0",
|
121
|
-
"device": "Samsung Galaxy Nexus",
|
122
|
-
"os": "android",
|
123
|
-
"browser": "Android Browser",
|
124
|
-
"timeout": "300"
|
125
|
-
},
|
126
|
-
{
|
127
|
-
"os_version": "4.1",
|
128
|
-
"device": "Samsung Galaxy S III",
|
129
|
-
"os": "android",
|
130
|
-
"browser": "Android Browser",
|
131
|
-
"timeout": "300"
|
132
|
-
}
|
133
|
-
]
|
@@ -1,37 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "webfontloader",
|
3
|
-
"version": "1.6.28",
|
4
|
-
"description": "Web Font Loader gives you added control when using linked fonts via @font-face.",
|
5
|
-
"main": "webfontloader.js",
|
6
|
-
"scripts": {
|
7
|
-
"test": "phantomjs tools/jasmine-phantomjs/jasmine-phantomjs.js spec/index.html"
|
8
|
-
},
|
9
|
-
"repository": {
|
10
|
-
"type": "git",
|
11
|
-
"url": "git://github.com/typekit/webfontloader.git"
|
12
|
-
},
|
13
|
-
"keywords": [
|
14
|
-
"web",
|
15
|
-
"fonts",
|
16
|
-
"webfonts",
|
17
|
-
"font",
|
18
|
-
"loader",
|
19
|
-
"@font-face"
|
20
|
-
],
|
21
|
-
"files": [
|
22
|
-
"webfontloader.js",
|
23
|
-
"src/**/*.js"
|
24
|
-
],
|
25
|
-
"contributors": [
|
26
|
-
"Ryan Carver <ryan@typekit.com>",
|
27
|
-
"Jeremie Lenfant-engelmann <jeremiele@google.com>",
|
28
|
-
"Sean McBride <sean@typekit.com>",
|
29
|
-
"Bram Stein <bram@typekit.com>"
|
30
|
-
],
|
31
|
-
"license": "Apache-2.0",
|
32
|
-
"bugs": {
|
33
|
-
"url": "https://github.com/typekit/webfontloader/issues"
|
34
|
-
},
|
35
|
-
"homepage": "https://github.com/typekit/webfontloader",
|
36
|
-
"devDependencies": {}
|
37
|
-
}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
goog.provide('webfont.CssClassName');
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Handles sanitization and construction of css class names.
|
5
|
-
* @param {string=} opt_joinChar The character to join parts of the name on.
|
6
|
-
* Defaults to '-'.
|
7
|
-
* @constructor
|
8
|
-
*/
|
9
|
-
webfont.CssClassName = function(opt_joinChar) {
|
10
|
-
/** @type {string} */
|
11
|
-
this.joinChar_ = opt_joinChar || webfont.CssClassName.DEFAULT_JOIN_CHAR;
|
12
|
-
};
|
13
|
-
|
14
|
-
/**
|
15
|
-
* @const
|
16
|
-
* @type {string}
|
17
|
-
*/
|
18
|
-
webfont.CssClassName.DEFAULT_JOIN_CHAR = '-';
|
19
|
-
|
20
|
-
goog.scope(function () {
|
21
|
-
var CssClassName = webfont.CssClassName;
|
22
|
-
|
23
|
-
/**
|
24
|
-
* Sanitizes a string for use as a css class name. Removes non-word and
|
25
|
-
* underscore characters.
|
26
|
-
* @param {string} name The string.
|
27
|
-
* @return {string} The sanitized string.
|
28
|
-
*/
|
29
|
-
CssClassName.prototype.sanitize = function(name) {
|
30
|
-
return name.replace(/[\W_]+/g, '').toLowerCase();
|
31
|
-
};
|
32
|
-
|
33
|
-
/**
|
34
|
-
* Builds a complete css class name given a variable number of parts.
|
35
|
-
* Sanitizes, then joins the parts together.
|
36
|
-
* @param {...string} var_args The parts to join.
|
37
|
-
* @return {string} The sanitized and joined string.
|
38
|
-
*/
|
39
|
-
CssClassName.prototype.build = function(var_args) {
|
40
|
-
var parts = []
|
41
|
-
for (var i = 0; i < arguments.length; i++) {
|
42
|
-
parts.push(this.sanitize(arguments[i]));
|
43
|
-
}
|
44
|
-
return parts.join(this.joinChar_);
|
45
|
-
};
|
46
|
-
});
|
@@ -1,405 +0,0 @@
|
|
1
|
-
goog.provide('webfont.DomHelper');
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Handles common DOM manipulation tasks. The aim of this library is to cover
|
5
|
-
* the needs of typical font loading. Not more, not less.
|
6
|
-
* @param {Window} mainWindow The main window webfontloader.js is loaded in.
|
7
|
-
* @param {Window=} opt_loadWindow The window we'll load the font into. By
|
8
|
-
* default, the main window is used.
|
9
|
-
* @constructor
|
10
|
-
*/
|
11
|
-
webfont.DomHelper = function(mainWindow, opt_loadWindow) {
|
12
|
-
this.mainWindow_ = mainWindow;
|
13
|
-
this.loadWindow_ = opt_loadWindow || mainWindow;
|
14
|
-
|
15
|
-
/** @type {string} */
|
16
|
-
this.protocol_;
|
17
|
-
|
18
|
-
/** @type {Document} */
|
19
|
-
this.document_ = this.loadWindow_.document;
|
20
|
-
};
|
21
|
-
|
22
|
-
goog.scope(function () {
|
23
|
-
var DomHelper = webfont.DomHelper;
|
24
|
-
|
25
|
-
/**
|
26
|
-
* The NativeFontWatchRunnner depends on the correct and reliable
|
27
|
-
* |onload| event, and browsers with the native font loading API
|
28
|
-
* have reliable @onload support as far as we know. So we use the
|
29
|
-
* event for such a case and unconditionally invokes the callback
|
30
|
-
* otherwise.
|
31
|
-
*
|
32
|
-
* @const
|
33
|
-
* @type {boolean}
|
34
|
-
*/
|
35
|
-
DomHelper.CAN_WAIT_STYLESHEET = !!window['FontFace'];
|
36
|
-
|
37
|
-
/**
|
38
|
-
* Creates an element.
|
39
|
-
* @param {string} elem The element type.
|
40
|
-
* @param {Object=} opt_attr A hash of attribute key/value pairs.
|
41
|
-
* @param {string=} opt_innerHtml Contents of the element.
|
42
|
-
* @return {Element} the new element.
|
43
|
-
*/
|
44
|
-
DomHelper.prototype.createElement = function(elem, opt_attr,
|
45
|
-
opt_innerHtml) {
|
46
|
-
var domElement = this.document_.createElement(elem);
|
47
|
-
|
48
|
-
if (opt_attr) {
|
49
|
-
for (var attr in opt_attr) {
|
50
|
-
// protect against native prototype augmentations
|
51
|
-
if (opt_attr.hasOwnProperty(attr)) {
|
52
|
-
if (attr == "style") {
|
53
|
-
this.setStyle(domElement, opt_attr[attr]);
|
54
|
-
} else {
|
55
|
-
domElement.setAttribute(attr, opt_attr[attr]);
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
60
|
-
if (opt_innerHtml) {
|
61
|
-
domElement.appendChild(this.document_.createTextNode(opt_innerHtml));
|
62
|
-
}
|
63
|
-
return domElement;
|
64
|
-
};
|
65
|
-
|
66
|
-
/**
|
67
|
-
* Inserts an element into the document. This is intended for unambiguous
|
68
|
-
* elements such as html, body, head.
|
69
|
-
* @param {string} tagName The element name.
|
70
|
-
* @param {Element} e The element to append.
|
71
|
-
* @return {boolean} True if the element was inserted.
|
72
|
-
*/
|
73
|
-
DomHelper.prototype.insertInto = function(tagName, e) {
|
74
|
-
var t = this.document_.getElementsByTagName(tagName)[0];
|
75
|
-
|
76
|
-
if (!t) { // opera allows documents without a head
|
77
|
-
t = document.documentElement;
|
78
|
-
}
|
79
|
-
|
80
|
-
// This is safer than appendChild in IE. appendChild causes random
|
81
|
-
// JS errors in IE. Sometimes errors in other JS exectution, sometimes
|
82
|
-
// complete 'This page cannot be displayed' errors. For our purposes,
|
83
|
-
// it's equivalent because we don't need to insert at any specific
|
84
|
-
// location.
|
85
|
-
t.insertBefore(e, t.lastChild);
|
86
|
-
return true;
|
87
|
-
};
|
88
|
-
|
89
|
-
/**
|
90
|
-
* Calls a function when the body tag exists.
|
91
|
-
* @param {function()} callback The function to call.
|
92
|
-
*/
|
93
|
-
DomHelper.prototype.whenBodyExists = function(callback) {
|
94
|
-
var that = this;
|
95
|
-
|
96
|
-
if (that.document_.body) {
|
97
|
-
callback();
|
98
|
-
} else {
|
99
|
-
if (that.document_.addEventListener) {
|
100
|
-
that.document_.addEventListener('DOMContentLoaded', callback);
|
101
|
-
} else {
|
102
|
-
that.document_.attachEvent('onreadystatechange', function () {
|
103
|
-
if (that.document_.readyState == 'interactive' || that.document_.readyState == 'complete') {
|
104
|
-
callback();
|
105
|
-
}
|
106
|
-
});
|
107
|
-
}
|
108
|
-
}
|
109
|
-
};
|
110
|
-
|
111
|
-
/**
|
112
|
-
* Removes an element from the DOM.
|
113
|
-
* @param {Element} node The element to remove.
|
114
|
-
* @return {boolean} True if the element was removed.
|
115
|
-
*/
|
116
|
-
DomHelper.prototype.removeElement = function(node) {
|
117
|
-
if (node.parentNode) {
|
118
|
-
node.parentNode.removeChild(node);
|
119
|
-
return true;
|
120
|
-
}
|
121
|
-
return false;
|
122
|
-
};
|
123
|
-
|
124
|
-
/**
|
125
|
-
* @deprecated Use updateClassName().
|
126
|
-
*
|
127
|
-
* Appends a name to an element's class attribute.
|
128
|
-
* @param {Element} e The element.
|
129
|
-
* @param {string} name The class name to add.
|
130
|
-
*/
|
131
|
-
DomHelper.prototype.appendClassName = function(e, name) {
|
132
|
-
this.updateClassName(e, [name]);
|
133
|
-
};
|
134
|
-
|
135
|
-
/**
|
136
|
-
* @deprecated Use updateClassName().
|
137
|
-
*
|
138
|
-
* Removes a name to an element's class attribute.
|
139
|
-
* @param {Element} e The element.
|
140
|
-
* @param {string} name The class name to remove.
|
141
|
-
*/
|
142
|
-
DomHelper.prototype.removeClassName = function(e, name) {
|
143
|
-
this.updateClassName(e, null, [name]);
|
144
|
-
};
|
145
|
-
|
146
|
-
/**
|
147
|
-
* Updates an element's class attribute in a single change. This
|
148
|
-
* allows multiple updates in a single class name change so there
|
149
|
-
* is no chance for a browser to relayout in between changes.
|
150
|
-
*
|
151
|
-
* @param {Element} e The element.
|
152
|
-
* @param {Array.<string>=} opt_add List of class names to add.
|
153
|
-
* @param {Array.<string>=} opt_remove List of class names to remove.
|
154
|
-
*/
|
155
|
-
DomHelper.prototype.updateClassName = function (e, opt_add, opt_remove) {
|
156
|
-
var add = opt_add || [],
|
157
|
-
remove = opt_remove || [];
|
158
|
-
|
159
|
-
var classes = e.className.split(/\s+/);
|
160
|
-
|
161
|
-
for (var i = 0; i < add.length; i += 1) {
|
162
|
-
var found = false;
|
163
|
-
|
164
|
-
for (var j = 0; j < classes.length; j += 1) {
|
165
|
-
if (add[i] === classes[j]) {
|
166
|
-
found = true;
|
167
|
-
break;
|
168
|
-
}
|
169
|
-
}
|
170
|
-
|
171
|
-
if (!found) {
|
172
|
-
classes.push(add[i]);
|
173
|
-
}
|
174
|
-
}
|
175
|
-
|
176
|
-
var remainingClasses = [];
|
177
|
-
|
178
|
-
for (var i = 0; i < classes.length; i += 1) {
|
179
|
-
var found = false;
|
180
|
-
|
181
|
-
for (var j = 0; j < remove.length; j += 1) {
|
182
|
-
if (classes[i] === remove[j]) {
|
183
|
-
found = true;
|
184
|
-
break;
|
185
|
-
}
|
186
|
-
}
|
187
|
-
|
188
|
-
if (!found) {
|
189
|
-
remainingClasses.push(classes[i]);
|
190
|
-
}
|
191
|
-
}
|
192
|
-
|
193
|
-
e.className = remainingClasses.join(' ')
|
194
|
-
.replace(/\s+/g, ' ')
|
195
|
-
.replace(/^\s+|\s+$/, '');
|
196
|
-
};
|
197
|
-
|
198
|
-
/**
|
199
|
-
* Returns true if an element has a given class name and false otherwise.
|
200
|
-
* @param {Element} e The element.
|
201
|
-
* @param {string} name The class name to check for.
|
202
|
-
* @return {boolean} Whether or not the element has this class name.
|
203
|
-
*/
|
204
|
-
DomHelper.prototype.hasClassName = function(e, name) {
|
205
|
-
var classes = e.className.split(/\s+/);
|
206
|
-
for (var i = 0, len = classes.length; i < len; i++) {
|
207
|
-
if (classes[i] == name) {
|
208
|
-
return true;
|
209
|
-
}
|
210
|
-
}
|
211
|
-
return false;
|
212
|
-
};
|
213
|
-
|
214
|
-
/**
|
215
|
-
* Sets the style attribute on an element.
|
216
|
-
* @param {Element} e The element.
|
217
|
-
* @param {string} styleString The style string.
|
218
|
-
*/
|
219
|
-
DomHelper.prototype.setStyle = function(e, styleString) {
|
220
|
-
e.style.cssText = styleString;
|
221
|
-
};
|
222
|
-
|
223
|
-
/**
|
224
|
-
* @return {Window} The main window webfontloader.js is loaded in (for config).
|
225
|
-
*/
|
226
|
-
DomHelper.prototype.getMainWindow = function() {
|
227
|
-
return this.mainWindow_;
|
228
|
-
};
|
229
|
-
|
230
|
-
/**
|
231
|
-
* @return {Window} The window that we're loading the font(s) into.
|
232
|
-
*/
|
233
|
-
DomHelper.prototype.getLoadWindow = function() {
|
234
|
-
return this.loadWindow_;
|
235
|
-
};
|
236
|
-
|
237
|
-
/**
|
238
|
-
* Returns the hostname of the current document.
|
239
|
-
* @return {string} hostname.
|
240
|
-
*/
|
241
|
-
DomHelper.prototype.getHostName = function() {
|
242
|
-
return this.getLoadWindow().location.hostname || this.getMainWindow().location.hostname;
|
243
|
-
};
|
244
|
-
|
245
|
-
/**
|
246
|
-
* Creates a style element.
|
247
|
-
* @param {string} css Contents of the style element.
|
248
|
-
* @return {Element} a DOM element.
|
249
|
-
*/
|
250
|
-
DomHelper.prototype.createStyle = function(css) {
|
251
|
-
var e = this.createElement('style');
|
252
|
-
|
253
|
-
e.setAttribute('type', 'text/css');
|
254
|
-
if (e.styleSheet) { // IE
|
255
|
-
e.styleSheet.cssText = css;
|
256
|
-
} else {
|
257
|
-
e.appendChild(document.createTextNode(css));
|
258
|
-
}
|
259
|
-
return e;
|
260
|
-
};
|
261
|
-
|
262
|
-
/**
|
263
|
-
* Loads an external stylesheet.
|
264
|
-
*
|
265
|
-
* @param {string} href the URL of the stylesheet
|
266
|
-
* @param {function(Error)=} opt_callback Called when the stylesheet has loaded or failed to
|
267
|
-
* load. Note that the callback is *NOT* guaranteed to be called in all browsers. The first
|
268
|
-
* argument to the callback is an error object that is falsy when there are no errors and
|
269
|
-
* truthy when there are.
|
270
|
-
* @param {boolean=} opt_async True if the stylesheet should be loaded asynchronously. Defaults to false.
|
271
|
-
* @return {Element} The link element
|
272
|
-
*/
|
273
|
-
DomHelper.prototype.loadStylesheet = function (href, opt_callback, opt_async) {
|
274
|
-
var link = this.createElement('link', {
|
275
|
-
'rel': 'stylesheet',
|
276
|
-
'href': href,
|
277
|
-
'media': (opt_async ? 'only x' : 'all')
|
278
|
-
});
|
279
|
-
|
280
|
-
var sheets = this.document_.styleSheets,
|
281
|
-
eventFired = false,
|
282
|
-
asyncResolved = !opt_async,
|
283
|
-
callbackArg = null,
|
284
|
-
callback = opt_callback || null;
|
285
|
-
|
286
|
-
function mayInvokeCallback() {
|
287
|
-
if (callback && eventFired && asyncResolved) {
|
288
|
-
callback(callbackArg);
|
289
|
-
callback = null;
|
290
|
-
}
|
291
|
-
}
|
292
|
-
|
293
|
-
if (DomHelper.CAN_WAIT_STYLESHEET) {
|
294
|
-
link.onload = function () {
|
295
|
-
eventFired = true;
|
296
|
-
mayInvokeCallback();
|
297
|
-
};
|
298
|
-
|
299
|
-
link.onerror = function () {
|
300
|
-
eventFired = true;
|
301
|
-
callbackArg = new Error('Stylesheet failed to load');
|
302
|
-
mayInvokeCallback();
|
303
|
-
};
|
304
|
-
} else {
|
305
|
-
// Some callers expect opt_callback being called asynchronously.
|
306
|
-
setTimeout(function () {
|
307
|
-
eventFired = true;
|
308
|
-
mayInvokeCallback();
|
309
|
-
}, 0);
|
310
|
-
}
|
311
|
-
|
312
|
-
function onStylesheetAvailable(callback) {
|
313
|
-
for (var i = 0; i < sheets.length; i++) {
|
314
|
-
if (sheets[i].href && sheets[i].href.indexOf(href) !== -1) {
|
315
|
-
return callback();
|
316
|
-
}
|
317
|
-
}
|
318
|
-
|
319
|
-
setTimeout(function () {
|
320
|
-
onStylesheetAvailable(callback);
|
321
|
-
}, 0);
|
322
|
-
}
|
323
|
-
|
324
|
-
function onMediaAvailable(callback) {
|
325
|
-
for (var i = 0; i < sheets.length; i++) {
|
326
|
-
if (sheets[i].href && sheets[i].href.indexOf(href) !== -1 && sheets[i].media) {
|
327
|
-
/**
|
328
|
-
* @type {string|MediaList|null}
|
329
|
-
*/
|
330
|
-
var media = sheets[i].media;
|
331
|
-
|
332
|
-
if (media === "all" || (media.mediaText && media.mediaText === "all")) {
|
333
|
-
return callback();
|
334
|
-
}
|
335
|
-
}
|
336
|
-
}
|
337
|
-
|
338
|
-
setTimeout(function () {
|
339
|
-
onMediaAvailable(callback);
|
340
|
-
}, 0);
|
341
|
-
}
|
342
|
-
|
343
|
-
this.insertInto('head', link);
|
344
|
-
|
345
|
-
if (opt_async) {
|
346
|
-
onStylesheetAvailable(function () {
|
347
|
-
link.media = "all";
|
348
|
-
// The media type change doesn't take effect immediately on Chrome, so
|
349
|
-
// we'll query the media attribute on the stylesheet until it changes
|
350
|
-
// to "all".
|
351
|
-
onMediaAvailable(function () {
|
352
|
-
asyncResolved = true;
|
353
|
-
mayInvokeCallback();
|
354
|
-
});
|
355
|
-
});
|
356
|
-
}
|
357
|
-
|
358
|
-
return link;
|
359
|
-
};
|
360
|
-
|
361
|
-
/**
|
362
|
-
* Loads an external script file.
|
363
|
-
* @param {string} src URL of the script.
|
364
|
-
* @param {function(Error)=} opt_callback callback when the script has loaded. The first argument to
|
365
|
-
* the callback is an error object that is falsy when there are no errors and truthy when there are.
|
366
|
-
* @param {number=} opt_timeout The number of milliseconds after which the callback will be called
|
367
|
-
* with a timeout error. Defaults to 5 seconds.
|
368
|
-
* @return {Element} The script element
|
369
|
-
*/
|
370
|
-
DomHelper.prototype.loadScript = function(src, opt_callback, opt_timeout) {
|
371
|
-
var head = this.document_.getElementsByTagName('head')[0];
|
372
|
-
|
373
|
-
if (head) {
|
374
|
-
var script = this.createElement('script', {
|
375
|
-
'src': src
|
376
|
-
});
|
377
|
-
var done = false;
|
378
|
-
script.onload = script.onreadystatechange = function() {
|
379
|
-
if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
|
380
|
-
done = true;
|
381
|
-
if (opt_callback) {
|
382
|
-
opt_callback(null);
|
383
|
-
}
|
384
|
-
script.onload = script.onreadystatechange = null;
|
385
|
-
// Avoid a bizarre issue with unclosed <base> tag in IE6 - http://blog.dotsmart.net/2008/04/
|
386
|
-
if (script.parentNode.tagName == 'HEAD') head.removeChild(script);
|
387
|
-
}
|
388
|
-
};
|
389
|
-
head.appendChild(script);
|
390
|
-
|
391
|
-
setTimeout(function () {
|
392
|
-
if (!done) {
|
393
|
-
done = true;
|
394
|
-
if (opt_callback) {
|
395
|
-
opt_callback(new Error('Script load timeout'));
|
396
|
-
}
|
397
|
-
}
|
398
|
-
}, opt_timeout || 5000);
|
399
|
-
|
400
|
-
return script;
|
401
|
-
}
|
402
|
-
|
403
|
-
return null;
|
404
|
-
};
|
405
|
-
});
|