glebtv-ckeditor 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +202 -0
- data/Rakefile +66 -0
- data/app/assets/javascripts/ckeditor/application.js +5 -0
- data/app/assets/javascripts/ckeditor/init.js +8 -0
- data/app/assets/stylesheets/ckeditor/application.css +6 -0
- data/app/controllers/ckeditor/application_controller.rb +32 -0
- data/app/controllers/ckeditor/attachment_files_controller.rb +24 -0
- data/app/controllers/ckeditor/pictures_controller.rb +24 -0
- data/app/views/ckeditor/attachment_files/index.html.erb +15 -0
- data/app/views/ckeditor/pictures/index.html.erb +15 -0
- data/app/views/ckeditor/shared/_asset.html.erb +20 -0
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +22 -0
- data/app/views/layouts/ckeditor/application.html.erb +31 -0
- data/app/views/rails_admin/main/_form_ckeditor.html.haml +3 -0
- data/config/locales/cs.ckeditor.yml +8 -0
- data/config/locales/en.ckeditor.yml +8 -0
- data/config/locales/es.ckeditor.yml +8 -0
- data/config/locales/fr.ckeditor.yml +8 -0
- data/config/locales/it.ckeditor.yml +8 -0
- data/config/locales/nl.ckeditor.yml +8 -0
- data/config/locales/pl.ckeditor.yml +8 -0
- data/config/locales/pt-BR.ckeditor.yml +8 -0
- data/config/locales/ru.ckeditor.yml +8 -0
- data/config/locales/sv-SE.ckeditor.yml +8 -0
- data/config/locales/uk.ckeditor.yml +8 -0
- data/config/locales/zh-CN.ckeditor.yml +8 -0
- data/config/routes.rb +4 -0
- data/lib/ckeditor.rb +81 -0
- data/lib/ckeditor/backend/carrierwave.rb +64 -0
- data/lib/ckeditor/backend/dragonfly.rb +45 -0
- data/lib/ckeditor/backend/paperclip.rb +56 -0
- data/lib/ckeditor/engine.rb +37 -0
- data/lib/ckeditor/helpers/controllers.rb +30 -0
- data/lib/ckeditor/helpers/form_builder.rb +11 -0
- data/lib/ckeditor/helpers/form_helper.rb +27 -0
- data/lib/ckeditor/helpers/view_helper.rb +22 -0
- data/lib/ckeditor/hooks/formtastic.rb +12 -0
- data/lib/ckeditor/hooks/simple_form.rb +9 -0
- data/lib/ckeditor/http.rb +89 -0
- data/lib/ckeditor/orm/active_record.rb +26 -0
- data/lib/ckeditor/orm/base.rb +46 -0
- data/lib/ckeditor/orm/mongoid.rb +43 -0
- data/lib/ckeditor/rails_admin/config/fields/types/ckeditor.rb +29 -0
- data/lib/ckeditor/utils.rb +70 -0
- data/lib/ckeditor/version.rb +6 -0
- data/lib/generators/ckeditor/install_generator.rb +83 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +7 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +7 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +7 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +26 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +7 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +7 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb +12 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +27 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +4 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +12 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +13 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +26 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +42 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +53 -0
- data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +26 -0
- data/lib/generators/ckeditor/templates/ckeditor.rb +18 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +7 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +7 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +7 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +5 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +12 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +13 -0
- data/test/ckeditor_test.rb +13 -0
- data/test/controllers/attachment_files_controller_test.rb +63 -0
- data/test/controllers/pictures_controller_test.rb +64 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +11 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/test/dummy/app/controllers/application_controller.rb +4 -0
- data/test/dummy/app/controllers/posts_controller.rb +83 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/posts_helper.rb +2 -0
- data/test/dummy/app/models/post.rb +17 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/posts/_form.html.erb +30 -0
- data/test/dummy/app/views/posts/edit.html.erb +6 -0
- data/test/dummy/app/views/posts/index.html.erb +27 -0
- data/test/dummy/app/views/posts/new.html.erb +5 -0
- data/test/dummy/app/views/posts/show.html.erb +5 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +63 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/ckeditor.rb +10 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/mongoid.yml +2 -0
- data/test/dummy/config/routes.rb +6 -0
- data/test/dummy/db/migrate/20110623120047_create_posts.rb +14 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/files/rails.png +0 -0
- data/test/dummy/test/fixtures/files/rails.tar.gz +0 -0
- data/test/functional/posts_controller_test.rb +41 -0
- data/test/generators/install_generator_test.rb +97 -0
- data/test/integration/navigation_test.rb +7 -0
- data/test/models/attachment_file_test.rb +22 -0
- data/test/models/picture_test.rb +21 -0
- data/test/models/utils_test.rb +19 -0
- data/test/orm/active_record.rb +1 -0
- data/test/orm/mongoid.rb +6 -0
- data/test/support/controller_hooks.rb +27 -0
- data/test/support/helpers.rb +30 -0
- data/test/support/integration_case.rb +5 -0
- data/test/support/raw_post.rb +9 -0
- data/test/support/routes.txt +4 -0
- data/test/test_helper.rb +38 -0
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +56 -0
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +1264 -0
- data/vendor/assets/javascripts/ckeditor/README.md +39 -0
- data/vendor/assets/javascripts/ckeditor/build-config.js +161 -0
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +873 -0
- data/vendor/assets/javascripts/ckeditor/config.js.erb +69 -0
- data/vendor/assets/javascripts/ckeditor/contents.css +99 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/gal_add.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/gal_add.png +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/gal_del.png +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/gal_more.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/preloader.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/avi.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/ckfnothumb.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/doc.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/docx.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/exe.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/gz.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/htm.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/jpg.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/mp3.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/mpg.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/pdf.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/psd.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/rar.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/swf.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/tar.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/txt.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/unknown.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/wmv.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/xls.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/xlsx.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/images/thumbs/zip.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/javascripts/application.js +221 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +1301 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.min.js +4 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.tmpl.min.js +10 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/javascripts/rails.js +373 -0
- data/vendor/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.sass +102 -0
- data/vendor/assets/javascripts/ckeditor/lang/af.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ar.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/bg.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/bn.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/bs.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ca.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/cs.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/cy.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/da.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/de.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/el.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/en-au.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/eo.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/es.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/et.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/eu.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/fa.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/fi.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/fo.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/fr.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/gl.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/gu.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/he.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/hi.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/hr.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/hu.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/is.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/it.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ja.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ka.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/km.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ko.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ku.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/lt.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/lv.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/mk.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/mn.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ms.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/nb.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/nl.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/no.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/pl.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/pt.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ro.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sk.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sl.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sr.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sv.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/th.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/tr.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ug.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/uk.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/vi.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/zh.js +5 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/CKCss.xml +26 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/ckcss.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/ckcss1.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/css/styles.css +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/dialogs/ckcss.js +3589 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/lang/en.js +16 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/lang/ru.js +16 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/plugin.js +62 -0
- data/vendor/assets/javascripts/ckeditor/plugins/LoremIpsum/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/LoremIpsum/images/icon1.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/LoremIpsum/plugin.js +66 -0
- data/vendor/assets/javascripts/ckeditor/plugins/MediaEmbed/icons/mediaembed.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/MediaEmbed/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/MediaEmbed/plugin.js +64 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/code/code/code.js +48 -0
- data/vendor/assets/javascripts/ckeditor/plugins/code/images/code.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/code/plugin.js +17 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.css +239 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/sourcecodepro-regular.eot +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/sourcecodepro-regular.otf +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/sourcecodepro-regular.svg +242 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/sourcecodepro-regular.ttf +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/sourcecodepro-regular.woff +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.js +4553 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/css.js +465 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/htmlmixed.js +84 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/javascript.js +411 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/closetag.js +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/colorize.js +29 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/continuecomment.js +36 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/continuelist.js +28 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/dialog.css +32 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/dialog.js +75 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/foldcode.js +182 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/formatting.js +108 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/javascript-hint.js +137 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/loadmode.js +51 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/match-highlighter.js +46 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/matchbrackets.js +63 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/multiplex.js +95 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/overlay.js +59 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/pig-hint.js +117 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/runmode-standalone.js +90 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/runmode.js +52 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/search.js +119 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/searchcursor.js +119 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/simple-hint.css +16 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/simple-hint.js +102 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/util/xml-hint.js +131 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/xml.js +324 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/af.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ar.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bn.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bs.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ca.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/cs.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/cy.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/da.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/de.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/el.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-au.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-ca.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-gb.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/eo.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/es.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/et.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/eu.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fa.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fi.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fo.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fr-ca.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fr.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/gl.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/gu.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/he.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hi.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hr.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hu.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/is.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/it.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ja.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ka.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/km.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ko.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ku.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/lt.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/lv.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/mk.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/mn.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ms.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/nb.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/nl.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/no.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pl.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pt-br.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pt.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ro.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sk.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sl.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sr-latn.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sr.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sv.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/th.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/tr.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ug.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/uk.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/vi.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/zh-cn.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/zh.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +189 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +76 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +18 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +21 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +44 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +28 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +21 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +21 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +207 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +27 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +46 -0
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +24 -0
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +23 -0
- data/vendor/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/highslide/dialogs/hs.js +73 -0
- data/vendor/assets/javascripts/ckeditor/plugins/highslide/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/highslide/lang/en.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/highslide/lang/ru.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/highslide/plugin.js +26 -0
- data/vendor/assets/javascripts/ckeditor/plugins/highslide/readme.txt +55 -0
- data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/install.html +93 -0
- data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/styles.css +59 -0
- data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/icon1.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/icon2.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/icon3.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/htmlbuttons/plugin.js +71 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +173 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +41 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +36 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/de.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/en.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/fr.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/nl.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/lang/ru.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.js +781 -0
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.min.js +4 -0
- data/vendor/assets/javascripts/ckeditor/plugins/oembed/plugin.js +106 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +31 -0
- data/vendor/assets/javascripts/ckeditor/plugins/preview/preview.html +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +19 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +138 -0
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/assets/sample.css +70 -0
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +82 -0
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +84 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +95 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +11 -0
- data/vendor/assets/javascripts/ckeditor/samples/ajax.html +82 -0
- data/vendor/assets/javascripts/ckeditor/samples/api.html +207 -0
- data/vendor/assets/javascripts/ckeditor/samples/appendto.html +57 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/outputxhtml/outputxhtml.css +204 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/posteddata.php +59 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/sample.css +3 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +7 -0
- data/vendor/assets/javascripts/ckeditor/samples/divreplace.html +141 -0
- data/vendor/assets/javascripts/ckeditor/samples/index.html +119 -0
- data/vendor/assets/javascripts/ckeditor/samples/inlineall.html +311 -0
- data/vendor/assets/javascripts/ckeditor/samples/inlinebycode.html +122 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/assets/my_dialog.js +48 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/dialog.html +187 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/enterkey/enterkey.html +103 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +18 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +280 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputhtml.html +237 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/magicline/magicline.html +203 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/toolbar/toolbar.html +200 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +71 -0
- data/vendor/assets/javascripts/ckeditor/samples/readonly.html +73 -0
- data/vendor/assets/javascripts/ckeditor/samples/replacebyclass.html +57 -0
- data/vendor/assets/javascripts/ckeditor/samples/replacebycode.html +56 -0
- data/vendor/assets/javascripts/ckeditor/samples/sample.css +333 -0
- data/vendor/assets/javascripts/ckeditor/samples/sample.js +5 -0
- data/vendor/assets/javascripts/ckeditor/samples/sample_posteddata.php +16 -0
- data/vendor/assets/javascripts/ckeditor/samples/tabindex.html +75 -0
- data/vendor/assets/javascripts/ckeditor/samples/uicolor.html +69 -0
- data/vendor/assets/javascripts/ckeditor/samples/uilanguages.html +119 -0
- data/vendor/assets/javascripts/ckeditor/samples/xhtmlstyle.html +219 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +687 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_opera.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +1389 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/mini.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +51 -0
- data/vendor/assets/javascripts/ckeditor/styles.js +112 -0
- metadata +736 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
CKEDITOR.plugins.setLang('oembed', 'en', {
|
2
|
+
title : "Embed Media Content (Photo, Video, Audio, Rich)",
|
3
|
+
button : "Embed Media Content from Various Sites",
|
4
|
+
pasteUrl : "Paste an URL (Also shortened URLs are supported) from one of the Supported Sites (e.g. YouTube, Flickr, Qik, Vimeo, Hulu, Viddler, MyOpera, etc.) here ...",
|
5
|
+
width : "Max. Width:",
|
6
|
+
height : "Max. Height:",
|
7
|
+
invalidUrl : "Please provide an valid URL!",
|
8
|
+
noEmbedCode : "No embed code found, or site is not supported!"
|
9
|
+
});
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// French Translation by https://github.com/wissim
|
2
|
+
|
3
|
+
CKEDITOR.plugins.setLang('oembed', 'fr', {
|
4
|
+
title : "Intgrer des contenus multimédia externe. (Photo, Video, Audio, ...)",
|
5
|
+
button : "Insérer des contenus multimédia à partir de divers sites de contenu.",
|
6
|
+
pasteUrl : "Coller l'URL de partage que vous voulez publier. De nombreux services sont pris en charge (YouTube, Flickr, Qik, Vimeo, Hulu, Viddler, MyOpera, etc.). Vous pouvez aussi utiliser les URLs courtes.",
|
7
|
+
width : "Max. Largeur:",
|
8
|
+
height : "Max. Hauteur:",
|
9
|
+
invalidUrl : "Merci de fournir une adresse valide !",
|
10
|
+
noEmbedCode : "Aucun code d'intégration trouvé ou le site n'est pas supporté !"
|
11
|
+
});
|
@@ -0,0 +1,9 @@
|
|
1
|
+
CKEDITOR.plugins.setLang('oembed', 'nl', {
|
2
|
+
title : "Integratie van media-inhoud (foto's, video, content)",
|
3
|
+
button : "Media-inhoud van externe websites",
|
4
|
+
pasteUrl : "Geef een URL van een pagina in dat ondersteund wordt (Bijv.: YouTube, Flickr, Qik, Vimeo, Hulu, Viddler, MyOpera, etc.) ...",
|
5
|
+
width : "Maximale breedte:",
|
6
|
+
height : "Maximale hoogte:",
|
7
|
+
invalidUrl : "Please provide an valid URL!",
|
8
|
+
noEmbedCode : "No embed code found, or site is not supported!"
|
9
|
+
});
|
@@ -0,0 +1,9 @@
|
|
1
|
+
CKEDITOR.plugins.setLang('oembed', 'ru', {
|
2
|
+
title : "Вставить медиа контент (аудио, видео, картинки со сторонних сайтов)",
|
3
|
+
button : "Вставить медиа контент",
|
4
|
+
pasteUrl : "Скопируйте в поле ввода ссылку на контент на одном из поддерживаемых сайтов (напр. YouTube, Flickr, Qik, Vimeo, Hulu, Viddler, MyOpera, и т.д.)",
|
5
|
+
width : "Макс. ширина:",
|
6
|
+
height : "Макс. высота:",
|
7
|
+
invalidUrl : "Неверная ссылка!",
|
8
|
+
noEmbedCode : "Код вставки не найден, или сайт не поддерживается!"
|
9
|
+
});
|
@@ -0,0 +1,781 @@
|
|
1
|
+
/*!
|
2
|
+
* jquery oembed plugin
|
3
|
+
*
|
4
|
+
* Copyright (c) 2009 Richard Chamorro
|
5
|
+
* Licensed under the MIT license
|
6
|
+
*
|
7
|
+
* Orignal Author: Richard Chamorro
|
8
|
+
* Forked by Andrew Mee to Provide a slightly diffent kind of embedding
|
9
|
+
* experience
|
10
|
+
*/
|
11
|
+
(function($) {
|
12
|
+
$.fn.oembed = function(url, options, embedAction) {
|
13
|
+
|
14
|
+
settings = $.extend(true, $.fn.oembed.defaults, options);
|
15
|
+
var shortURLList = ["0rz.tw","1link.in","1url.com","2.gp","2big.at","2tu.us","3.ly","307.to","4ms.me","4sq.com","4url.cc","6url.com","7.ly","a.gg","a.nf","aa.cx","abcurl.net",
|
16
|
+
"ad.vu","adf.ly","adjix.com","afx.cc","all.fuseurl.com","alturl.com","amzn.to","ar.gy","arst.ch","atu.ca","azc.cc","b23.ru","b2l.me","bacn.me","bcool.bz","binged.it",
|
17
|
+
"bit.ly","bizj.us","bloat.me","bravo.ly","bsa.ly","budurl.com","canurl.com","chilp.it","chzb.gr","cl.lk", "cl.ly", "clck.ru", "cli.gs", "cliccami.info",
|
18
|
+
"clickthru.ca", "clop.in", "conta.cc", "cort.as", "cot.ag", "crks.me", "ctvr.us", "cutt.us", "dai.ly", "decenturl.com", "dfl8.me", "digbig.com",
|
19
|
+
"http:\/\/digg\.com\/[^\/]+$", "disq.us", "dld.bz", "dlvr.it", "do.my", "doiop.com", "dopen.us", "easyuri.com", "easyurl.net", "eepurl.com", "eweri.com",
|
20
|
+
"fa.by", "fav.me", "fb.me", "fbshare.me", "ff.im", "fff.to", "fire.to", "firsturl.de", "firsturl.net", "flic.kr", "flq.us", "fly2.ws", "fon.gs", "freak.to",
|
21
|
+
"fuseurl.com", "fuzzy.to", "fwd4.me", "fwib.net", "g.ro.lt", "gizmo.do", "gl.am", "go.9nl.com", "go.ign.com", "go.usa.gov", "goo.gl", "goshrink.com", "gurl.es",
|
22
|
+
"hex.io", "hiderefer.com", "hmm.ph", "href.in", "hsblinks.com", "htxt.it", "huff.to", "hulu.com", "hurl.me", "hurl.ws", "icanhaz.com", "idek.net", "ilix.in", "is.gd",
|
23
|
+
"its.my", "ix.lt", "j.mp", "jijr.com", "kl.am", "klck.me", "korta.nu", "krunchd.com", "l9k.net", "lat.ms", "liip.to", "liltext.com", "linkbee.com", "linkbun.ch",
|
24
|
+
"liurl.cn", "ln-s.net", "ln-s.ru", "lnk.gd", "lnk.ms", "lnkd.in", "lnkurl.com", "lru.jp", "lt.tl", "lurl.no", "macte.ch", "mash.to", "merky.de", "migre.me", "miniurl.com",
|
25
|
+
"minurl.fr", "mke.me", "moby.to", "moourl.com", "mrte.ch", "myloc.me", "myurl.in", "n.pr", "nbc.co", "nblo.gs", "nn.nf", "not.my", "notlong.com", "nsfw.in",
|
26
|
+
"nutshellurl.com", "nxy.in", "nyti.ms", "o-x.fr", "oc1.us", "om.ly", "omf.gd", "omoikane.net", "on.cnn.com", "on.mktw.net", "onforb.es", "orz.se", "ow.ly", "ping.fm",
|
27
|
+
"pli.gs", "pnt.me", "politi.co", "post.ly", "pp.gg", "profile.to", "ptiturl.com", "pub.vitrue.com", "qlnk.net", "qte.me", "qu.tc", "qy.fi", "r.im", "rb6.me", "read.bi",
|
28
|
+
"readthis.ca", "reallytinyurl.com", "redir.ec", "redirects.ca", "redirx.com", "retwt.me", "ri.ms", "rickroll.it", "riz.gd", "rt.nu", "ru.ly", "rubyurl.com", "rurl.org",
|
29
|
+
"rww.tw", "s4c.in", "s7y.us", "safe.mn", "sameurl.com", "sdut.us", "shar.es", "shink.de", "shorl.com", "short.ie", "short.to", "shortlinks.co.uk", "shorturl.com",
|
30
|
+
"shout.to", "show.my", "shrinkify.com", "shrinkr.com", "shrt.fr", "shrt.st", "shrten.com", "shrunkin.com", "simurl.com", "slate.me", "smallr.com", "smsh.me", "smurl.name",
|
31
|
+
"sn.im", "snipr.com", "snipurl.com", "snurl.com", "sp2.ro", "spedr.com", "srnk.net", "srs.li", "starturl.com", "su.pr", "surl.co.uk", "surl.hu", "t.cn", "t.co", "t.lh.com",
|
32
|
+
"ta.gd", "tbd.ly", "tcrn.ch", "tgr.me", "tgr.ph", "tighturl.com", "tiniuri.com", "tiny.cc", "tiny.ly", "tiny.pl", "tinylink.in", "tinyuri.ca", "tinyurl.com", "tk.", "tl.gd",
|
33
|
+
"tmi.me", "tnij.org", "tnw.to", "tny.com", "to.ly", "togoto.us", "totc.us", "toysr.us", "tpm.ly", "tr.im", "tra.kz", "trunc.it", "twhub.com", "twirl.at",
|
34
|
+
"twitclicks.com", "twitterurl.net", "twitterurl.org", "twiturl.de", "twurl.cc", "twurl.nl", "u.mavrev.com", "u.nu", "u76.org", "ub0.cc", "ulu.lu", "updating.me", "ur1.ca",
|
35
|
+
"url.az", "url.co.uk", "url.ie", "url360.me", "url4.eu", "urlborg.com", "urlbrief.com", "urlcover.com", "urlcut.com", "urlenco.de", "urli.nl", "urls.im",
|
36
|
+
"urlshorteningservicefortwitter.com", "urlx.ie", "urlzen.com", "usat.ly", "use.my", "vb.ly", "vgn.am", "vl.am", "vm.lc", "w55.de", "wapo.st", "wapurl.co.uk", "wipi.es",
|
37
|
+
"wp.me", "x.vu", "xr.com", "xrl.in", "xrl.us", "xurl.es", "xurl.jp", "y.ahoo.it", "yatuc.com", "ye.pe", "yep.it", "yfrog.com", "yhoo.it", "yiyd.com", "youtu.be", "yuarel.com",
|
38
|
+
"z0p.de", "zi.ma", "zi.mu", "zipmyurl.com", "zud.me", "zurl.ws", "zz.gd", "zzang.kr", "›.ws", "✩.ws", "✿.ws", "❥.ws", "➔.ws", "➞.ws", "➡.ws", "➨.ws", "➯.ws", "➹.ws", "➽.ws"];
|
39
|
+
|
40
|
+
if ($('#jqoembeddata').length === 0) $('<span id="jqoembeddata"></span>').appendTo('body');
|
41
|
+
|
42
|
+
return this.each(function() {
|
43
|
+
|
44
|
+
var container = $(this),
|
45
|
+
resourceURL = (url && (!url.indexOf('http://') || !url.indexOf('https://'))) ? url : container.attr("href"),
|
46
|
+
provider;
|
47
|
+
|
48
|
+
if (embedAction) {
|
49
|
+
settings.onEmbed = embedAction;
|
50
|
+
}
|
51
|
+
else if (!settings.onEmbed){
|
52
|
+
settings.onEmbed = function(oembedData) {
|
53
|
+
$.fn.oembed.insertCode(this, settings.embedMethod, oembedData);
|
54
|
+
};
|
55
|
+
}
|
56
|
+
|
57
|
+
if (resourceURL !== null) {
|
58
|
+
//Check if shorten URL
|
59
|
+
for (var j = 0, l =shortURLList.length; j < l; j++) {
|
60
|
+
var regExp = new RegExp('://'+shortURLList[j]+'/', "i");
|
61
|
+
if (resourceURL.match(regExp) !== null) {
|
62
|
+
//AJAX to http://api.longurl.org/v2/expand?url=http://bit.ly/JATvIs&format=json&callback=hhh
|
63
|
+
var ajaxopts = $.extend({
|
64
|
+
url: "http://api.longurl.org/v2/expand",
|
65
|
+
dataType: 'jsonp',
|
66
|
+
data: {
|
67
|
+
url: resourceURL,
|
68
|
+
format: "json"
|
69
|
+
//callback: "?"
|
70
|
+
},
|
71
|
+
success: function(data) {
|
72
|
+
//this = $.fn.oembed;
|
73
|
+
resourceURL = data['long-url'];
|
74
|
+
provider = $.fn.oembed.getOEmbedProvider(data['long-url']);
|
75
|
+
|
76
|
+
if (provider !== null) {
|
77
|
+
provider.params = getNormalizedParams(settings[provider.name]) || {};
|
78
|
+
provider.maxWidth = settings.maxWidth;
|
79
|
+
provider.maxHeight = settings.maxHeight;
|
80
|
+
embedCode(container, resourceURL, provider);
|
81
|
+
} else {
|
82
|
+
settings.onProviderNotFound.call(container, resourceURL);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}, settings.ajaxOptions || {});
|
86
|
+
|
87
|
+
$.ajax(ajaxopts);
|
88
|
+
|
89
|
+
return container;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
provider = $.fn.oembed.getOEmbedProvider(resourceURL);
|
93
|
+
|
94
|
+
if (provider !== null) {
|
95
|
+
provider.params = getNormalizedParams(settings[provider.name]) || {};
|
96
|
+
provider.maxWidth = settings.maxWidth;
|
97
|
+
provider.maxHeight = settings.maxHeight;
|
98
|
+
embedCode(container, resourceURL, provider);
|
99
|
+
} else {
|
100
|
+
settings.onProviderNotFound.call(container, resourceURL);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
return container;
|
105
|
+
});
|
106
|
+
|
107
|
+
|
108
|
+
};
|
109
|
+
|
110
|
+
var settings;
|
111
|
+
|
112
|
+
// Plugin defaults
|
113
|
+
$.fn.oembed.defaults = {
|
114
|
+
maxWidth: null,
|
115
|
+
maxHeight: null,
|
116
|
+
includeHandle: true,
|
117
|
+
embedMethod: 'auto',
|
118
|
+
// "auto", "append", "fill"
|
119
|
+
onProviderNotFound: function() {},
|
120
|
+
beforeEmbed: function() {},
|
121
|
+
afterEmbed: function() {},
|
122
|
+
onEmbed: false,
|
123
|
+
onError: function() {},
|
124
|
+
ajaxOptions: {}
|
125
|
+
};
|
126
|
+
|
127
|
+
/* Private functions */
|
128
|
+
function rand(length,current){ //Found on http://stackoverflow.com/questions/1349404/generate-a-string-of-5-random-characters-in-javascript
|
129
|
+
current = current ? current : '';
|
130
|
+
return length ? rand( --length , "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".charAt( Math.floor( Math.random() * 60 ) ) + current ) : current;
|
131
|
+
}
|
132
|
+
|
133
|
+
function getRequestUrl(provider, externalUrl) {
|
134
|
+
var url = provider.apiendpoint,
|
135
|
+
qs = "",
|
136
|
+
i;
|
137
|
+
url += (url.indexOf("?") <= 0) ? "?" : "&";
|
138
|
+
url = url.replace('#','%23');
|
139
|
+
|
140
|
+
if (provider.maxWidth !== null && (typeof provider.params.maxwidth === 'undefined' || provider.params.maxwidth === null)) {
|
141
|
+
provider.params.maxwidth = provider.maxWidth;
|
142
|
+
}
|
143
|
+
|
144
|
+
if (provider.maxHeight !== null && (typeof provider.params.maxheight === 'undefined' || provider.params.maxheight === null)) {
|
145
|
+
provider.params.maxheight = provider.maxHeight;
|
146
|
+
}
|
147
|
+
|
148
|
+
for (i in provider.params) {
|
149
|
+
// We don't want them to jack everything up by changing the callback parameter
|
150
|
+
if (i == provider.callbackparameter) continue;
|
151
|
+
|
152
|
+
// allows the options to be set to null, don't send null values to the server as parameters
|
153
|
+
if (provider.params[i] !== null) qs += "&" + escape(i) + "=" + provider.params[i];
|
154
|
+
}
|
155
|
+
|
156
|
+
url += "format=" + provider.format + "&url=" + escape(externalUrl) + qs;
|
157
|
+
if(provider.dataType!='json') url += "&" + provider.callbackparameter + "=?";
|
158
|
+
|
159
|
+
return url;
|
160
|
+
}
|
161
|
+
function success(oembedData, externalUrl, container) {
|
162
|
+
$('#jqoembeddata').data(externalUrl, oembedData.code);
|
163
|
+
settings.beforeEmbed.call(container, oembedData);
|
164
|
+
settings.onEmbed.call(container, oembedData);
|
165
|
+
settings.afterEmbed.call(container, oembedData);
|
166
|
+
}
|
167
|
+
|
168
|
+
function embedCode(container, externalUrl, embedProvider) {
|
169
|
+
if ($('#jqoembeddata').data(externalUrl)!=undefined && embedProvider.embedtag.tag!='iframe'){
|
170
|
+
var oembedData = {code: $('#jqoembeddata').data(externalUrl)};
|
171
|
+
success(oembedData, externalUrl, container);
|
172
|
+
}else if (embedProvider.yql) {
|
173
|
+
var from = embedProvider.yql.from || 'htmlstring';
|
174
|
+
var url = embedProvider.yql.url ? embedProvider.yql.url(externalUrl) : externalUrl;
|
175
|
+
var query = 'SELECT * FROM '
|
176
|
+
+ from
|
177
|
+
+ ' WHERE url="' + (url) + '"'
|
178
|
+
+ " and " + (/html/.test(from) ? 'xpath' : 'itemPath') + "='" + (embedProvider.yql.xpath || '/')+"'" ;
|
179
|
+
if(from=='html') query += " and compat='html5'";
|
180
|
+
var ajaxopts = $.extend({
|
181
|
+
url: "http://query.yahooapis.com/v1/public/yql",
|
182
|
+
dataType: 'jsonp',
|
183
|
+
data: {
|
184
|
+
q: query,
|
185
|
+
format: "json",
|
186
|
+
env: 'store://datatables.org/alltableswithkeys',
|
187
|
+
callback: "?"
|
188
|
+
},
|
189
|
+
success: function(data) {
|
190
|
+
var result;
|
191
|
+
if(embedProvider.yql.xpath && embedProvider.yql.xpath=='//meta|//title|//link'){
|
192
|
+
var meta={};
|
193
|
+
if (data.query.results == null) {
|
194
|
+
data.query.results = {"meta": []};
|
195
|
+
}
|
196
|
+
for(var i=0, l=data.query.results.meta.length; i<l; i++){
|
197
|
+
var name = data.query.results.meta[i].name||data.query.results.meta[i].property||null;
|
198
|
+
if(name==null)continue;
|
199
|
+
meta[name.toLowerCase()]=data.query.results.meta[i].content;
|
200
|
+
}
|
201
|
+
if (!meta.hasOwnProperty("title") || !meta.hasOwnProperty("og:title") ) {
|
202
|
+
if ( data.query.results.title != null ) {
|
203
|
+
meta.title = data.query.results.title;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
if (!meta.hasOwnProperty("og:image") && data.query.results.hasOwnProperty("link")) {
|
207
|
+
for ( var i=0, l=data.query.results.link.length; i<l; i++){
|
208
|
+
if ( data.query.results.link[i].hasOwnProperty("rel") ) {
|
209
|
+
if (data.query.results.link[i].rel == "apple-touch-icon") {
|
210
|
+
if ( data.query.results.link[i].href.charAt(0) == "/" ) {
|
211
|
+
meta["og:image"] = url.match(/^(([a-z]+:)?(\/\/)?[^\/]+\/).*$/)[1] + data.query.results.link[i].href;
|
212
|
+
} else {
|
213
|
+
meta["og:image"] = data.query.results.link[i].href;
|
214
|
+
}
|
215
|
+
}
|
216
|
+
}
|
217
|
+
}
|
218
|
+
}
|
219
|
+
result = embedProvider.yql.datareturn(meta);
|
220
|
+
}else{
|
221
|
+
result = embedProvider.yql.datareturn ? embedProvider.yql.datareturn(data.query.results) : data.query.results.result;
|
222
|
+
}
|
223
|
+
if(result===false)return;
|
224
|
+
var oembedData = $.extend({}, result);
|
225
|
+
oembedData.code = result;
|
226
|
+
success(oembedData, externalUrl, container);
|
227
|
+
},
|
228
|
+
error: settings.onError.call(container, externalUrl, embedProvider)
|
229
|
+
}, settings.ajaxOptions || {});
|
230
|
+
|
231
|
+
$.ajax(ajaxopts);
|
232
|
+
}else if (embedProvider.templateRegex) {
|
233
|
+
if(embedProvider.embedtag.tag!==''){
|
234
|
+
var flashvars = embedProvider.embedtag.flashvars || '';
|
235
|
+
var tag = embedProvider.embedtag.tag || 'embed';
|
236
|
+
var width = embedProvider.embedtag.width || 'auto';
|
237
|
+
var nocache = embedProvider.embedtag.nocache || 0;
|
238
|
+
var height = embedProvider.embedtag.height || 'auto';
|
239
|
+
var src =externalUrl.replace(embedProvider.templateRegex,embedProvider.apiendpoint);
|
240
|
+
if(!embedProvider.nocache) src += '&jqoemcache='+rand(5);
|
241
|
+
if (embedProvider.apikey) src = src.replace('_APIKEY_', settings.apikeys[embedProvider.name]);
|
242
|
+
|
243
|
+
|
244
|
+
var code = $('<'+tag+'/>')
|
245
|
+
.attr('src',src)
|
246
|
+
.attr('width',width)
|
247
|
+
.attr('height',height)
|
248
|
+
.attr('allowfullscreen',embedProvider.embedtag.allowfullscreen || 'true')
|
249
|
+
.attr('allowscriptaccess',embedProvider.embedtag.allowfullscreen || 'always')
|
250
|
+
.css('max-height', settings.maxHeight || 'auto' )
|
251
|
+
.css('max-width', settings.maxWidth || 'auto' );
|
252
|
+
if(tag=='embed')
|
253
|
+
code
|
254
|
+
.attr('type',embedProvider.embedtag.type || "application/x-shockwave-flash")
|
255
|
+
.attr('flashvars',externalUrl.replace(embedProvider.templateRegex,flashvars));
|
256
|
+
if(tag=='iframe')
|
257
|
+
code
|
258
|
+
.attr('scrolling',embedProvider.embedtag.scrolling || "no")
|
259
|
+
.attr('frameborder',embedProvider.embedtag.frameborder || "0");
|
260
|
+
|
261
|
+
|
262
|
+
var oembedData = {code: code};
|
263
|
+
success(oembedData, externalUrl,container);
|
264
|
+
}else if (embedProvider.apiendpoint) {
|
265
|
+
//Add APIkey if true
|
266
|
+
if (embedProvider.apikey) embedProvider.apiendpoint = embedProvider.apiendpoint.replace('_APIKEY_', settings.apikeys[embedProvider.name]);
|
267
|
+
ajaxopts = $.extend({
|
268
|
+
url: externalUrl.replace(embedProvider.templateRegex, embedProvider.apiendpoint),
|
269
|
+
dataType: 'jsonp',
|
270
|
+
success: function(data) {
|
271
|
+
var oembedData = $.extend({}, data);
|
272
|
+
oembedData.code = embedProvider.templateData(data);
|
273
|
+
success(oembedData, externalUrl, container);
|
274
|
+
},
|
275
|
+
error: settings.onError.call(container, externalUrl, embedProvider)
|
276
|
+
}, settings.ajaxOptions || {});
|
277
|
+
|
278
|
+
$.ajax( ajaxopts );
|
279
|
+
}else {
|
280
|
+
var oembedData = {code: externalUrl.replace(embedProvider.templateRegex,embedProvider.template)};
|
281
|
+
success(oembedData, externalUrl,container);
|
282
|
+
}
|
283
|
+
} else {
|
284
|
+
|
285
|
+
var requestUrl = getRequestUrl(embedProvider, externalUrl),
|
286
|
+
ajaxopts = $.extend({
|
287
|
+
url: requestUrl,
|
288
|
+
dataType: embedProvider.dataType || 'jsonp',
|
289
|
+
success: function(data) {
|
290
|
+
var oembedData = $.extend({}, data);
|
291
|
+
switch (oembedData.type) {
|
292
|
+
case "file": //Deviant Art has this
|
293
|
+
case "photo":
|
294
|
+
oembedData.code = $.fn.oembed.getPhotoCode(externalUrl, oembedData);
|
295
|
+
break;
|
296
|
+
case "video":
|
297
|
+
case "rich":
|
298
|
+
oembedData.code = $.fn.oembed.getRichCode(externalUrl, oembedData);
|
299
|
+
break;
|
300
|
+
default:
|
301
|
+
oembedData.code = $.fn.oembed.getGenericCode(externalUrl, oembedData);
|
302
|
+
break;
|
303
|
+
}
|
304
|
+
success(oembedData, externalUrl, container);
|
305
|
+
},
|
306
|
+
error: settings.onError.call(container, externalUrl, embedProvider)
|
307
|
+
}, settings.ajaxOptions || {});
|
308
|
+
|
309
|
+
$.ajax(ajaxopts);
|
310
|
+
}
|
311
|
+
};
|
312
|
+
|
313
|
+
function getNormalizedParams(params) {
|
314
|
+
if (params === null) return null;
|
315
|
+
var key, normalizedParams = {};
|
316
|
+
for (key in params) {
|
317
|
+
if (key !== null) normalizedParams[key.toLowerCase()] = params[key];
|
318
|
+
}
|
319
|
+
return normalizedParams;
|
320
|
+
}
|
321
|
+
|
322
|
+
/* Public functions */
|
323
|
+
$.fn.oembed.insertCode = function(container, embedMethod, oembedData) {
|
324
|
+
if (oembedData === null) return;
|
325
|
+
if(embedMethod=='auto' && container.attr("href") !== null) embedMethod='append';
|
326
|
+
else if(embedMethod=='auto') embedMethod='replace';
|
327
|
+
switch (embedMethod) {
|
328
|
+
case "replace":
|
329
|
+
container.replaceWith(oembedData.code);
|
330
|
+
break;
|
331
|
+
case "fill":
|
332
|
+
container.html(oembedData.code);
|
333
|
+
break;
|
334
|
+
case "append":
|
335
|
+
container.wrap('<div class="oembedall-container"></div>');
|
336
|
+
var oembedContainer = container.parent();
|
337
|
+
if (settings.includeHandle) {
|
338
|
+
$('<span class="oembedall-closehide">↓</span>').insertBefore(container).click(function() {
|
339
|
+
var encodedString = encodeURIComponent($(this).text());
|
340
|
+
$(this).html((encodedString == '%E2%86%91') ? '↓' : '↑');
|
341
|
+
$(this).parent().children().last().toggle();
|
342
|
+
});
|
343
|
+
}
|
344
|
+
oembedContainer.append('<br/>');
|
345
|
+
try {
|
346
|
+
oembedData.code.clone().appendTo(oembedContainer);
|
347
|
+
} catch(e) {
|
348
|
+
oembedContainer.append(oembedData.code);
|
349
|
+
}
|
350
|
+
/* Make videos semi-responsive
|
351
|
+
* If parent div width less than embeded iframe video then iframe gets shrunk to fit smaller width
|
352
|
+
* If parent div width greater thans embed iframe use the max widht
|
353
|
+
* - works on youtubes and vimeo
|
354
|
+
*/
|
355
|
+
if(settings.maxWidth){
|
356
|
+
var post_width = oembedContainer.parent().width();
|
357
|
+
if(post_width < settings.maxWidth)
|
358
|
+
{
|
359
|
+
var iframe_width_orig = $('iframe',oembedContainer).width();
|
360
|
+
var iframe_height_orig = $('iframe',oembedContainer).height();
|
361
|
+
var ratio = iframe_width_orig / post_width;
|
362
|
+
$('iframe',oembedContainer).width(iframe_width_orig / ratio);
|
363
|
+
$('iframe',oembedContainer).height(iframe_height_orig / ratio);
|
364
|
+
} else {
|
365
|
+
if(settings.maxWidth){
|
366
|
+
$('iframe',oembedContainer).width(settings.maxWidth);
|
367
|
+
}
|
368
|
+
if(settings.maxHeight){
|
369
|
+
$('iframe',oembedContainer).height(settings.maxHeight);
|
370
|
+
}
|
371
|
+
}
|
372
|
+
}
|
373
|
+
break;
|
374
|
+
}
|
375
|
+
};
|
376
|
+
|
377
|
+
$.fn.oembed.getPhotoCode = function(url, oembedData) {
|
378
|
+
var code, alt = oembedData.title ? oembedData.title : '';
|
379
|
+
alt += oembedData.author_name ? ' - ' + oembedData.author_name : '';
|
380
|
+
alt += oembedData.provider_name ? ' - ' + oembedData.provider_name : '';
|
381
|
+
code = '<div><a href="' + url + '" target=\'_blank\'><img src="' + oembedData.url + '" alt="' + alt + '"/></a></div>';
|
382
|
+
if (oembedData.html) code += "<div>" + oembedData.html + "</div>";
|
383
|
+
return code;
|
384
|
+
};
|
385
|
+
|
386
|
+
$.fn.oembed.getRichCode = function(url, oembedData) {
|
387
|
+
var code = oembedData.html;
|
388
|
+
return code;
|
389
|
+
};
|
390
|
+
|
391
|
+
$.fn.oembed.getGenericCode = function(url, oembedData) {
|
392
|
+
var title = (oembedData.title !== null) ? oembedData.title : url,
|
393
|
+
code = '<a href="' + url + '">' + title + '</a>';
|
394
|
+
if (oembedData.html) code += "<div>" + oembedData.html + "</div>";
|
395
|
+
return code;
|
396
|
+
};
|
397
|
+
|
398
|
+
$.fn.oembed.getOEmbedProvider = function(url) {
|
399
|
+
for (var i = 0; i < $.fn.oembed.providers.length; i++) {
|
400
|
+
for (var j = 0, l =$.fn.oembed.providers[i].urlschemes.length; j < l; j++) {
|
401
|
+
var regExp = new RegExp($.fn.oembed.providers[i].urlschemes[j], "i");
|
402
|
+
if (url.match(regExp) !== null) return $.fn.oembed.providers[i];
|
403
|
+
}
|
404
|
+
}
|
405
|
+
return null;
|
406
|
+
};
|
407
|
+
|
408
|
+
$.fn.oembed.OEmbedProvider = function(name, type, urlschemesarray, apiendpoint, extraSettings) {
|
409
|
+
this.name = name;
|
410
|
+
this.type = type; // "photo", "video", "link", "rich", null
|
411
|
+
this.urlschemes = urlschemesarray;
|
412
|
+
this.apiendpoint = apiendpoint;
|
413
|
+
this.maxWidth = 500;
|
414
|
+
this.maxHeight = 400;
|
415
|
+
extraSettings =extraSettings ||{};
|
416
|
+
|
417
|
+
if(extraSettings.useYQL){
|
418
|
+
|
419
|
+
if(extraSettings.useYQL=='xml'){
|
420
|
+
extraSettings.yql = {xpath:"//oembed/html", from:'xml'
|
421
|
+
, apiendpoint: this.apiendpoint
|
422
|
+
, url: function(externalurl){return this.apiendpoint+'?format=xml&url='+externalurl}
|
423
|
+
, datareturn:function(results){return results.html.replace(/.*\[CDATA\[(.*)\]\]>$/,'$1') || ''}
|
424
|
+
};
|
425
|
+
}else{
|
426
|
+
extraSettings.yql = {from:'json'
|
427
|
+
, apiendpoint: this.apiendpoint
|
428
|
+
, url: function(externalurl){return this.apiendpoint+'?format=json&url='+externalurl}
|
429
|
+
, datareturn:function(results){
|
430
|
+
if (results.json.type != 'video' && (results.json.url || results.json.thumbnail_url)) {
|
431
|
+
return '<img src="' + (results.json.url || results.json.thumbnail_url) + '" />';
|
432
|
+
}
|
433
|
+
return results.json.html || ''
|
434
|
+
}
|
435
|
+
};
|
436
|
+
}
|
437
|
+
this.apiendpoint = null;
|
438
|
+
}
|
439
|
+
|
440
|
+
|
441
|
+
for (var property in extraSettings) {
|
442
|
+
this[property] = extraSettings[property];
|
443
|
+
}
|
444
|
+
|
445
|
+
this.format = this.format || 'json';
|
446
|
+
this.callbackparameter = this.callbackparameter || "callback";
|
447
|
+
this.embedtag = this.embedtag || {tag:""};
|
448
|
+
|
449
|
+
|
450
|
+
};
|
451
|
+
|
452
|
+
/* Native & common providers */
|
453
|
+
$.fn.oembed.providers = [
|
454
|
+
|
455
|
+
//Video
|
456
|
+
new $.fn.oembed.OEmbedProvider("youtube", "video", ["youtube\\.com/watch.+v=[\\w-]+&?", "youtu\\.be/[\\w-]+"], 'http://www.youtube.com/oembed', {useYQL:'json'}),
|
457
|
+
new $.fn.oembed.OEmbedProvider("youtubeiframe", "video", ["youtube.com/embed"], "$1?wmode=transparent",
|
458
|
+
{templateRegex:/(.*)/,embedtag : {tag: 'iframe', width:'425',height: '349'}}),
|
459
|
+
new $.fn.oembed.OEmbedProvider("wistia", "video", ["wistia.com/m/.+", "wistia.com/embed/.+","wi.st/m/.+","wi.st/embed/.+"], 'http://fast.wistia.com/oembed', {useYQL:'json'}),
|
460
|
+
new $.fn.oembed.OEmbedProvider("xtranormal", "video", ["xtranormal\\.com/watch/.+"], "http://www.xtranormal.com/xtraplayr/$1/$2", {
|
461
|
+
templateRegex: /.*com\/watch\/([\w\-]+)\/([\w\-]+).*/,embedtag: {tag: 'iframe',width: '320',height: '269'}}),
|
462
|
+
new $.fn.oembed.OEmbedProvider("scivee", "video", ["scivee.tv/node/.+"], "http://www.scivee.tv/flash/embedCast.swf?", {
|
463
|
+
templateRegex: /.*tv\/node\/(.+)/,embedtag: {width: '480',height: '400',flashvars:"id=$1&type=3"}}),
|
464
|
+
new $.fn.oembed.OEmbedProvider("veoh", "video", ["veoh.com/watch/.+"], "http://www.veoh.com/swf/webplayer/WebPlayer.swf?version=AFrontend.5.7.0.1337&permalinkId=$1&player=videodetailsembedded&videoAutoPlay=0&id=anonymous", {
|
465
|
+
templateRegex: /.*watch\/([^\?]+).*/,embedtag: {width: '410',height: '341'}}),
|
466
|
+
new $.fn.oembed.OEmbedProvider("gametrailers", "video", ["gametrailers\\.com/video/.+"], "http://media.mtvnservices.com/mgid:moses:video:gametrailers.com:$2", {
|
467
|
+
templateRegex: /.*com\/video\/([\w\-]+)\/([\w\-]+).*/,embedtag: {width: '512',height: '288' }}),
|
468
|
+
new $.fn.oembed.OEmbedProvider("funnyordie", "video", ["funnyordie\\.com/videos/.+"], "http://player.ordienetworks.com/flash/fodplayer.swf?", {
|
469
|
+
templateRegex: /.*videos\/([^\/]+)\/([^\/]+)?/,embedtag: {width: 512,height: 328,flashvars: "key=$1"}}),
|
470
|
+
new $.fn.oembed.OEmbedProvider("colledgehumour", "video", ["collegehumor\\.com/video/.+"],"http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=$1&use_node_id=true&fullscreen=1",
|
471
|
+
{templateRegex:/.*video\/([^\/]+).*/ , embedtag : {width:600,height: 338}}),
|
472
|
+
new $.fn.oembed.OEmbedProvider("metacafe", "video", ["metacafe\\.com/watch/.+"],"http://www.metacafe.com/fplayer/$1/$2.swf",
|
473
|
+
{templateRegex:/.*watch\/(\d+)\/(\w+)\/.*/ , embedtag : {width:400,height: 345}}),
|
474
|
+
new $.fn.oembed.OEmbedProvider("bambuser", "video", ["bambuser\\.com\/channel\/.*\/broadcast\/.*"],"http://static.bambuser.com/r/player.swf?vid=$1",
|
475
|
+
{templateRegex:/.*bambuser\.com\/channel\/.*\/broadcast\/(\w+).*/ , embedtag : {width:512,height: 339 }}),
|
476
|
+
new $.fn.oembed.OEmbedProvider("twitvid", "video", ["twitvid\\.com/.+"],"http://www.twitvid.com/embed.php?guid=$1&autoplay=0",
|
477
|
+
{templateRegex:/.*twitvid\.com\/(\w+).*/ , embedtag : {tag:'iframe',width:480,height: 360 }}),
|
478
|
+
|
479
|
+
new $.fn.oembed.OEmbedProvider("aniboom", "video", ["aniboom\\.com/animation-video/.+"],"http://api.aniboom.com/e/$1",
|
480
|
+
{templateRegex:/.*animation-video\/(\d+).*/ , embedtag : {width:594,height: 334}}),
|
481
|
+
|
482
|
+
new $.fn.oembed.OEmbedProvider("vzaar", "video", ["vzaar\\.com/videos/.+","vzaar.tv/.+"],"http://view.vzaar.com/$1/player?",
|
483
|
+
{templateRegex:/.*\/(\d+).*/, embedtag : {tag:'iframe',width:576,height: 324 }}),
|
484
|
+
new $.fn.oembed.OEmbedProvider("snotr", "video", ["snotr\\.com/video/.+"],"http://www.snotr.com/embed/$1",
|
485
|
+
{templateRegex:/.*\/(\d+).*/, embedtag : {tag:'iframe',width:400,height: 330, nocache:1 }}),
|
486
|
+
|
487
|
+
new $.fn.oembed.OEmbedProvider("youku", "video", ["v.youku.com/v_show/id_.+"],"http://player.youku.com/player.php/sid/$1/v.swf",
|
488
|
+
{templateRegex:/.*id_(.+)\.html.*/, embedtag : {width:480,height:400, nocache:1 }}),
|
489
|
+
|
490
|
+
new $.fn.oembed.OEmbedProvider("embedr", "video", ["embedr\\.com/playlist/.+"],"http://embedr.com/swf/slider/$1/425/520/default/false/std?",
|
491
|
+
{templateRegex:/.*playlist\/([^\/]+).*/, embedtag : {width:425,height: 520}}),
|
492
|
+
new $.fn.oembed.OEmbedProvider("blip", "video", ["blip\\.tv/.+"], "http://blip.tv/oembed/"),
|
493
|
+
new $.fn.oembed.OEmbedProvider("minoto-video", "video", ["http://api.minoto-video.com/publishers/.+/videos/.+","http://dashboard.minoto-video.com/main/video/details/.+","http://embed.minoto-video.com/.+"], "http://api.minoto-video.com/services/oembed.json",{useYQL:'json'}),
|
494
|
+
new $.fn.oembed.OEmbedProvider("animoto", "video", ["animoto.com/play/.+"], "http://animoto.com/services/oembed"),
|
495
|
+
new $.fn.oembed.OEmbedProvider("hulu", "video", ["hulu\\.com/watch/.*"], "http://www.hulu.com/api/oembed.json"),
|
496
|
+
new $.fn.oembed.OEmbedProvider("ustream", "video", ["ustream\\.tv/recorded/.*"], "http://www.ustream.tv/oembed",{useYQL:'json'}),
|
497
|
+
new $.fn.oembed.OEmbedProvider("vodpod", "video", ["vodpod.com/watch/.*"], "http://vodpod.com/oembed.js",{useYQL:'json'}),
|
498
|
+
new $.fn.oembed.OEmbedProvider("vimeo", "video", ["http:\/\/www\.vimeo\.com\/groups\/.*\/videos\/.*", "http:\/\/www\.vimeo\.com\/.*", "http:\/\/vimeo\.com\/groups\/.*\/videos\/.*", "http:\/\/vimeo\.com\/.*"], "http://vimeo.com/api/oembed.json"),
|
499
|
+
new $.fn.oembed.OEmbedProvider("dailymotion", "video", ["dailymotion\\.com/.+"],'http://www.dailymotion.com/services/oembed'),
|
500
|
+
new $.fn.oembed.OEmbedProvider("5min", "video", ["www\\.5min\\.com/.+"], 'http://api.5min.com/oembed.xml',{useYQL:'xml'}),
|
501
|
+
new $.fn.oembed.OEmbedProvider("National Film Board of Canada", "video", ["nfb\\.ca/film/.+"],'http://www.nfb.ca/remote/services/oembed/',{useYQL:'json'}),
|
502
|
+
new $.fn.oembed.OEmbedProvider("qik", "video", ["qik\\.com/\\w+"], 'http://qik.com/api/oembed.json',{useYQL:'json'}),
|
503
|
+
new $.fn.oembed.OEmbedProvider("revision3", "video", ["revision3\\.com"], "http://revision3.com/api/oembed/"),
|
504
|
+
new $.fn.oembed.OEmbedProvider("dotsub", "video", ["dotsub\\.com/view/.+"], "http://dotsub.com/services/oembed",{useYQL:'json'}),
|
505
|
+
new $.fn.oembed.OEmbedProvider("clikthrough", "video", ["clikthrough\\.com/theater/video/\\d+"], "http://clikthrough.com/services/oembed"),
|
506
|
+
new $.fn.oembed.OEmbedProvider("Kinomap", "video", ["kinomap\\.com/.+"], "http://www.kinomap.com/oembed"),
|
507
|
+
new $.fn.oembed.OEmbedProvider("VHX", "video", ["vhx.tv/.+"], "http://vhx.tv/services/oembed.json"),
|
508
|
+
new $.fn.oembed.OEmbedProvider("bambuser", "video", ["bambuser.com/.+"], "http://api.bambuser.com/oembed/iframe.json"),
|
509
|
+
new $.fn.oembed.OEmbedProvider("justin.tv", "video", ["justin.tv/.+"], 'http://api.justin.tv/api/embed/from_url.json',{useYQL:'json'}),
|
510
|
+
|
511
|
+
|
512
|
+
//Audio
|
513
|
+
new $.fn.oembed.OEmbedProvider("official.fm", "rich", ["official.fm/.+"], 'http://official.fm/services/oembed',{useYQL:'json'}),
|
514
|
+
new $.fn.oembed.OEmbedProvider("chirbit", "rich", ["chirb.it/.+"], 'http://chirb.it/oembed.json',{useYQL:'json'}),
|
515
|
+
new $.fn.oembed.OEmbedProvider("Huffduffer", "rich", ["huffduffer.com/[-.\\w@]+/\\d+"], "http://huffduffer.com/oembed"),
|
516
|
+
new $.fn.oembed.OEmbedProvider("shoudio", "rich", ["shoudio.com/.+","shoud.io/.+"], "http://shoudio.com/api/oembed"),
|
517
|
+
new $.fn.oembed.OEmbedProvider("mixcloud", "rich", ["mixcloud.com/.+"],'http://www.mixcloud.com/oembed/',{useYQL:'json'}),
|
518
|
+
new $.fn.oembed.OEmbedProvider("rdio.com", "rich", ["rd.io/.+","rdio.com"], "http://www.rdio.com/api/oembed/"),
|
519
|
+
new $.fn.oembed.OEmbedProvider("Soundcloud", "rich", ["soundcloud.com/.+","snd.sc/.+"], "http://soundcloud.com/oembed",{format:'js'}),
|
520
|
+
new $.fn.oembed.OEmbedProvider("bandcamp", "rich", ["bandcamp\\.com/album/.+"], null,
|
521
|
+
{yql:{xpath:"//meta[contains(@content, \\'EmbeddedPlayer\\')]", from:'html'
|
522
|
+
, datareturn:function(results){
|
523
|
+
return results.meta ?'<iframe width="400" height="100" src="'+results.meta.content+'" allowtransparency="true" frameborder="0"></iframe>':false;
|
524
|
+
}
|
525
|
+
}
|
526
|
+
}),
|
527
|
+
|
528
|
+
//Photo
|
529
|
+
new $.fn.oembed.OEmbedProvider("deviantart", "photo", ["deviantart.com/.+","fav.me/.+","deviantart.com/.+"], "http://backend.deviantart.com/oembed",{format:'jsonp'}),
|
530
|
+
new $.fn.oembed.OEmbedProvider("skitch", "photo", ["skitch.com/.+"], null,
|
531
|
+
{yql:{xpath:"json", from:'json'
|
532
|
+
, url: function(externalurl){return 'http://skitch.com/oembed/?format=json&url='+externalurl}
|
533
|
+
, datareturn:function(data){return $.fn.oembed.getPhotoCode( data.json.url, data.json);}
|
534
|
+
}
|
535
|
+
}),
|
536
|
+
new $.fn.oembed.OEmbedProvider("mobypicture", "photo", ["mobypicture.com/user/.+/view/.+","moby.to/.+"], "http://api.mobypicture.com/oEmbed"),
|
537
|
+
new $.fn.oembed.OEmbedProvider("flickr", "photo", ["flickr\\.com/photos/.+"], "http://flickr.com/services/oembed",{callbackparameter:'jsoncallback'}),
|
538
|
+
new $.fn.oembed.OEmbedProvider("photobucket", "photo", ["photobucket\\.com/(albums|groups)/.+"], "http://photobucket.com/oembed/"),
|
539
|
+
new $.fn.oembed.OEmbedProvider("instagram", "photo", ["instagr\\.?am(\\.com)?/.+"], "http://api.instagram.com/oembed"),
|
540
|
+
//new $.fn.oembed.OEmbedProvider("yfrog", "photo", ["yfrog\\.(com|ru|com\\.tr|it|fr|co\\.il|co\\.uk|com\\.pl|pl|eu|us)/.+"], "http://www.yfrog.com/api/oembed",{useYQL:"json"}),
|
541
|
+
new $.fn.oembed.OEmbedProvider("SmugMug", "photo", ["smugmug.com/[-.\\w@]+/.+"], "http://api.smugmug.com/services/oembed/"),
|
542
|
+
|
543
|
+
new $.fn.oembed.OEmbedProvider("dribbble", "photo", ["dribbble.com/shots/.+"], "http://api.dribbble.com/shots/$1?callback=?",
|
544
|
+
{ templateRegex:/.*shots\/([\d]+).*/,
|
545
|
+
templateData : function(data){if(!data.image_teaser_url)return false;
|
546
|
+
return '<img src="'+data.image_teaser_url+'"/>';
|
547
|
+
}
|
548
|
+
}),
|
549
|
+
new $.fn.oembed.OEmbedProvider("chart.ly", "photo", ["chart\\.ly/[a-z0-9]{6,8}"],"http://chart.ly/uploads/large_$1.png",
|
550
|
+
{templateRegex:/.*ly\/([^\/]+).*/ , embedtag : {tag:'img'},nocache:1}),
|
551
|
+
new $.fn.oembed.OEmbedProvider("circuitlab", "photo", ["circuitlab.com/circuit/.+"],"https://www.circuitlab.com/circuit/$1/screenshot/540x405/",
|
552
|
+
{templateRegex:/.*circuit\/([^\/]+).*/ , embedtag : {tag:'img'},nocache:1}),
|
553
|
+
new $.fn.oembed.OEmbedProvider("23hq", "photo", ["23hq.com/[-.\\w@]+/photo/.+"],"http://www.23hq.com/23/oembed",{useYQL:"json"}),
|
554
|
+
new $.fn.oembed.OEmbedProvider("img.ly", "photo", ["img\\.ly/.+"],"http://img.ly/show/thumb/$1",
|
555
|
+
{templateRegex:/.*ly\/([^\/]+).*/ , embedtag : {tag:'img'},nocache:1
|
556
|
+
}),
|
557
|
+
new $.fn.oembed.OEmbedProvider("twitgoo.com", "photo", ["twitgoo\\.com/.+"],"http://twitgoo.com/show/thumb/$1",
|
558
|
+
{templateRegex:/.*com\/([^\/]+).*/ , embedtag : {tag:'img'},nocache:1}),
|
559
|
+
new $.fn.oembed.OEmbedProvider("imgur.com", "photo", ["imgur\\.com/gallery/.+"],"http://imgur.com/$1l.jpg",
|
560
|
+
{templateRegex:/.*gallery\/([^\/]+).*/ , embedtag : {tag:'img'},nocache:1}),
|
561
|
+
new $.fn.oembed.OEmbedProvider("visual.ly", "rich", ["visual\\.ly/.+"], null,
|
562
|
+
{yql:{xpath:"//a[@id=\\'gc_article_graphic_image\\']/img", from:'htmlstring'}
|
563
|
+
}),
|
564
|
+
new $.fn.oembed.OEmbedProvider("gravtar", "photo", ["mailto:.+"],null,
|
565
|
+
{templateRegex:/mailto:([^\/]+).*/
|
566
|
+
, template : function(wm,email){
|
567
|
+
return '<img src="http://gravatar.com/avatar/'+email.md5()+'.jpg" alt="on Gravtar" class="jqoaImg">';
|
568
|
+
}
|
569
|
+
}),
|
570
|
+
|
571
|
+
//Rich
|
572
|
+
new $.fn.oembed.OEmbedProvider("twitter", "rich", ["twitter.com/.+"], "https://api.twitter.com/1/statuses/oembed.json"),
|
573
|
+
//new $.fn.oembed.OEmbedProvider("gmep", "rich", ["gmep.imeducate.com/.*"], "http://gmep.imeducate.com/oembed"),
|
574
|
+
new $.fn.oembed.OEmbedProvider("urtak", "rich", ["urtak.com/(u|clr)/.+"], "http://oembed.urtak.com/1/oembed"),
|
575
|
+
new $.fn.oembed.OEmbedProvider("cacoo", "rich", ["cacoo.com/.+"], "http://cacoo.com/oembed.json"),
|
576
|
+
new $.fn.oembed.OEmbedProvider("dailymile", "rich", ["dailymile.com/people/.*/entries/.*"], "http://api.dailymile.com/oembed"),
|
577
|
+
new $.fn.oembed.OEmbedProvider("dipity", "rich", ["dipity.com/timeline/.+"],'http://www.dipity.com/oembed/timeline/',{useYQL:'json'}),
|
578
|
+
new $.fn.oembed.OEmbedProvider("speakerdeck", "rich", ["speakerdeck.com/.+"],'http://speakerdeck.com/oembed.json',{useYQL:'json'}),
|
579
|
+
new $.fn.oembed.OEmbedProvider("popplet", "rich", ["popplet.com/app/.*"],"http://popplet.com/app/Popplet_Alpha.swf?page_id=$1&em=1",
|
580
|
+
{templateRegex:/.*#\/([^\/]+).*/,embedtag : {width:460,height: 460} }),
|
581
|
+
|
582
|
+
new $.fn.oembed.OEmbedProvider("pearltrees", "rich", ["pearltrees.com/.*"],"http://cdn.pearltrees.com/s/embed/getApp?",
|
583
|
+
{templateRegex:/.*N-f=1_(\d+).*N-p=(\d+).*/, embedtag : {width:460,height: 460,
|
584
|
+
flashvars : "lang=en_US&embedId=pt-embed-$1-693&treeId=$1&pearlId=$2&treeTitle=Diagrams%2FVisualization&site=www.pearltrees.com%2FF"}
|
585
|
+
}),
|
586
|
+
|
587
|
+
new $.fn.oembed.OEmbedProvider("prezi", "rich", ["prezi.com/.*"],"http://prezi.com/bin/preziloader.swf?",
|
588
|
+
{templateRegex:/.*com\/([^\/]+)\/.*/,embedtag : {width:550,height: 400,
|
589
|
+
flashvars : "prezi_id=$1&lock_to_path=0&color=ffffff&autoplay=no&autohide_ctrls=0"
|
590
|
+
}
|
591
|
+
}),
|
592
|
+
|
593
|
+
new $.fn.oembed.OEmbedProvider("tourwrist", "rich", ["tourwrist.com/tours/.+"], null,
|
594
|
+
{ templateRegex:/.*tours.([\d]+).*/,
|
595
|
+
template : function(wm,tourid){
|
596
|
+
setTimeout(function(){if(loadEmbeds)loadEmbeds();},2000);
|
597
|
+
return "<div id='"+tourid+"' class='tourwrist-tour-embed direct'></div> <script type='text/javascript' src='http://tourwrist.com/tour_embed.js'></script>";
|
598
|
+
}
|
599
|
+
}),
|
600
|
+
|
601
|
+
new $.fn.oembed.OEmbedProvider("meetup", "rich", ["meetup\\.(com|ps)/.+"], "http://api.meetup.com/oembed"),
|
602
|
+
new $.fn.oembed.OEmbedProvider("ebay", "rich", ["ebay\\.*"],"http://togo.ebay.com/togo/togo.swf?2008013100",
|
603
|
+
{templateRegex:/.*\/([^\/]+)\/(\d{10,13}).*/, embedtag : {width:355,height: 300,
|
604
|
+
flashvars : "base=http://togo.ebay.com/togo/&lang=en-us&mode=normal&itemid=$2&query=$1"
|
605
|
+
}
|
606
|
+
}),
|
607
|
+
new $.fn.oembed.OEmbedProvider("wikipedia", "rich", ["wikipedia.org/wiki/.+"], "http://$1.wikipedia.org/w/api.php?action=parse&page=$2&format=json§ion=0&callback=?",{
|
608
|
+
templateRegex:/.*\/\/([\w]+).*\/wiki\/([^\/]+).*/,
|
609
|
+
templateData : function(data){if(!data.parse)return false;
|
610
|
+
var text = data.parse['text']['*'].replace('href="/wiki','href="http://en.wikipedia.org/wiki');
|
611
|
+
return '<div id="content"><h3><a class="nav-link" href="http://en.wikipedia.org/wiki/'+data.parse['displaytitle']+'">'+data.parse['displaytitle']+'</a></h3>'+text+'</div>';
|
612
|
+
}
|
613
|
+
}),
|
614
|
+
new $.fn.oembed.OEmbedProvider("imdb", "rich", ["imdb.com/title/.+"], "http://www.imdbapi.com/?i=$1&callback=?",
|
615
|
+
{templateRegex:/.*\/title\/([^\/]+).*/,
|
616
|
+
templateData : function(data){if(!data.Title)return false;
|
617
|
+
return '<div id="content"><h3><a class="nav-link" href="http://imdb.com/title/'+data.ID+'/">'+data.Title+'</a> ('+data.Year+')</h3><p>Starring: '+data.Actors+'</p><div id="photo-wrap" style="margin: auto;width:600px;height:450px;"><img class="photo" id="photo-display" src="'+data.Poster+'" alt="'+data.Title+'"></div> <div id="view-photo-caption">'+data.Plot+'</div></div>';
|
618
|
+
}
|
619
|
+
}),
|
620
|
+
new $.fn.oembed.OEmbedProvider("livejournal", "rich", ["livejournal.com/"], "http://ljpic.seacrow.com/json/$2$4?jsonp=?"
|
621
|
+
,{templateRegex:/(http:\/\/(((?!users).)+)\.livejournal\.com|.*users\.livejournal\.com\/([^\/]+)).*/,
|
622
|
+
templateData : function(data){if(!data.username)return false;
|
623
|
+
return '<div><img src="'+data.image+'" align="left" style="margin-right: 1em;" /><span class="oembedall-ljuser"><a href="http://'+data.username+'.livejournal.com/profile"><img src="http://www.livejournal.com/img/userinfo.gif" alt="[info]" width="17" height="17" /></a><a href="http://'+data.username+'.livejournal.com/">'+data.username+'</a></span><br />'+data.name+'</div>';
|
624
|
+
}
|
625
|
+
}),
|
626
|
+
new $.fn.oembed.OEmbedProvider("circuitbee", "rich", ["circuitbee\\.com/circuit/view/.+"],"http://c.circuitbee.com/build/r/schematic-embed.html?id=$1",
|
627
|
+
{templateRegex:/.*circuit\/view\/(\d+).*/ ,embedtag : {tag: 'iframe', width:'500',height: '350'}
|
628
|
+
}),
|
629
|
+
|
630
|
+
new $.fn.oembed.OEmbedProvider("googlecalendar", "rich", ["www.google.com/calendar/embed?.+"],"$1",
|
631
|
+
{templateRegex:/(.*)/ ,embedtag : {tag: 'iframe', width:'800',height: '600' }
|
632
|
+
}),
|
633
|
+
new $.fn.oembed.OEmbedProvider("jsfiddle", "rich", ["jsfiddle.net/[^/]+/?"],"http://jsfiddle.net/$1/embedded/result,js,resources,html,css/?",
|
634
|
+
{templateRegex:/.*net\/([^\/]+).*/ ,embedtag : {tag: 'iframe', width:'100%',height: '300' }
|
635
|
+
}),
|
636
|
+
new $.fn.oembed.OEmbedProvider("jsbin", "rich", ["jsbin.com/.+"],"http://jsbin.com/$1/?",
|
637
|
+
{templateRegex:/.*com\/([^\/]+).*/ ,embedtag : {tag: 'iframe', width:'100%',height: '300' }
|
638
|
+
}),
|
639
|
+
|
640
|
+
new $.fn.oembed.OEmbedProvider("jotform", "rich", ["form.jotform.co/form/.+"],"$1?",
|
641
|
+
{templateRegex:/(.*)/ ,embedtag : {tag: 'iframe', width:'100%',height: '507' }
|
642
|
+
}),
|
643
|
+
new $.fn.oembed.OEmbedProvider("reelapp", "rich", ["reelapp\\.com/.+"],"http://www.reelapp.com/$1/embed",
|
644
|
+
{templateRegex:/.*com\/(\S{6}).*/ ,embedtag : {tag: 'iframe', width:'400',height: '338'}
|
645
|
+
}),
|
646
|
+
new $.fn.oembed.OEmbedProvider("linkedin", "rich", ["linkedin.com/pub/.+"],"https://www.linkedin.com/cws/member/public_profile?public_profile_url=$1&format=inline&isFramed=true",
|
647
|
+
{templateRegex:/(.*)/ ,embedtag : {tag: 'iframe', width:'368px',height: 'auto'}
|
648
|
+
}),
|
649
|
+
|
650
|
+
new $.fn.oembed.OEmbedProvider("timetoast", "rich", ["timetoast.com/timelines/[0-9]+"],"http://www.timetoast.com/flash/TimelineViewer.swf?passedTimelines=$1",
|
651
|
+
{templateRegex:/.*timelines\/([0-9]*)/ ,embedtag : { width:550,height: 400,nocache:1}
|
652
|
+
}),
|
653
|
+
new $.fn.oembed.OEmbedProvider("pastebin", "rich", ["pastebin\\.com/[\\S]{8}"],"http://pastebin.com/embed_iframe.php?i=$1",
|
654
|
+
{templateRegex:/.*\/(\S{8}).*/ ,embedtag : {tag: 'iframe', width:'100%',height: 'auto'}
|
655
|
+
}),
|
656
|
+
new $.fn.oembed.OEmbedProvider("pastie", "rich", ["pastie\\.org/pastes/.+"],null,{yql:{xpath:'//pre[@class="textmate-source"]'}}),
|
657
|
+
new $.fn.oembed.OEmbedProvider("github", "rich", ["gist.github.com/.+"], "https://github.com/api/oembed"),
|
658
|
+
new $.fn.oembed.OEmbedProvider("github", "rich", ["github.com/[-.\\w@]+/[-.\\w@]+"], "https://api.github.com/repos/$1/$2?callback=?"
|
659
|
+
,{templateRegex:/.*\/([^\/]+)\/([^\/]+).*/,
|
660
|
+
templateData : function(data){ if(!data.data.html_url)return false;
|
661
|
+
return '<div class="oembedall-githubrepos"><ul class="oembedall-repo-stats"><li>'+data.data.language+'</li><li class="oembedall-watchers"><a title="Watchers" href="'+data.data.html_url+'/watchers">◉ '+data.data.watchers+'</a></li>'
|
662
|
+
+'<li class="oembedall-forks"><a title="Forks" href="'+data.data.html_url+'/network">ɥ '+data.data.forks+'</a></li></ul><h3><a href="'+data.data.html_url+'">'+data.data.name+'</a></h3><div class="oembedall-body"><p class="oembedall-description">'+data.data.description+'</p>'
|
663
|
+
+'<p class="oembedall-updated-at">Last updated: '+data.data.pushed_at+'</p></div></div>';
|
664
|
+
}
|
665
|
+
}),
|
666
|
+
|
667
|
+
new $.fn.oembed.OEmbedProvider("facebook", "rich", ["facebook.com/(people/[^\\/]+/\\d+|[^\\/]+$)"], "https://graph.facebook.com/$2$3/?callback=?"
|
668
|
+
,{templateRegex:/.*facebook.com\/(people\/[^\/]+\/(\d+).*|([^\/]+$))/,
|
669
|
+
templateData : function(data){ if(!data.id)return false;
|
670
|
+
var out = '<div class="oembedall-facebook1"><div class="oembedall-facebook2"><a href="http://www.facebook.com/">facebook</a> <a href="'+data.link+'">'+data.name+'</a></div><div class="oembedall-facebookBody"><div>';
|
671
|
+
if(data.picture) out += '<img src="'+data.picture+'" align="left"></div><div>';
|
672
|
+
if(data.category) out += 'Category <strong>'+data.category+'</strong><br/>';
|
673
|
+
if(data.website) out += 'Website <strong>'+data.website+'</strong><br/>';
|
674
|
+
if(data.gender) out += 'Gender <strong>'+data.gender+'</strong><br/>';
|
675
|
+
out += '</div></div></div>';
|
676
|
+
return out;
|
677
|
+
}
|
678
|
+
}),
|
679
|
+
new $.fn.oembed.OEmbedProvider("stackoverflow", "rich", ["stackoverflow.com/questions/[\\d]+"], "http://api.stackoverflow.com/1.1/questions/$1?body=true&jsonp=?"
|
680
|
+
,{templateRegex:/.*questions\/([\d]+).*/,
|
681
|
+
templateData : function(data){
|
682
|
+
if(!data.questions)return false;
|
683
|
+
var q = data.questions[0];
|
684
|
+
var body = $(q.body).text();
|
685
|
+
var out = '<div class="oembedall-stoqembed"><div class="oembedall-statscontainer"><div class="oembedall-statsarrow"></div><div class="oembedall-stats"><div class="oembedall-vote"><div class="oembedall-votes">'
|
686
|
+
+'<span class="oembedall-vote-count-post"><strong>'+ (q.up_vote_count - q.down_vote_count)+ '</strong></span><div class="oembedall-viewcount">vote(s)</div></div>'
|
687
|
+
+'</div><div class="oembedall-status"><strong>'+q.answer_count+'</strong>answer</div></div><div class="oembedall-views">'+q.view_count+' view(s)</div></div>'
|
688
|
+
+'<div class="oembedall-summary"><h3><a class="oembedall-question-hyperlink" href="http://stackoverflow.com/questions/'+q.question_id+'/">'+q.title+'</a></h3>'
|
689
|
+
+'<div class="oembedall-excerpt">'+ body.substring(0,100)+'...</div><div class="oembedall-tags">';
|
690
|
+
for(i in q.tags)
|
691
|
+
out += '<a title="" class="oembedall-post-tag" href="http://stackoverflow.com/questions/tagged/'+q.tags[i]+'">'+q.tags[i]+'</a>';
|
692
|
+
out += '</div><div class="oembedall-fr"><div class="oembedall-user-info"><div class="oembedall-user-gravatar32"><a href="http://stackoverflow.com/users/'+q.owner.user_id+'/'+q.owner.display_name+'">'
|
693
|
+
+'<img width="32" height="32" alt="" src="http://www.gravatar.com/avatar/'+q.owner.email_hash+'?s=32&d=identicon&r=PG"></a></div><div class="oembedall-user-details">'
|
694
|
+
+'<a href="http://stackoverflow.com/users/'+q.owner.user_id+'/'+q.owner.display_name+'">'+q.owner.display_name+'</a><br><span title="reputation score" class="oembedall-reputation-score">'
|
695
|
+
+q.owner.reputation+'</span></div></div></div></div></div>';
|
696
|
+
return out;
|
697
|
+
}
|
698
|
+
}),
|
699
|
+
new $.fn.oembed.OEmbedProvider("wordpress", "rich", ["wordpress\\.com/.+","blogs\\.cnn\\.com/.+","techcrunch\\.com/.+","wp\\.me/.+"], "http://public-api.wordpress.com/oembed/1.0/?for=jquery-oembed-all"),
|
700
|
+
new $.fn.oembed.OEmbedProvider("screenr", "rich", ["screenr\.com"], "http://www.screenr.com/embed/$1",
|
701
|
+
{templateRegex:/.*\/([^\/]+).*/
|
702
|
+
,embedtag : {tag: 'iframe', width:'650',height: 396}
|
703
|
+
}) ,
|
704
|
+
new $.fn.oembed.OEmbedProvider("gigpans", "rich", ["gigapan\\.org/[-.\\w@]+/\\d+"],"http://gigapan.org/gigapans/$1/options/nosnapshots/iframe/flash.html",
|
705
|
+
{templateRegex:/.*\/(\d+)\/?.*/,
|
706
|
+
embedtag : {tag: 'iframe', width:'100%',height: 400 }
|
707
|
+
}),
|
708
|
+
new $.fn.oembed.OEmbedProvider("scribd", "rich", ["scribd\\.com/.+"],"http://www.scribd.com/embeds/$1/content?start_page=1&view_mode=list",
|
709
|
+
{templateRegex:/.*doc\/([^\/]+).*/ ,
|
710
|
+
embedtag : {tag: 'iframe', width:'100%',height: 600}
|
711
|
+
}),
|
712
|
+
new $.fn.oembed.OEmbedProvider("kickstarter", "rich", ["kickstarter\\.com/projects/.+"], "$1/widget/card.html",
|
713
|
+
{templateRegex:/([^\?]+).*/ ,
|
714
|
+
embedtag : {tag: 'iframe', width:'220',height: 380}
|
715
|
+
}),
|
716
|
+
|
717
|
+
new $.fn.oembed.OEmbedProvider("amazon", "rich", ["amzn.com/B+","amazon.com.*/(B\\S+)($|\\/.*)"], "http://rcm.amazon.com/e/cm?t=_APIKEY_&o=1&p=8&l=as1&asins=$1&ref=qf_br_asin_til&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr"
|
718
|
+
,{apikey: true,templateRegex:/.*\/(B[0-9A-Z]+)($|\/.*)/,
|
719
|
+
embedtag : {tag: 'iframe', width:'120px',height: '240px'}
|
720
|
+
}),
|
721
|
+
|
722
|
+
new $.fn.oembed.OEmbedProvider("slideshare", "rich", ["slideshare\.net"], "http://www.slideshare.net/api/oembed/2",{format:'jsonp'}),
|
723
|
+
new $.fn.oembed.OEmbedProvider("roomsharejp", "rich", ["roomshare\\.jp/(en/)?post/.*"], "http://roomshare.jp/oembed.json"),
|
724
|
+
|
725
|
+
new $.fn.oembed.OEmbedProvider("lanyard", "rich", ["lanyrd.com/\\d+/.+"], null,
|
726
|
+
{yql:{xpath:'(//div[@class="primary"])[1]', from: 'htmlstring'
|
727
|
+
, datareturn:function(results){
|
728
|
+
if(!results.result) return false;
|
729
|
+
return '<div class="oembedall-lanyard">'+results.result+'</div>';
|
730
|
+
}
|
731
|
+
}
|
732
|
+
}),
|
733
|
+
new $.fn.oembed.OEmbedProvider("asciiartfarts", "rich", ["asciiartfarts.com/\\d+.html"], null,
|
734
|
+
{yql:{xpath:'//pre/font', from: 'htmlstring'
|
735
|
+
, datareturn:function(results){
|
736
|
+
if(!results.result) return false;
|
737
|
+
return '<pre style="background-color:000;">'+results.result+'</div>';
|
738
|
+
}
|
739
|
+
}
|
740
|
+
}),
|
741
|
+
|
742
|
+
|
743
|
+
|
744
|
+
//Use Open Graph Where applicable
|
745
|
+
new $.fn.oembed.OEmbedProvider("opengraph", "rich", [".*"], null,
|
746
|
+
{yql:{xpath:"//meta|//title|//link", from:'html'
|
747
|
+
, datareturn:function(results){
|
748
|
+
if(!results['og:title'] && results['title'] &&results['description'])results['og:title']=results['title'];
|
749
|
+
if(!results['og:title'] && !results['title'])return false;
|
750
|
+
var code = $('<p/>');
|
751
|
+
if(results['og:video']) {
|
752
|
+
var embed = $('<embed src="'+results['og:video']+'"/>');
|
753
|
+
embed
|
754
|
+
.attr('type',results['og:video:type'] || "application/x-shockwave-flash")
|
755
|
+
.css('max-height', settings.maxHeight || 'auto' )
|
756
|
+
.css('max-width', settings.maxWidth || 'auto' );
|
757
|
+
if(results['og:video:width']) embed.attr('width',results['og:video:width']);
|
758
|
+
if(results['og:video:height']) embed.attr('height',results['og:video:height']);
|
759
|
+
code.append(embed);
|
760
|
+
}else if(results['og:image']) {
|
761
|
+
var img = $('<img src="'+results['og:image']+'">');
|
762
|
+
img.css('max-height', settings.maxHeight || 'auto' ).css('max-width', settings.maxWidth || 'auto' );
|
763
|
+
if(results['og:image:width']) img.attr('width',results['og:image:width']);
|
764
|
+
if(results['og:image:height']) img.attr('height',results['og:image:height']);
|
765
|
+
code.append(img);
|
766
|
+
}
|
767
|
+
if(results['og:title']) code.append('<b>'+results['og:title']+'</b><br/>');
|
768
|
+
if(results['og:description'])
|
769
|
+
code.append(results['og:description']+'<br/>');
|
770
|
+
else if(results['description'])
|
771
|
+
code.append(results['description']+'<br/>');
|
772
|
+
return code;
|
773
|
+
}
|
774
|
+
}
|
775
|
+
})
|
776
|
+
|
777
|
+
];
|
778
|
+
})(jQuery);
|
779
|
+
|
780
|
+
//This is needed for gravatar :(
|
781
|
+
String.prototype.md5=function(){var a=function(a,b){var c=(a&65535)+(b&65535);var d=(a>>16)+(b>>16)+(c>>16);return d<<16|c&65535};var b=function(a,b){return a<<b|a>>>32-b};var c=function(c,d,e,f,g,h){return a(b(a(a(d,c),a(f,h)),g),e)};var d=function(a,b,d,e,f,g,h){return c(b&d|~b&e,a,b,f,g,h)};var e=function(a,b,d,e,f,g,h){return c(b&e|d&~e,a,b,f,g,h)};var f=function(a,b,d,e,f,g,h){return c(b^d^e,a,b,f,g,h)};var g=function(a,b,d,e,f,g,h){return c(d^(b|~e),a,b,f,g,h)};var h=function(b){var c,h,i,j,k,l=b.length;var m=1732584193;var n=-271733879;var o=-1732584194;var p=271733878;for(k=0;k<l;k+=16){c=m;h=n;i=o;j=p;m=d(m,n,o,p,b[k+0],7,-680876936);p=d(p,m,n,o,b[k+1],12,-389564586);o=d(o,p,m,n,b[k+2],17,606105819);n=d(n,o,p,m,b[k+3],22,-1044525330);m=d(m,n,o,p,b[k+4],7,-176418897);p=d(p,m,n,o,b[k+5],12,1200080426);o=d(o,p,m,n,b[k+6],17,-1473231341);n=d(n,o,p,m,b[k+7],22,-45705983);m=d(m,n,o,p,b[k+8],7,1770035416);p=d(p,m,n,o,b[k+9],12,-1958414417);o=d(o,p,m,n,b[k+10],17,-42063);n=d(n,o,p,m,b[k+11],22,-1990404162);m=d(m,n,o,p,b[k+12],7,1804603682);p=d(p,m,n,o,b[k+13],12,-40341101);o=d(o,p,m,n,b[k+14],17,-1502002290);n=d(n,o,p,m,b[k+15],22,1236535329);m=e(m,n,o,p,b[k+1],5,-165796510);p=e(p,m,n,o,b[k+6],9,-1069501632);o=e(o,p,m,n,b[k+11],14,643717713);n=e(n,o,p,m,b[k+0],20,-373897302);m=e(m,n,o,p,b[k+5],5,-701558691);p=e(p,m,n,o,b[k+10],9,38016083);o=e(o,p,m,n,b[k+15],14,-660478335);n=e(n,o,p,m,b[k+4],20,-405537848);m=e(m,n,o,p,b[k+9],5,568446438);p=e(p,m,n,o,b[k+14],9,-1019803690);o=e(o,p,m,n,b[k+3],14,-187363961);n=e(n,o,p,m,b[k+8],20,1163531501);m=e(m,n,o,p,b[k+13],5,-1444681467);p=e(p,m,n,o,b[k+2],9,-51403784);o=e(o,p,m,n,b[k+7],14,1735328473);n=e(n,o,p,m,b[k+12],20,-1926607734);m=f(m,n,o,p,b[k+5],4,-378558);p=f(p,m,n,o,b[k+8],11,-2022574463);o=f(o,p,m,n,b[k+11],16,1839030562);n=f(n,o,p,m,b[k+14],23,-35309556);m=f(m,n,o,p,b[k+1],4,-1530992060);p=f(p,m,n,o,b[k+4],11,1272893353);o=f(o,p,m,n,b[k+7],16,-155497632);n=f(n,o,p,m,b[k+10],23,-1094730640);m=f(m,n,o,p,b[k+13],4,681279174);p=f(p,m,n,o,b[k+0],11,-358537222);o=f(o,p,m,n,b[k+3],16,-722521979);n=f(n,o,p,m,b[k+6],23,76029189);m=f(m,n,o,p,b[k+9],4,-640364487);p=f(p,m,n,o,b[k+12],11,-421815835);o=f(o,p,m,n,b[k+15],16,530742520);n=f(n,o,p,m,b[k+2],23,-995338651);m=g(m,n,o,p,b[k+0],6,-198630844);p=g(p,m,n,o,b[k+7],10,1126891415);o=g(o,p,m,n,b[k+14],15,-1416354905);n=g(n,o,p,m,b[k+5],21,-57434055);m=g(m,n,o,p,b[k+12],6,1700485571);p=g(p,m,n,o,b[k+3],10,-1894986606);o=g(o,p,m,n,b[k+10],15,-1051523);n=g(n,o,p,m,b[k+1],21,-2054922799);m=g(m,n,o,p,b[k+8],6,1873313359);p=g(p,m,n,o,b[k+15],10,-30611744);o=g(o,p,m,n,b[k+6],15,-1560198380);n=g(n,o,p,m,b[k+13],21,1309151649);m=g(m,n,o,p,b[k+4],6,-145523070);p=g(p,m,n,o,b[k+11],10,-1120210379);o=g(o,p,m,n,b[k+2],15,718787259);n=g(n,o,p,m,b[k+9],21,-343485551);m=a(m,c);n=a(n,h);o=a(o,i);p=a(p,j)}return[m,n,o,p]};var i=function(a){var b="0123456789abcdef",c="",d,e=a.length*4;for(d=0;d<e;d++){c+=b.charAt(a[d>>2]>>d%4*8+4&15)+b.charAt(a[d>>2]>>d%4*8&15)}return c};var j=function(a){var b=(a.length+8>>6)+1;var c=[],d,e=b*16,f,g=a.length;for(d=0;d<e;d++){c.push(0)}for(f=0;f<g;f++){c[f>>2]|=(a.charCodeAt(f)&255)<<f%4*8}c[f>>2]|=128<<f%4*8;c[b*16-2]=g*8;return c};return i(h(j(this)))}
|