glebtv-ckeditor 4.2.1.5 → 4.3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (437) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +37 -1
  3. data/README.md +286 -0
  4. data/Rakefile +76 -63
  5. data/app/assets/javascripts/ckeditor/application.js +1 -0
  6. data/app/assets/javascripts/ckeditor/config.js.erb +59 -20
  7. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/{application.js → application.js.erb} +11 -2
  8. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +300 -0
  9. data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/{uploader.css → uploader.css.erb} +6 -2
  10. data/app/assets/javascripts/ckeditor/init.js.erb +1 -6
  11. data/app/assets/javascripts/ckeditor/override.js.erb +22 -0
  12. data/app/assets/stylesheets/ckcontent.css +103 -0
  13. data/app/controllers/ckeditor/application_controller.rb +5 -4
  14. data/app/controllers/ckeditor/attachment_files_controller.rb +12 -10
  15. data/app/controllers/ckeditor/pictures_controller.rb +12 -10
  16. data/app/helpers/ckeditor/application_helper.rb +1 -1
  17. data/app/views/ckeditor/attachment_files/index.html.erb +11 -5
  18. data/app/views/ckeditor/pictures/index.html.erb +12 -6
  19. data/app/views/ckeditor/shared/_asset.html.erb +2 -2
  20. data/app/views/ckeditor/shared/_asset_tmpl.html.erb +3 -3
  21. data/app/views/layouts/ckeditor/application.html.erb +0 -1
  22. data/config/locales/cs.ckeditor.yml +1 -0
  23. data/config/locales/de.ckeditor.yml +9 -0
  24. data/config/locales/el-GR.cdkeditor.yml +9 -0
  25. data/config/locales/en.ckeditor.yml +1 -0
  26. data/config/locales/es.ckeditor.yml +1 -0
  27. data/config/locales/fr.ckeditor.yml +1 -0
  28. data/config/locales/hu.ckeditor.yml +9 -0
  29. data/config/locales/it.ckeditor.yml +1 -0
  30. data/config/locales/nl.ckeditor.yml +2 -1
  31. data/config/locales/pl.ckeditor.yml +1 -0
  32. data/config/locales/pt-BR.ckeditor.yml +2 -1
  33. data/config/locales/pt-PT.ckeditor.yml +9 -0
  34. data/config/locales/ru.ckeditor.yml +1 -0
  35. data/config/locales/sv-SE.ckeditor.yml +1 -0
  36. data/config/locales/uk.ckeditor.yml +1 -0
  37. data/config/locales/zh-CN.ckeditor.yml +1 -0
  38. data/lib/ckeditor.rb +63 -13
  39. data/lib/ckeditor/backend/carrierwave.rb +9 -9
  40. data/lib/ckeditor/backend/dragonfly.rb +2 -2
  41. data/lib/ckeditor/backend/paperclip.rb +4 -4
  42. data/lib/ckeditor/engine.rb +6 -6
  43. data/lib/ckeditor/helpers/controllers.rb +7 -7
  44. data/lib/ckeditor/helpers/form_builder.rb +1 -1
  45. data/lib/ckeditor/helpers/form_helper.rb +2 -21
  46. data/lib/ckeditor/helpers/view_helper.rb +2 -13
  47. data/lib/ckeditor/hooks/cancan.rb +2 -2
  48. data/lib/ckeditor/hooks/formtastic.rb +1 -1
  49. data/lib/ckeditor/hooks/pundit.rb +47 -0
  50. data/lib/ckeditor/http.rb +8 -7
  51. data/lib/ckeditor/orm/active_record.rb +3 -3
  52. data/lib/ckeditor/orm/base.rb +4 -6
  53. data/lib/ckeditor/orm/mongoid.rb +4 -4
  54. data/lib/ckeditor/paginatable.rb +56 -0
  55. data/lib/ckeditor/text_area.rb +52 -0
  56. data/lib/ckeditor/utils.rb +54 -36
  57. data/lib/ckeditor/version.rb +1 -4
  58. data/lib/generators/ckeditor/install_generator.rb +10 -10
  59. data/lib/generators/ckeditor/pundit_policy_generator.rb +22 -0
  60. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +1 -1
  61. data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +4 -4
  62. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +1 -1
  63. data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +2 -2
  64. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +1 -1
  65. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +1 -1
  66. data/lib/generators/ckeditor/templates/ckeditor.rb +21 -16
  67. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +1 -1
  68. data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +20 -0
  69. data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +20 -0
  70. data/test/ckeditor_test.rb +54 -1
  71. data/test/controllers/attachment_files_controller_test.rb +15 -15
  72. data/test/controllers/pictures_controller_test.rb +15 -15
  73. data/test/dummy/app/views/posts/index.html.erb +1 -1
  74. data/test/dummy/config/routes.rb +1 -1
  75. data/test/dummy/log/test.log +301 -0
  76. data/test/dummy/tmp/cache/assets/test/sprockets/0ff571a66f03f4c98305b82fbc097934 +0 -0
  77. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  78. data/test/dummy/tmp/cache/assets/test/sprockets/1c2a2034cd1d6490a47e1f2b22a328f3 +0 -0
  79. data/test/dummy/tmp/cache/assets/test/sprockets/233a499dd1009ab5b2a8040346715629 +0 -0
  80. data/test/dummy/tmp/cache/assets/test/sprockets/2a79c1fcf4595c4bfb3a1e77a732b9e9 +0 -0
  81. data/test/dummy/tmp/cache/assets/test/sprockets/2bb1e656d1d1c20542dd47020608ce4b +0 -0
  82. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  83. data/test/dummy/tmp/cache/assets/test/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
  84. data/test/dummy/tmp/cache/assets/test/sprockets/3c088129885aa2261da0ab21707aa851 +0 -0
  85. data/test/dummy/tmp/cache/assets/test/sprockets/5296ab0e7196335ed50f33e398de0470 +0 -0
  86. data/test/dummy/tmp/cache/assets/test/sprockets/62133d9323b94de8b0cd2a3e490e0374 +0 -0
  87. data/test/dummy/tmp/cache/assets/test/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
  88. data/test/dummy/tmp/cache/assets/test/sprockets/70f2d021b0f59639252116032aa12a5d +0 -0
  89. data/test/dummy/tmp/cache/assets/test/sprockets/73eff3be45044b7438486d533547c02c +0 -0
  90. data/test/dummy/tmp/cache/assets/test/sprockets/7869bf4c6f26bcd697a78ffd20655de5 +0 -0
  91. data/test/dummy/tmp/cache/assets/test/sprockets/88d81ff5585179f4acb7ba76bdcb1244 +0 -0
  92. data/test/dummy/tmp/cache/assets/test/sprockets/990c65e42e2a681340e62644dd07782b +0 -0
  93. data/test/dummy/tmp/cache/assets/test/sprockets/aaf14684bcb6dafb17154d27c3d5a5de +0 -0
  94. data/test/dummy/tmp/cache/assets/test/sprockets/b2141ea733727ae31693b5129d431629 +0 -0
  95. data/test/dummy/tmp/cache/assets/test/sprockets/c1469bfe5d5645440961cc1e8fd48120 +0 -0
  96. data/test/dummy/tmp/cache/assets/test/sprockets/c479f0465142b7c9c5a9c58a256335d7 +0 -0
  97. data/test/dummy/tmp/cache/assets/test/sprockets/c73d53992216d52410b542dce76742ad +0 -0
  98. data/test/dummy/tmp/cache/assets/test/sprockets/c7476f60577593bf79ca5b6334b86903 +0 -0
  99. data/test/dummy/tmp/cache/assets/test/sprockets/cb4a5e7fc592c6023ed2acc5953b4685 +0 -0
  100. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  101. data/test/dummy/tmp/cache/assets/test/sprockets/d7e7d3b3729ff516f81682711ea8a53a +0 -0
  102. data/test/dummy/tmp/cache/assets/test/sprockets/d9b8613a01ff7c7d9fe1a6b7cd5497ff +0 -0
  103. data/test/dummy/tmp/cache/assets/test/sprockets/e4513c04c145290b038978a8f471d244 +0 -0
  104. data/test/dummy/tmp/cache/assets/test/sprockets/e65823156ac3891c4779224e828d4877 +0 -0
  105. data/test/dummy/tmp/cache/assets/test/sprockets/f20469686afebc55828d93a978e5ff20 +0 -0
  106. data/test/dummy/tmp/cache/assets/test/sprockets/f24d6c64fd96102c27c1f10e82ebf864 +0 -0
  107. data/test/dummy/tmp/cache/assets/test/sprockets/f33022711bcfc1cae3955a1de79fe280 +0 -0
  108. data/test/dummy/tmp/cache/assets/test/sprockets/f69b1a9a1323d97109283e5bd378c23d +0 -0
  109. data/test/functional/posts_controller_test.rb +4 -4
  110. data/test/generators/install_generator_test.rb +7 -7
  111. data/test/models/attachment_file_test.rb +2 -2
  112. data/test/models/picture_test.rb +2 -2
  113. data/test/models/utils_test.rb +4 -5
  114. data/test/support/helpers.rb +8 -8
  115. data/test/tmp/app/models/ckeditor/asset.rb +5 -0
  116. data/test/tmp/app/models/ckeditor/attachment_file.rb +12 -0
  117. data/test/tmp/app/models/ckeditor/picture.rb +13 -0
  118. data/test/tmp/config/initializers/ckeditor.rb +26 -0
  119. data/test/tmp/config/routes.rb +5 -0
  120. data/vendor/assets/javascripts/ckeditor/CHANGES.md +414 -0
  121. data/{app → vendor}/assets/javascripts/ckeditor/LICENSE.md +1 -1
  122. data/{app → vendor}/assets/javascripts/ckeditor/README.md +1 -1
  123. data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +10 -0
  124. data/vendor/assets/javascripts/ckeditor/build-config.js +165 -0
  125. data/vendor/assets/javascripts/ckeditor/ckeditor.js +978 -0
  126. data/vendor/assets/javascripts/ckeditor/config.js +10 -0
  127. data/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
  128. data/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
  129. data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/ckcss.png +0 -0
  130. data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/css/styles.css +0 -0
  131. data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/dialogs/ckcss.js +0 -0
  132. data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/lang/en.js +0 -0
  133. data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/lang/ru.js +0 -0
  134. data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/plugin.js +3 -3
  135. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  136. data/{app → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +4 -2
  137. data/{app → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +4 -2
  138. data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +1 -1
  139. data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  140. data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  141. data/{app → vendor}/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
  142. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -0
  143. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/AutoComplete.png +0 -0
  144. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/AutoFormat.png +0 -0
  145. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/CommentSelectedRange.png +0 -0
  146. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/SearchCode.png +0 -0
  147. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/UncommentSelectedRange.png +0 -0
  148. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +0 -0
  149. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -0
  150. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -0
  151. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -0
  152. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -0
  153. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -0
  154. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -0
  155. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +0 -0
  156. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +3 -1
  157. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +335 -90
  158. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-day.css +34 -0
  159. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-night.css +34 -0
  160. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +5 -5
  161. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +75 -75
  162. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-dark.css +34 -0
  163. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +34 -0
  164. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +28 -25
  165. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +21 -18
  166. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +23 -25
  167. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +13 -10
  168. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +30 -21
  169. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +47 -44
  170. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mbo.css +37 -0
  171. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +43 -52
  172. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +29 -28
  173. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +12 -9
  174. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +24 -21
  175. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-dark.css +34 -0
  176. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-light.css +34 -0
  177. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +23 -21
  178. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +180 -207
  179. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +26 -0
  180. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css +34 -0
  181. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +28 -26
  182. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +30 -27
  183. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +49 -46
  184. data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +43 -43
  185. data/{app → vendor}/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +1 -1
  186. data/{app → vendor}/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
  187. data/{app → vendor}/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +5 -5
  188. data/{app → vendor}/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
  189. data/{app → vendor}/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +1 -1
  190. data/{app → vendor}/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +1 -1
  191. data/{app → vendor}/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
  192. data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
  193. data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
  194. data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +2 -2
  195. data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +1 -1
  196. data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
  197. data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +1 -1
  198. data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
  199. data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
  200. data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  201. data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  202. data/{app/assets/javascripts/ckeditor/skins/moono → vendor/assets/javascripts/ckeditor/plugins}/icons_hidpi.png +0 -0
  203. data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
  204. data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  205. data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +13 -13
  206. data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +43 -0
  207. data/{app → vendor}/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
  208. data/{app → vendor}/assets/javascripts/ckeditor/plugins/ipsum/icon.png +0 -0
  209. data/{app → vendor}/assets/javascripts/ckeditor/plugins/ipsum/plugin.js +0 -0
  210. data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
  211. data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +8 -7
  212. data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
  213. data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  214. data/{app → vendor}/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
  215. data/{app → vendor}/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  216. data/{app → vendor}/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
  217. data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/example_usage.js +0 -0
  218. data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/map.gif +0 -0
  219. data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/plugin.js +0 -0
  220. data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
  221. data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
  222. data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +0 -0
  223. data/{app → vendor}/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  224. data/{app → vendor}/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +1 -1
  225. data/{app → vendor}/assets/javascripts/ckeditor/plugins/preview/preview.html +0 -0
  226. data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +0 -0
  227. data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/README.md +0 -0
  228. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +20 -0
  229. data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
  230. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  231. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  232. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  233. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  234. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  235. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  236. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  237. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  238. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  239. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  240. data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  241. data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
  242. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  243. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
  244. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  245. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
  246. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  247. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
  248. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  249. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
  250. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  251. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
  252. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  253. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
  254. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  255. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
  256. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
  257. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  258. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.png +0 -0
  259. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
  260. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.png +0 -0
  261. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  262. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.png +0 -0
  263. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  264. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
  265. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  266. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
  267. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  268. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
  269. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  270. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
  271. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  272. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
  273. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  274. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
  275. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  276. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
  277. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  278. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
  279. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
  280. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
  281. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  282. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  283. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
  284. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  285. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
  286. data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
  287. data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
  288. data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
  289. data/{app → vendor}/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +6 -6
  290. data/{app → vendor}/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +4 -4
  291. data/{app → vendor}/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
  292. data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
  293. data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
  294. data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
  295. data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  296. data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  297. data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  298. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +0 -0
  299. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +0 -0
  300. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +11 -0
  301. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +72 -31
  302. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -0
  303. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -0
  304. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -0
  305. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmp.html +0 -0
  306. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -0
  307. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -0
  308. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +31 -31
  309. data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +0 -0
  310. data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
  311. data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/lang/en.js +1 -0
  312. data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -0
  313. data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/plugin.js +56 -15
  314. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css.scss +768 -0
  315. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css.scss +809 -0
  316. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css.scss +841 -0
  317. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css.scss +822 -0
  318. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css.scss +813 -0
  319. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_opera.css.scss +781 -0
  320. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css.scss +2125 -0
  321. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css.scss +2134 -0
  322. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css.scss +2183 -0
  323. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css.scss +2351 -0
  324. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css.scss +2195 -0
  325. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css.scss +2243 -0
  326. data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  327. data/{app/assets/javascripts/ckeditor/plugins → vendor/assets/javascripts/ckeditor/skins/moono}/icons_hidpi.png +0 -0
  328. data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
  329. data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
  330. data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  331. data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  332. data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  333. data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  334. data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
  335. data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
  336. data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
  337. data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/readme.md +1 -1
  338. data/{app → vendor}/assets/javascripts/ckeditor/styles.js +2 -2
  339. metadata +445 -352
  340. data/README.rdoc +0 -12
  341. data/app/assets/javascripts/ckeditor/CHANGES.md +0 -233
  342. data/app/assets/javascripts/ckeditor/build-config.js +0 -103
  343. data/app/assets/javascripts/ckeditor/ckeditor.js +0 -929
  344. data/app/assets/javascripts/ckeditor/contents.css +0 -103
  345. data/app/assets/javascripts/ckeditor/lang/en.js +0 -5
  346. data/app/assets/javascripts/ckeditor/lang/ru.js +0 -5
  347. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -10
  348. data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +0 -1
  349. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +0 -1
  350. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +0 -5637
  351. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.modes.min.js +0 -1
  352. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.search-addons.min.js +0 -1
  353. data/app/assets/javascripts/ckeditor/plugins/font/lang/en.js +0 -14
  354. data/app/assets/javascripts/ckeditor/plugins/font/lang/ru.js +0 -14
  355. data/app/assets/javascripts/ckeditor/plugins/font/plugin.js +0 -225
  356. data/app/assets/javascripts/ckeditor/plugins/highslide/dialogs/hs.js +0 -73
  357. data/app/assets/javascripts/ckeditor/plugins/highslide/icon.png +0 -0
  358. data/app/assets/javascripts/ckeditor/plugins/highslide/lang/en.js +0 -7
  359. data/app/assets/javascripts/ckeditor/plugins/highslide/lang/ru.js +0 -7
  360. data/app/assets/javascripts/ckeditor/plugins/highslide/plugin.js +0 -26
  361. data/app/assets/javascripts/ckeditor/plugins/highslide/readme.txt +0 -55
  362. data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/install.html +0 -93
  363. data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/styles.css +0 -59
  364. data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon1.png +0 -0
  365. data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon2.png +0 -0
  366. data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon3.png +0 -0
  367. data/app/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  368. data/app/assets/javascripts/ckeditor/plugins/iframe/icons/hidpi/iframe.png +0 -0
  369. data/app/assets/javascripts/ckeditor/plugins/iframe/icons/iframe.png +0 -0
  370. data/app/assets/javascripts/ckeditor/plugins/iframe/lang/en.js +0 -11
  371. data/app/assets/javascripts/ckeditor/plugins/iframe/lang/ru.js +0 -11
  372. data/app/assets/javascripts/ckeditor/plugins/iframe/plugin.js +0 -83
  373. data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -43
  374. data/app/assets/javascripts/ckeditor/plugins/oembed/images/icon.png +0 -0
  375. data/app/assets/javascripts/ckeditor/plugins/oembed/images/placeholder.png +0 -0
  376. data/app/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.js +0 -70
  377. data/app/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.min.js +0 -71
  378. data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/images/icon.png +0 -0
  379. data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/images/placeholder.png +0 -0
  380. data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/lang/en.js +0 -23
  381. data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/lang/ru.js +0 -23
  382. data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/libs/jquery.oembed.js +0 -971
  383. data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/libs/jquery.oembed.min.js +0 -11
  384. data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/plugin.js +0 -373
  385. data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -20
  386. data/app/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  387. data/app/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  388. data/app/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  389. data/app/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  390. data/app/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  391. data/app/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  392. data/app/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  393. data/app/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
  394. data/app/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  395. data/app/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
  396. data/app/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  397. data/app/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  398. data/app/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  399. data/app/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  400. data/app/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  401. data/app/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  402. data/app/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  403. data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  404. data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  405. data/app/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
  406. data/app/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  407. data/app/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  408. data/app/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  409. data/app/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/assets/sample.css +0 -70
  410. data/app/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +0 -82
  411. data/app/assets/javascripts/ckeditor/plugins/symbol/dialogs/lang/en.js +0 -181
  412. data/app/assets/javascripts/ckeditor/plugins/symbol/dialogs/symbol.js +0 -18
  413. data/app/assets/javascripts/ckeditor/plugins/symbol/icons/symbol.png +0 -0
  414. data/app/assets/javascripts/ckeditor/plugins/symbol/lang/en.js +0 -1
  415. data/app/assets/javascripts/ckeditor/plugins/symbol/plugin.js +0 -15
  416. data/app/assets/javascripts/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -9
  417. data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  418. data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  419. data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  420. data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  421. data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -15
  422. data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/yui.js +0 -225
  423. data/app/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
  424. data/app/assets/javascripts/ckeditor/skins/moono/dialog.css +0 -5
  425. data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +0 -5
  426. data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +0 -5
  427. data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +0 -5
  428. data/app/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +0 -5
  429. data/app/assets/javascripts/ckeditor/skins/moono/dialog_opera.css +0 -5
  430. data/app/assets/javascripts/ckeditor/skins/moono/editor.css +0 -5
  431. data/app/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +0 -5
  432. data/app/assets/javascripts/ckeditor/skins/moono/editor_ie.css +0 -5
  433. data/app/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +0 -5
  434. data/app/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +0 -5
  435. data/app/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +0 -5
  436. data/app/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  437. data/lib/ckeditor/tasks.rake +0 -11
@@ -1,59 +0,0 @@
1
- body {
2
- font-family: Arial, Helvetica, sans-serif;
3
- font-size: 90%;
4
- }
5
- h1 {
6
- text-align:center;
7
- font-size:180%;
8
- }
9
- h2 {
10
- border-bottom:2px solid #CCC;
11
- margin:1em 0 0.4em 0;
12
- }
13
- h3 {
14
- margin-bottom:0.4em;
15
- }
16
- p {
17
- margin:0 0 1em 1em;
18
- text-align:justify;
19
- }
20
- ol {
21
- margin:0 0 1.2em 1em;
22
- padding:0;
23
- list-style-type:none;
24
- }
25
- ol li {
26
- margin:0.2em 0;
27
- }
28
- pre, code {
29
- font-size:100%;
30
- font-family:"Courier New", Courier, mono;
31
- background-color: #CCCCCC;
32
- border:1px solid #999;
33
- padding:0.2em 1em;
34
- margin: 0.4em 0;
35
- display:block;
36
- white-space: pre;
37
- overflow: auto;
38
- }
39
- form {
40
- margin:0 0 0 1em;
41
- }
42
- span.key {
43
- color: #006600;
44
- }
45
- #install {
46
- display:none
47
- }
48
- #languages ul {
49
- display:inline;
50
- list-style-type:none;
51
- margin:0;
52
- padding:0;
53
- }
54
- #languages li {
55
- display:inline;
56
- margin:0;
57
- padding:0;
58
- vertical-align:bottom;
59
- }
@@ -1,11 +0,0 @@
1
- /*
2
- Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
4
- */
5
- CKEDITOR.plugins.setLang( 'iframe', 'en', {
6
- border: 'Show frame border',
7
- noUrl: 'Please type the iframe URL',
8
- scrolling: 'Enable scrollbars',
9
- title: 'IFrame Properties',
10
- toolbar: 'IFrame'
11
- });
@@ -1,11 +0,0 @@
1
- /*
2
- Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
4
- */
5
- CKEDITOR.plugins.setLang( 'iframe', 'ru', {
6
- border: 'Показать границы фрейма',
7
- noUrl: 'Пожалуйста, введите ссылку фрейма',
8
- scrolling: 'Отображать полосы прокрутки',
9
- title: 'Свойства iFrame',
10
- toolbar: 'iFrame'
11
- });
@@ -1,83 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
4
- */
5
-
6
- (function() {
7
- CKEDITOR.plugins.add( 'iframe', {
8
- requires: 'dialog,fakeobjects',
9
- lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
10
- icons: 'iframe', // %REMOVE_LINE_CORE%
11
- hidpi: true, // %REMOVE_LINE_CORE%
12
- onLoad: function() {
13
- CKEDITOR.addCss( 'img.cke_iframe' +
14
- '{' +
15
- 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' +
16
- 'background-position: center center;' +
17
- 'background-repeat: no-repeat;' +
18
- 'border: 1px solid #a9a9a9;' +
19
- 'width: 80px;' +
20
- 'height: 80px;' +
21
- '}'
22
- );
23
- },
24
- init: function( editor ) {
25
- var pluginName = 'iframe',
26
- lang = editor.lang.iframe,
27
- allowed = 'iframe[align,longdesc,frameborder,height,name,scrolling,src,title,width]';
28
-
29
- if ( editor.plugins.dialogadvtab )
30
- allowed += ';iframe' + editor.plugins.dialogadvtab.allowedContent( { id:1,classes:1,styles:1 } );
31
-
32
- CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/iframe.js' );
33
- editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName, {
34
- allowedContent: allowed,
35
- requiredContent: 'iframe'
36
- } ) );
37
-
38
- editor.ui.addButton && editor.ui.addButton( 'Iframe', {
39
- label: lang.toolbar,
40
- command: pluginName,
41
- toolbar: 'insert,80'
42
- });
43
-
44
- editor.on( 'doubleclick', function( evt ) {
45
- var element = evt.data.element;
46
- if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'iframe' )
47
- evt.data.dialog = 'iframe';
48
- });
49
-
50
- if ( editor.addMenuItems ) {
51
- editor.addMenuItems({
52
- iframe: {
53
- label: lang.title,
54
- command: 'iframe',
55
- group: 'image'
56
- }
57
- });
58
- }
59
-
60
- // If the "contextmenu" plugin is loaded, register the listeners.
61
- if ( editor.contextMenu ) {
62
- editor.contextMenu.addListener( function( element, selection ) {
63
- if ( element && element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'iframe' )
64
- return { iframe: CKEDITOR.TRISTATE_OFF };
65
- });
66
- }
67
- },
68
- afterInit: function( editor ) {
69
- var dataProcessor = editor.dataProcessor,
70
- dataFilter = dataProcessor && dataProcessor.dataFilter;
71
-
72
- if ( dataFilter ) {
73
- dataFilter.addRules({
74
- elements: {
75
- iframe: function( element ) {
76
- return editor.createFakeParserElement( element, 'cke_iframe', 'iframe', true );
77
- }
78
- }
79
- });
80
- }
81
- }
82
- });
83
- })();
@@ -1,43 +0,0 @@
1
- /*
2
- Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
4
- */
5
- (function(){var r=function(c,j){function r(){var a=arguments,b=this.getContentElement("advanced","txtdlgGenStyle");b&&b.commit.apply(b,a);this.foreach(function(b){b.commit&&"txtdlgGenStyle"!=b.id&&b.commit.apply(b,a)})}function i(a){if(!s){s=1;var b=this.getDialog(),d=b.imageElement;if(d){this.commit(f,d);for(var a=[].concat(a),e=a.length,c,g=0;g<e;g++)(c=b.getContentElement.apply(b,a[g].split(":")))&&c.setup(f,d)}s=0}}var f=1,k=/^\s*(\d+)((px)|\%)?\s*$/i,v=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,o=/^\d+px$/,
6
- w=function(){var a=this.getValue(),b=this.getDialog(),d=a.match(k);d&&("%"==d[2]&&l(b,!1),a=d[1]);b.lockRatio&&(d=b.originalElement,"true"==d.getCustomData("isReady")&&("txtHeight"==this.id?(a&&"0"!=a&&(a=Math.round(d.$.width*(a/d.$.height))),isNaN(a)||b.setValueOf("info","txtWidth",a)):(a&&"0"!=a&&(a=Math.round(d.$.height*(a/d.$.width))),isNaN(a)||b.setValueOf("info","txtHeight",a))));g(b)},g=function(a){if(!a.originalElement||!a.preview)return 1;a.commitContent(4,a.preview);return 0},s,l=function(a,
7
- b){if(!a.getContentElement("info","ratioLock"))return null;var d=a.originalElement;if(!d)return null;if("check"==b){if(!a.userlockRatio&&"true"==d.getCustomData("isReady")){var e=a.getValueOf("info","txtWidth"),c=a.getValueOf("info","txtHeight"),d=1E3*d.$.width/d.$.height,f=1E3*e/c;a.lockRatio=!1;!e&&!c?a.lockRatio=!0:!isNaN(d)&&!isNaN(f)&&Math.round(d)==Math.round(f)&&(a.lockRatio=!0)}}else void 0!=b?a.lockRatio=b:(a.userlockRatio=1,a.lockRatio=!a.lockRatio);e=CKEDITOR.document.getById(p);a.lockRatio?
8
- e.removeClass("cke_btn_unlocked"):e.addClass("cke_btn_unlocked");e.setAttribute("aria-checked",a.lockRatio);CKEDITOR.env.hc&&e.getChild(0).setHtml(a.lockRatio?CKEDITOR.env.ie?"■":"▣":CKEDITOR.env.ie?"□":"▢");return a.lockRatio},x=function(a){var b=a.originalElement;if("true"==b.getCustomData("isReady")){var d=a.getContentElement("info","txtWidth"),e=a.getContentElement("info","txtHeight");d&&d.setValue(b.$.width);e&&e.setValue(b.$.height)}g(a)},y=function(a,b){function d(a,b){var d=a.match(k);return d?
9
- ("%"==d[2]&&(d[1]+="%",l(e,!1)),d[1]):b}if(a==f){var e=this.getDialog(),c="",g="txtWidth"==this.id?"width":"height",h=b.getAttribute(g);h&&(c=d(h,c));c=d(b.getStyle(g),c);this.setValue(c)}},t,q=function(){var a=this.originalElement;a.setCustomData("isReady","true");a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);CKEDITOR.document.getById(m).setStyle("display","none");this.dontResetSize||x(this);this.firstLoad&&CKEDITOR.tools.setTimeout(function(){l(this,"check")},
10
- 0,this);this.dontResetSize=this.firstLoad=!1},h=function(){var a=this.originalElement;a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);a=CKEDITOR.getUrl(CKEDITOR.plugins.get("image").path+"images/noimage.png");this.preview&&this.preview.setAttribute("src",a);CKEDITOR.document.getById(m).setStyle("display","none");l(this,!1)},n=function(a){return CKEDITOR.tools.getNextId()+"_"+a},p=n("btnLockSizes"),u=n("btnResetSize"),m=n("ImagePreviewLoader"),A=n("previewLink"),
11
- z=n("previewImage");return{title:c.lang.image["image"==j?"title":"titleButton"],minWidth:420,minHeight:360,onShow:function(){this.linkEditMode=this.imageEditMode=this.linkElement=this.imageElement=!1;this.lockRatio=!0;this.userlockRatio=0;this.dontResetSize=!1;this.firstLoad=!0;this.addLink=!1;var a=this.getParentEditor(),b=a.getSelection(),d=(b=b&&b.getSelectedElement())&&a.elementPath(b).contains("a",1);CKEDITOR.document.getById(m).setStyle("display","none");t=new CKEDITOR.dom.element("img",a.document);
12
- this.preview=CKEDITOR.document.getById(z);this.originalElement=a.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");if(d){this.linkElement=d;this.linkEditMode=!0;var c=d.getChildren();if(1==c.count()){var g=c.getItem(0).getName();if("img"==g||"input"==g)this.imageElement=c.getItem(0),"img"==this.imageElement.getName()?this.imageEditMode="img":"input"==this.imageElement.getName()&&(this.imageEditMode="input")}"image"==j&&
13
- this.setupContent(2,d)}if(b&&"img"==b.getName()&&!b.data("cke-realelement")||b&&"input"==b.getName()&&"image"==b.getAttribute("type"))this.imageEditMode=b.getName(),this.imageElement=b;this.imageEditMode?(this.cleanImageElement=this.imageElement,this.imageElement=this.cleanImageElement.clone(!0,!0),this.setupContent(f,this.imageElement)):this.imageElement=a.document.createElement("img");l(this,!0);CKEDITOR.tools.trim(this.getValueOf("info","txtUrl"))||(this.preview.removeAttribute("src"),this.preview.setStyle("display",
14
- "none"))},onOk:function(){if(this.imageEditMode){var a=this.imageEditMode;"image"==j&&"input"==a&&confirm(c.lang.image.button2Img)?(this.imageElement=c.document.createElement("img"),this.imageElement.setAttribute("alt",""),c.insertElement(this.imageElement)):"image"!=j&&"img"==a&&confirm(c.lang.image.img2Button)?(this.imageElement=c.document.createElement("input"),this.imageElement.setAttributes({type:"image",alt:""}),c.insertElement(this.imageElement)):(this.imageElement=this.cleanImageElement,delete this.cleanImageElement)}else"image"==
15
- j?this.imageElement=c.document.createElement("img"):(this.imageElement=c.document.createElement("input"),this.imageElement.setAttribute("type","image")),this.imageElement.setAttribute("alt","");this.linkEditMode||(this.linkElement=c.document.createElement("a"));this.commitContent(f,this.imageElement);this.commitContent(2,this.linkElement);this.imageElement.getAttribute("style")||this.imageElement.removeAttribute("style");this.imageEditMode?!this.linkEditMode&&this.addLink?(c.insertElement(this.linkElement),
16
- this.imageElement.appendTo(this.linkElement)):this.linkEditMode&&!this.addLink&&(c.getSelection().selectElement(this.linkElement),c.insertElement(this.imageElement)):this.addLink?this.linkEditMode?c.insertElement(this.imageElement):(c.insertElement(this.linkElement),this.linkElement.append(this.imageElement,!1)):c.insertElement(this.imageElement)},onLoad:function(){"image"!=j&&this.hidePage("Link");var a=this._.element.getDocument();this.getContentElement("info","ratioLock")&&(this.addFocusable(a.getById(u),
17
- 5),this.addFocusable(a.getById(p),5));this.commitContent=r},onHide:function(){this.preview&&this.commitContent(8,this.preview);this.originalElement&&(this.originalElement.removeListener("load",q),this.originalElement.removeListener("error",h),this.originalElement.removeListener("abort",h),this.originalElement.remove(),this.originalElement=!1);delete this.imageElement},contents:[{id:"info",label:c.lang.image.infoTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["280px",
18
- "110px"],align:"right",children:[{id:"txtUrl",type:"text",label:c.lang.common.url,required:!0,onChange:function(){var a=this.getDialog(),b=this.getValue();if(0<b.length){var a=this.getDialog(),d=a.originalElement;a.preview.removeStyle("display");d.setCustomData("isReady","false");var c=CKEDITOR.document.getById(m);c&&c.setStyle("display","");d.on("load",q,a);d.on("error",h,a);d.on("abort",h,a);d.setAttribute("src",b);t.setAttribute("src",b);a.preview.setAttribute("src",t.$.src);g(a)}else a.preview&&
19
- (a.preview.removeAttribute("src"),a.preview.setStyle("display","none"))},setup:function(a,b){if(a==f){var d=b.data("cke-saved-src")||b.getAttribute("src");this.getDialog().dontResetSize=!0;this.setValue(d);this.setInitValue()}},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())?(b.data("cke-saved-src",this.getValue()),b.setAttribute("src",this.getValue())):8==a&&(b.setAttribute("src",""),b.removeAttribute("src"))},validate:CKEDITOR.dialog.validate.notEmpty(c.lang.image.urlMissing)},{type:"button",
20
- id:"browse",style:"display:inline-block;margin-top:10px;",align:"center",label:c.lang.common.browseServer,hidden:!0,filebrowser:"info:txtUrl"}]}]},{id:"txtAlt",type:"text",label:c.lang.image.alt,accessKey:"T","default":"",onChange:function(){g(this.getDialog())},setup:function(a,b){a==f&&this.setValue(b.getAttribute("alt"))},commit:function(a,b){a==f?(this.getValue()||this.isChanged())&&b.setAttribute("alt",this.getValue()):4==a?b.setAttribute("alt",this.getValue()):8==a&&b.removeAttribute("alt")}},
21
- {type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",requiredContent:"img{width,height}",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"45px",id:"txtWidth",label:c.lang.common.width,onKeyUp:w,onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(v);(a=!!(a&&0!==parseInt(a[1],10)))||alert(c.lang.common.invalidWidth);return a},setup:y,commit:function(a,b,d){var c=this.getValue();a==f?(c?b.setStyle("width",
22
- CKEDITOR.tools.cssLength(c)):b.removeStyle("width"),!d&&b.removeAttribute("width")):4==a?c.match(k)?b.setStyle("width",CKEDITOR.tools.cssLength(c)):(a=this.getDialog().originalElement,"true"==a.getCustomData("isReady")&&b.setStyle("width",a.$.width+"px")):8==a&&(b.removeAttribute("width"),b.removeStyle("width"))}},{type:"text",id:"txtHeight",width:"45px",label:c.lang.common.height,onKeyUp:w,onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(v);
23
- (a=!!(a&&0!==parseInt(a[1],10)))||alert(c.lang.common.invalidHeight);return a},setup:y,commit:function(a,b,d){var c=this.getValue();a==f?(c?b.setStyle("height",CKEDITOR.tools.cssLength(c)):b.removeStyle("height"),!d&&b.removeAttribute("height")):4==a?c.match(k)?b.setStyle("height",CKEDITOR.tools.cssLength(c)):(a=this.getDialog().originalElement,"true"==a.getCustomData("isReady")&&b.setStyle("height",a.$.height+"px")):8==a&&(b.removeAttribute("height"),b.removeStyle("height"))}}]},{id:"ratioLock",
24
- type:"html",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var a=CKEDITOR.document.getById(u),b=CKEDITOR.document.getById(p);a&&(a.on("click",function(a){x(this);a.data&&a.data.preventDefault()},this.getDialog()),a.on("mouseover",function(){this.addClass("cke_btn_over")},a),a.on("mouseout",function(){this.removeClass("cke_btn_over")},a));b&&(b.on("click",function(a){l(this);var b=this.originalElement,c=this.getValueOf("info","txtWidth");if(b.getCustomData("isReady")=="true"&&c){b=
25
- b.$.height/b.$.width*c;if(!isNaN(b)){this.setValueOf("info","txtHeight",Math.round(b));g(this)}}a.data&&a.data.preventDefault()},this.getDialog()),b.on("mouseover",function(){this.addClass("cke_btn_over")},b),b.on("mouseout",function(){this.removeClass("cke_btn_over")},b))},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+c.lang.image.lockRatio+'" class="cke_btn_locked" id="'+p+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+c.lang.image.lockRatio+'</span></a><a href="javascript:void(0)" tabindex="-1" title="'+
26
- c.lang.image.resetSize+'" class="cke_btn_reset" id="'+u+'" role="button"><span class="cke_label">'+c.lang.image.resetSize+"</span></a></div>"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",requiredContent:"img{border-width}",width:"60px",label:c.lang.image.border,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateBorder),setup:function(a,b){if(a==f){var d;d=
27
- (d=(d=b.getStyle("border-width"))&&d.match(/^(\d+px)(?: \1 \1 \1)?$/))&&parseInt(d[1],10);isNaN(parseInt(d,10))&&(d=b.getAttribute("border"));this.setValue(d)}},commit:function(a,b,d){var c=parseInt(this.getValue(),10);a==f||4==a?(isNaN(c)?!c&&this.isChanged()&&b.removeStyle("border"):(b.setStyle("border-width",CKEDITOR.tools.cssLength(c)),b.setStyle("border-style","solid")),!d&&a==f&&b.removeAttribute("border")):8==a&&(b.removeAttribute("border"),b.removeStyle("border-width"),b.removeStyle("border-style"),
28
- b.removeStyle("border-color"))}},{type:"text",id:"txtHSpace",requiredContent:"img{margin-left,margin-right}",width:"60px",label:c.lang.image.hSpace,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateHSpace),setup:function(a,b){if(a==f){var d,c;d=b.getStyle("margin-left");c=b.getStyle("margin-right");d=d&&d.match(o);c=c&&c.match(o);d=parseInt(d,10);c=parseInt(c,10);d=d==c&&d;
29
- isNaN(parseInt(d,10))&&(d=b.getAttribute("hspace"));this.setValue(d)}},commit:function(a,b,c){var e=parseInt(this.getValue(),10);a==f||4==a?(isNaN(e)?!e&&this.isChanged()&&(b.removeStyle("margin-left"),b.removeStyle("margin-right")):(b.setStyle("margin-left",CKEDITOR.tools.cssLength(e)),b.setStyle("margin-right",CKEDITOR.tools.cssLength(e))),!c&&a==f&&b.removeAttribute("hspace")):8==a&&(b.removeAttribute("hspace"),b.removeStyle("margin-left"),b.removeStyle("margin-right"))}},{type:"text",id:"txtVSpace",
30
- requiredContent:"img{margin-top,margin-bottom}",width:"60px",label:c.lang.image.vSpace,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateVSpace),setup:function(a,b){if(a==f){var c,e;c=b.getStyle("margin-top");e=b.getStyle("margin-bottom");c=c&&c.match(o);e=e&&e.match(o);c=parseInt(c,10);e=parseInt(e,10);c=c==e&&c;isNaN(parseInt(c,10))&&(c=b.getAttribute("vspace"));this.setValue(c)}},
31
- commit:function(a,b,c){var e=parseInt(this.getValue(),10);a==f||4==a?(isNaN(e)?!e&&this.isChanged()&&(b.removeStyle("margin-top"),b.removeStyle("margin-bottom")):(b.setStyle("margin-top",CKEDITOR.tools.cssLength(e)),b.setStyle("margin-bottom",CKEDITOR.tools.cssLength(e))),!c&&a==f&&b.removeAttribute("vspace")):8==a&&(b.removeAttribute("vspace"),b.removeStyle("margin-top"),b.removeStyle("margin-bottom"))}},{id:"cmbAlign",requiredContent:"img{float}",type:"select",widths:["35%","65%"],style:"width:90px",
32
- label:c.lang.common.align,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.alignLeft,"left"],[c.lang.common.alignRight,"right"]],onChange:function(){g(this.getDialog());i.call(this,"advanced:txtdlgGenStyle")},setup:function(a,b){if(a==f){var c=b.getStyle("float");switch(c){case "inherit":case "none":c=""}!c&&(c=(b.getAttribute("align")||"").toLowerCase());this.setValue(c)}},commit:function(a,b,c){var e=this.getValue();if(a==f||4==a){if(e?b.setStyle("float",e):b.removeStyle("float"),!c&&
33
- a==f)switch(e=(b.getAttribute("align")||"").toLowerCase(),e){case "left":case "right":b.removeAttribute("align")}}else 8==a&&b.removeStyle("float")}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"<div>"+CKEDITOR.tools.htmlEncode(c.lang.common.preview)+'<br><div id="'+m+'" class="ImagePreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div><div class="ImagePreviewBox"><table><tr><td><a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+
34
- A+'"><img id="'+z+'" alt="" /></a>'+(c.config.image_previewText||"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.")+
35
- "</td></tr></table></div></div>"}]}]}]},{id:"Link",requiredContent:"a[href]",label:c.lang.image.linkTab,padding:0,elements:[{id:"txtUrl",type:"text",label:c.lang.common.url,style:"width: 100%","default":"",setup:function(a,b){if(2==a){var c=b.data("cke-saved-href");c||(c=b.getAttribute("href"));this.setValue(c)}},commit:function(a,b){if(2==a&&(this.getValue()||this.isChanged())){var d=decodeURI(this.getValue());b.data("cke-saved-href",d);b.setAttribute("href",d);if(this.getValue()||!c.config.image_removeLinkByEmptyURL)this.getDialog().addLink=
36
- !0}}},{type:"button",id:"browse",filebrowser:{action:"Browse",target:"Link:txtUrl",url:c.config.filebrowserImageBrowseLinkUrl},style:"float:right",hidden:!0,label:c.lang.common.browseServer},{id:"cmbTarget",type:"select",requiredContent:"a[target]",label:c.lang.common.target,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.targetNew,"_blank"],[c.lang.common.targetTop,"_top"],[c.lang.common.targetSelf,"_self"],[c.lang.common.targetParent,"_parent"]],setup:function(a,b){2==a&&this.setValue(b.getAttribute("target")||
37
- "")},commit:function(a,b){2==a&&(this.getValue()||this.isChanged())&&b.setAttribute("target",this.getValue())}}]},{id:"Upload",hidden:!0,filebrowser:"uploadButton",label:c.lang.image.upload,elements:[{type:"file",id:"upload",label:c.lang.image.btnUpload,style:"height:40px",size:38},{type:"fileButton",id:"uploadButton",filebrowser:"info:txtUrl",label:c.lang.image.btnUpload,"for":["Upload","upload"]}]},{id:"advanced",label:c.lang.common.advancedTab,elements:[{type:"hbox",widths:["50%","25%","25%"],
38
- children:[{type:"text",id:"linkId",requiredContent:"img[id]",label:c.lang.common.id,setup:function(a,b){a==f&&this.setValue(b.getAttribute("id"))},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("id",this.getValue())}},{id:"cmbLangDir",type:"select",requiredContent:"img[dir]",style:"width : 100px;",label:c.lang.common.langDir,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.langDirLtr,"ltr"],[c.lang.common.langDirRtl,"rtl"]],setup:function(a,b){a==f&&this.setValue(b.getAttribute("dir"))},
39
- commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("dir",this.getValue())}},{type:"text",id:"txtLangCode",requiredContent:"img[lang]",label:c.lang.common.langCode,"default":"",setup:function(a,b){a==f&&this.setValue(b.getAttribute("lang"))},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("lang",this.getValue())}}]},{type:"text",id:"txtGenLongDescr",requiredContent:"img[longdesc]",label:c.lang.common.longDescr,setup:function(a,b){a==f&&this.setValue(b.getAttribute("longDesc"))},
40
- commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("longDesc",this.getValue())}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",requiredContent:"img(cke-xyz)",label:c.lang.common.cssClass,"default":"",setup:function(a,b){a==f&&this.setValue(b.getAttribute("class"))},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("class",this.getValue())}},{type:"text",id:"txtGenTitle",requiredContent:"img[title]",label:c.lang.common.advisoryTitle,
41
- "default":"",onChange:function(){g(this.getDialog())},setup:function(a,b){a==f&&this.setValue(b.getAttribute("title"))},commit:function(a,b){a==f?(this.getValue()||this.isChanged())&&b.setAttribute("title",this.getValue()):4==a?b.setAttribute("title",this.getValue()):8==a&&b.removeAttribute("title")}}]},{type:"text",id:"txtdlgGenStyle",requiredContent:"img{cke-xyz}",label:c.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(c.lang.common.invalidInlineStyle),"default":"",setup:function(a,
42
- b){if(a==f){var c=b.getAttribute("style");!c&&b.$.style.cssText&&(c=b.$.style.cssText);this.setValue(c);var e=b.$.style.height,c=b.$.style.width,e=(e?e:"").match(k),c=(c?c:"").match(k);this.attributesInStyle={height:!!e,width:!!c}}},onChange:function(){i.call(this,"info:cmbFloat info:cmbAlign info:txtVSpace info:txtHSpace info:txtBorder info:txtWidth info:txtHeight".split(" "));g(this)},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("style",this.getValue())}}]}]}};
43
- CKEDITOR.dialog.add("image",function(c){return r(c,"image")});CKEDITOR.dialog.add("imagebutton",function(c){return r(c,"imagebutton")})})();
@@ -1,70 +0,0 @@
1
- (function(b){function l(){var a=window.location.protocol;return"file:"===a?"http://":a+"//"}function n(a,b){b=b?b:"";return a?n(--a,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".charAt(Math.floor(60*Math.random()))+b):b}function o(a,b){var c=a.apiendpoint,d="",g,c=c+(0>=c.indexOf("?")?"?":"&"),c=c.replace("#","%23");if(null!==a.maxWidth&&("undefined"===typeof a.params.maxwidth||null===a.params.maxwidth))a.params.maxwidth=a.maxWidth;if(null!==a.maxHeight&&("undefined"===typeof a.params.maxheight||
2
- null===a.params.maxheight))a.params.maxheight=a.maxHeight;for(g in a.params)g!=a.callbackparameter&&null!==a.params[g]&&(d+="&"+escape(g)+"="+a.params[g]);c+="format="+a.format+"&url="+escape(b)+d;"json"!=a.dataType&&(c+="&"+a.callbackparameter+"=?");return c}function m(a,k,c){b("#jqoembeddata").data(k,a.code);j.beforeEmbed.call(c,a);j.onEmbed.call(c,a);j.afterEmbed.call(c,a)}function d(a,k,c){if(void 0!=b("#jqoembeddata").data(k)&&"iframe"!=c.embedtag.tag){var d={code:b("#jqoembeddata").data(k)};
3
- m(d,k,a)}else if(c.yql){var d=c.yql.from||"htmlstring",g=c.yql.url?c.yql.url(k):k,f="SELECT * FROM "+d+' WHERE url="'+g+'" and '+(/html/.test(d)?"xpath":"itemPath")+"='"+(c.yql.xpath||"/")+"'";"html"==d&&(f+=" and compat='html5'");d=b.extend({url:l()+"query.yahooapis.com/v1/public/yql",dataType:"jsonp",data:{q:f,format:"json",env:"store://datatables.org/alltableswithkeys",callback:"?"},success:function(e){if(c.yql.xpath&&"//meta|//title|//link"==c.yql.xpath){var f={};null==e.query.results&&(e.query.results=
4
- {meta:[]});for(var d=0,h=e.query.results.meta.length;d<h;d++){var j=e.query.results.meta[d].name||e.query.results.meta[d].property||null;null!=j&&(f[j.toLowerCase()]=e.query.results.meta[d].content)}if((!f.hasOwnProperty("title")||!f.hasOwnProperty("og:title"))&&null!=e.query.results.title)f.title=e.query.results.title;if(!f.hasOwnProperty("og:image")&&e.query.results.hasOwnProperty("link")){d=0;for(h=e.query.results.link.length;d<h;d++)e.query.results.link[d].hasOwnProperty("rel")&&"apple-touch-icon"==
5
- e.query.results.link[d].rel&&(f["og:image"]="/"==e.query.results.link[d].href.charAt(0)?g.match(/^(([a-z]+:)?(\/\/)?[^\/]+\/).*$/)[1]+e.query.results.link[d].href:e.query.results.link[d].href)}e=c.yql.datareturn(f)}else e=c.yql.datareturn?c.yql.datareturn(e.query.results):e.query.results.result;!1!==e&&(f=b.extend({},e),f.code=e,m(f,k,a))},error:function(){j.onError.call(a,k,c)}},j.ajaxOptions||{});b.ajax(d)}else if(c.templateRegex)if(""!==c.embedtag.tag){var d=c.embedtag.flashvars||"",f=c.embedtag.tag||
6
- "embed",e=c.embedtag.width||"auto",h=c.embedtag.height||"auto",p=k.replace(c.templateRegex,c.apiendpoint);c.nocache||(p+="&jqoemcache="+n(5));c.apikey&&(p=p.replace("_APIKEY_",j.apikeys[c.name]));if(j.maxHeight&&j.maxWidth)if(j.useResponsiveResize){var q=0,r=e,s=h;e>j.maxWidth&&(q=j.maxWidth/e,r=j.maxWidth,s=h*q,h*=q,e*=q);h>j.maxHeight&&(q=j.maxHeight/h,s=j.maxHeight,r=e*q,e*=q);h=s;e=r}else h=j.maxHeight,e=j.maxWidth;e=b("<"+f+"/>").attr("src",p).attr("width",e).attr("height",h).attr("allowfullscreen",
7
- c.embedtag.allowfullscreen||"true").attr("allowscriptaccess",c.embedtag.allowfullscreen||"always").css("max-height",j.maxHeight||"auto").css("max-width",j.maxWidth||"auto");"embed"==f&&e.attr("type",c.embedtag.type||"application/x-shockwave-flash").attr("flashvars",k.replace(c.templateRegex,d));"iframe"==f&&e.attr("scrolling",c.embedtag.scrolling||"no").attr("frameborder",c.embedtag.frameborder||"0");d={code:e};m(d,k,a)}else c.apiendpoint?(c.apikey&&(c.apiendpoint=c.apiendpoint.replace("_APIKEY_",
8
- j.apikeys[c.name])),d=b.extend({url:k.replace(c.templateRegex,c.apiendpoint),dataType:"jsonp",success:function(e){var f=b.extend({},e);f.code=c.templateData(e);m(f,k,a)},error:function(){j.onError.call(a,k,c)}},j.ajaxOptions||{}),b.ajax(d)):(d={code:k.replace(c.templateRegex,c.template)},m(d,k,a));else d=o(c,k),d=b.extend({url:d,dataType:c.dataType||"jsonp",success:function(c){c=b.extend({},c);switch(c.type){case "file":case "photo":c.code=b.fn.oembed.getPhotoCode(k,c);break;case "video":case "rich":c.code=
9
- b.fn.oembed.getRichCode(k,c);break;default:c.code=b.fn.oembed.getGenericCode(k,c)}m(c,k,a)},error:function(){j.onError.call(a,k,c)}},j.ajaxOptions||{}),b.ajax(d)}function p(a){if(null===a)return null;var b,c={};for(b in a)null!==b&&(c[b.toLowerCase()]=a[b]);return c}b.fn.oembed=function(a,k,c){j=b.extend(!0,b.fn.oembed.defaults,k);var l="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 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 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 clickthru.ca clop.in conta.cc cort.as cot.ag crks.me ctvr.us cutt.us dai.ly decenturl.com dfl8.me digbig.com http://digg.com/[^/]+$ disq.us dld.bz dlvr.it do.my doiop.com dopen.us easyuri.com easyurl.net eepurl.com eweri.com 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 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 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 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 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 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 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 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.ebay.com r.im rb6.me read.bi 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 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 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 sn.im snipr.com snipurl.com snurl.com sp2.ro spedr.com srnk.net srs.li starturl.com stks.co su.pr surl.co.uk surl.hu t.cn t.co t.lh.com 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 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 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 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 urlshorteningservicefortwitter.com urlx.ie urlzen.com usat.ly use.my vb.ly vevo.ly vgn.am vl.am vm.lc w55.de wapo.st wapurl.co.uk wipi.es 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 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".split(" ");
10
- 0===b("#jqoembeddata").length&&b('<span id="jqoembeddata"></span>').appendTo("body");return this.each(function(){var k=b(this),f=a&&(!a.indexOf("http://")||!a.indexOf("https://"))?a:k.attr("href"),e;c?j.onEmbed=c:j.onEmbed||(j.onEmbed=function(a){b.fn.oembed.insertCode(this,j.embedMethod,a)});if(null!==f&&void 0!==f){for(var h=0,m=l.length;h<m;h++)if(null!==f.match(RegExp("://"+l[h]+"/","i")))return h=b.extend({url:"http://api.longurl.org/v2/expand",dataType:"jsonp",data:{url:f,format:"json"},success:function(a){f=
11
- a["long-url"];e=b.fn.oembed.getOEmbedProvider(a["long-url"]);if(e!==null){e.params=p(j[e.name])||{};e.maxWidth=j.maxWidth;e.maxHeight=j.maxHeight;d(k,f,e)}else j.onProviderNotFound.call(k,f)}},j.ajaxOptions||{}),b.ajax(h),k;e=b.fn.oembed.getOEmbedProvider(f);null!==e?(e.params=p(j[e.name])||{},e.maxWidth=j.maxWidth,e.maxHeight=j.maxHeight,d(k,f,e)):j.onProviderNotFound.call(k,f)}return k})};var j;b.fn.oembed.defaults={maxWidth:null,maxHeight:null,useResponsiveResize:!1,includeHandle:!0,embedMethod:"auto",
12
- onProviderNotFound:function(){},beforeEmbed:function(){},afterEmbed:function(){},onEmbed:!1,onError:function(){},ajaxOptions:{timeout:2E3}};b.fn.oembed.insertCode=function(a,k,c){if(null!==c)switch("auto"==k&&null!==a.attr("href")?k="append":"auto"==k&&(k="replace"),k){case "replace":a.replaceWith(c.code);break;case "fill":a.html(c.code);break;case "append":a.wrap('<div class="oembedall-container"></div>');k=a.parent();j.includeHandle&&b('<span class="oembedall-closehide">&darr;</span>').insertBefore(a).click(function(){var a=
13
- encodeURIComponent(b(this).text());b(this).html("%E2%86%91"==a?"&darr;":"&uarr;");b(this).parent().children().last().toggle()});k.append("<br/>");try{c.code.clone().appendTo(k)}catch(d){k.append(c.code)}}};b.fn.oembed.getPhotoCode=function(a,b){var c;c=b.title?b.title:"";c+=b.author_name?" - "+b.author_name:"";c+=b.provider_name?" - "+b.provider_name:"";if(b.url)c='<div><a href="'+a+"\" target='_blank'><img src=\""+b.url+'" alt="'+c+'"/></a></div>';else if(b.thumbnail_url){var d=b.thumbnail_url.replace("_s",
14
- "_b");c='<div><a href="'+a+"\" target='_blank'><img src=\""+d+'" alt="'+c+'"/></a></div>'}else c="<div>Error loading this picture</div>";b.html&&(c+="<div>"+b.html+"</div>");return c};b.fn.oembed.getRichCode=function(a,b){return b.html};b.fn.oembed.getGenericCode=function(a,b){var c='<a href="'+a+'">'+(null!==b.title?b.title:a)+"</a>";b.html&&(c+="<div>"+b.html+"</div>");return c};b.fn.oembed.getOEmbedProvider=function(a){for(var d=0;d<b.fn.oembed.providers.length;d++)for(var c=0,j=b.fn.oembed.providers[d].urlschemes.length;c<
15
- j;c++)if(null!==a.match(RegExp(b.fn.oembed.providers[d].urlschemes[c],"i")))return b.fn.oembed.providers[d];return null};b.fn.oembed.OEmbedProvider=function(a,d,c,l,g){this.name=a;this.type=d;this.urlschemes=c;this.apiendpoint=l;this.maxWidth=500;this.maxHeight=400;g=g||{};g.useYQL&&(g.yql="xml"==g.useYQL?{xpath:"//oembed/html",from:"xml",apiendpoint:this.apiendpoint,url:function(a){return this.apiendpoint+"?format=xml&url="+a},datareturn:function(a){return a.html.replace(/.*\[CDATA\[(.*)\]\]>$/,
16
- "$1")||""}}:{from:"json",apiendpoint:this.apiendpoint,url:function(a){return this.apiendpoint+"?format=json&url="+a},datareturn:function(a){if("video"!=a.json.type&&(a.json.url||a.json.thumbnail_url))return'<img src="'+(a.json.url||a.json.thumbnail_url)+'" />';if(a.json.html.indexOf("iframe")){a.json.html.indexOf("allowfullscreen>")&&(a.json.html=a.json.html.replace("allowfullscreen>",'allowfullscreen="false">'));var a=b.parseHTML(a.json.html),c=a[0].width,d=a[0].height;if(j.maxHeight&&j.maxWidth)if(j.useResponsiveResize){var f,
17
- g=c,k=d;c>j.maxWidth&&(f=j.maxWidth/c,g=j.maxWidth,k=d*f,d*=f,c*=f);d>j.maxHeight&&(f=j.maxHeight/d,k=j.maxHeight,g=c*f);d=k;c=g}else d=j.maxHeight,c=j.maxWidth;a[0].width=c;a[0].height=d;return a[0].outerHTML}return a.json.html||""}},this.apiendpoint=null);for(var f in g)this[f]=g[f];this.format=this.format||"json";this.callbackparameter=this.callbackparameter||"callback";this.embedtag=this.embedtag||{tag:""}};b.fn.updateOEmbedProvider=function(a,d,c,j,g){for(var f=0;f<b.fn.oembed.providers.length;f++)if(b.fn.oembed.providers[f].name===
18
- a&&(null!==d&&(b.fn.oembed.providers[f].type=d),null!==c&&(b.fn.oembed.providers[f].urlschemes=c),null!==j&&(b.fn.oembed.providers[f].apiendpoint=j),null!==g)){b.fn.oembed.providers[f].extraSettings=g;for(var e in g)null!==g[e]&&(b.fn.oembed.providers[f][e]=g[e])}};b.fn.oembed.providers=[new b.fn.oembed.OEmbedProvider("youtube","video",["youtube\\.com/watch.+v=[\\w-]+&?","youtu\\.be/[\\w-]+"],l()+"www.youtube.com/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("youtubeiframe","video",["youtube.com/embed"],
19
- "$1?wmode=transparent",{templateRegex:/(.*)/,embedtag:{tag:"iframe",width:"425",height:"349"}}),new b.fn.oembed.OEmbedProvider("wistia","video",["wistia.com/m/.+","wistia.com/embed/.+","wi.st/m/.+","wi.st/embed/.+"],"http://fast.wistia.com/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("xtranormal","video",["xtranormal\\.com/watch/.+"],"http://www.xtranormal.com/xtraplayr/$1/$2",{templateRegex:/.*com\/watch\/([\w\-]+)\/([\w\-]+).*/,embedtag:{tag:"iframe",width:"320",height:"269"}}),new b.fn.oembed.OEmbedProvider("scivee",
20
- "video",["scivee.tv/node/.+"],"http://www.scivee.tv/flash/embedCast.swf?",{templateRegex:/.*tv\/node\/(.+)/,embedtag:{width:"480",height:"400",flashvars:"id=$1&type=3"}}),new b.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",{templateRegex:/.*watch\/([^\?]+).*/,embedtag:{width:"410",height:"341"}}),new b.fn.oembed.OEmbedProvider("gametrailers",
21
- "video",["gametrailers\\.com/video/.+"],"http://media.mtvnservices.com/mgid:moses:video:gametrailers.com:$2",{templateRegex:/.*com\/video\/([\w\-]+)\/([\w\-]+).*/,embedtag:{width:"512",height:"288"}}),new b.fn.oembed.OEmbedProvider("funnyordie","video",["funnyordie\\.com/videos/.+"],"http://player.ordienetworks.com/flash/fodplayer.swf?",{templateRegex:/.*videos\/([^\/]+)\/([^\/]+)?/,embedtag:{width:512,height:328,flashvars:"key=$1"}}),new b.fn.oembed.OEmbedProvider("colledgehumour","video",["collegehumor\\.com/video/.+"],
22
- "http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=$1&use_node_id=true&fullscreen=1",{templateRegex:/.*video\/([^\/]+).*/,embedtag:{width:600,height:338}}),new b.fn.oembed.OEmbedProvider("metacafe","video",["metacafe\\.com/watch/.+"],"http://www.metacafe.com/fplayer/$1/$2.swf",{templateRegex:/.*watch\/(\d+)\/(\w+)\/.*/,embedtag:{width:400,height:345}}),new b.fn.oembed.OEmbedProvider("bambuser","video",["bambuser\\.com/channel/.*/broadcast/.*"],"http://static.bambuser.com/r/player.swf?vid=$1",
23
- {templateRegex:/.*bambuser\.com\/channel\/.*\/broadcast\/(\w+).*/,embedtag:{width:512,height:339}}),new b.fn.oembed.OEmbedProvider("twitvid","video",["twitvid\\.com/.+"],"http://www.twitvid.com/embed.php?guid=$1&autoplay=0",{templateRegex:/.*twitvid\.com\/(\w+).*/,embedtag:{tag:"iframe",width:480,height:360}}),new b.fn.oembed.OEmbedProvider("aniboom","video",["aniboom\\.com/animation-video/.+"],"http://api.aniboom.com/e/$1",{templateRegex:/.*animation-video\/(\d+).*/,embedtag:{width:594,height:334}}),
24
- new b.fn.oembed.OEmbedProvider("vzaar","video",["vzaar\\.com/videos/.+","vzaar.tv/.+"],"http://view.vzaar.com/$1/player?",{templateRegex:/.*\/(\d+).*/,embedtag:{tag:"iframe",width:576,height:324}}),new b.fn.oembed.OEmbedProvider("snotr","video",["snotr\\.com/video/.+"],"http://www.snotr.com/embed/$1",{templateRegex:/.*\/(\d+).*/,embedtag:{tag:"iframe",width:400,height:330,nocache:1}}),new b.fn.oembed.OEmbedProvider("youku","video",["v.youku.com/v_show/id_.+"],"http://player.youku.com/player.php/sid/$1/v.swf",
25
- {templateRegex:/.*id_(.+)\.html.*/,embedtag:{width:480,height:400,nocache:1}}),new b.fn.oembed.OEmbedProvider("tudou","video",["tudou.com/programs/view/.+/"],"http://www.tudou.com/v/$1/v.swf",{templateRegex:/.*view\/(.+)\//,embedtag:{width:480,height:400,nocache:1}}),new b.fn.oembed.OEmbedProvider("embedr","video",["embedr\\.com/playlist/.+"],"http://embedr.com/swf/slider/$1/425/520/default/false/std?",{templateRegex:/.*playlist\/([^\/]+).*/,embedtag:{width:425,height:520}}),new b.fn.oembed.OEmbedProvider("blip",
26
- "video",["blip\\.tv/.+"],"http://blip.tv/oembed/"),new b.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"}),new b.fn.oembed.OEmbedProvider("animoto","video",["animoto.com/play/.+"],"http://animoto.com/services/oembed"),new b.fn.oembed.OEmbedProvider("hulu","video",["hulu\\.com/watch/.*"],
27
- "http://www.hulu.com/api/oembed.json"),new b.fn.oembed.OEmbedProvider("ustream","video",["ustream\\.tv/recorded/.*"],"http://www.ustream.tv/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("videojug","video",["videojug\\.com/(film|payer|interview).*"],"http://www.videojug.com/oembed.json",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("sapo","video",["videos\\.sapo\\.pt/.*"],"http://videos.sapo.pt/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("vodpod","video",["vodpod.com/watch/.*"],
28
- "http://vodpod.com/oembed.js",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("vimeo","video",["www.vimeo.com/groups/.*/videos/.*","www.vimeo.com/.*","vimeo.com/groups/.*/videos/.*","vimeo.com/.*"],"//vimeo.com/api/oembed.json"),new b.fn.oembed.OEmbedProvider("dailymotion","video",["dailymotion\\.com/.+"],"http://www.dailymotion.com/services/oembed"),new b.fn.oembed.OEmbedProvider("5min","video",["www\\.5min\\.com/.+"],"http://api.5min.com/oembed.xml",{useYQL:"xml"}),new b.fn.oembed.OEmbedProvider("National Film Board of Canada",
29
- "video",["nfb\\.ca/film/.+"],"http://www.nfb.ca/remote/services/oembed/",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("qik","video",["qik\\.com/\\w+"],"http://qik.com/api/oembed.json",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("revision3","video",["revision3\\.com"],"http://revision3.com/api/oembed/"),new b.fn.oembed.OEmbedProvider("dotsub","video",["dotsub\\.com/view/.+"],"http://dotsub.com/services/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("clikthrough","video",["clikthrough\\.com/theater/video/\\d+"],
30
- "http://clikthrough.com/services/oembed"),new b.fn.oembed.OEmbedProvider("Kinomap","video",["kinomap\\.com/.+"],"http://www.kinomap.com/oembed"),new b.fn.oembed.OEmbedProvider("VHX","video",["vhx.tv/.+"],"http://vhx.tv/services/oembed.json"),new b.fn.oembed.OEmbedProvider("bambuser","video",["bambuser.com/.+"],"http://api.bambuser.com/oembed/iframe.json"),new b.fn.oembed.OEmbedProvider("justin.tv","video",["justin.tv/.+"],"http://api.justin.tv/api/embed/from_url.json",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("official.fm",
31
- "rich",["official.fm/.+"],"http://official.fm/services/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("chirbit","rich",["chirb.it/.+"],"http://chirb.it/oembed.json",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("Huffduffer","rich",["huffduffer.com/[-.\\w@]+/\\d+"],"http://huffduffer.com/oembed"),new b.fn.oembed.OEmbedProvider("Spotify","rich",["open.spotify.com/(track|album|user)/"],"https://embed.spotify.com/oembed/"),new b.fn.oembed.OEmbedProvider("shoudio","rich",["shoudio.com/.+","shoud.io/.+"],
32
- "http://shoudio.com/api/oembed"),new b.fn.oembed.OEmbedProvider("mixcloud","rich",["mixcloud.com/.+"],l()+"www.mixcloud.com/oembed/",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("rdio.com","rich",["rd.io/.+","rdio.com"],l()+"www.rdio.com/api/oembed/"),new b.fn.oembed.OEmbedProvider("Soundcloud","rich",["soundcloud.com/.+","snd.sc/.+"],l()+"soundcloud.com/oembed",{format:"js"}),new b.fn.oembed.OEmbedProvider("bandcamp","rich",["bandcamp\\.com/album/.+"],null,{yql:{xpath:"//meta[contains(@content, \\'EmbeddedPlayer\\')]",
33
- from:"html",datareturn:function(a){return a.meta?'<iframe width="400" height="100" src="'+a.meta.content+'" allowtransparency="true" frameborder="0"></iframe>':!1}}}),new b.fn.oembed.OEmbedProvider("deviantart","photo",["deviantart.com/.+","fav.me/.+","deviantart.com/.+"],"http://backend.deviantart.com/oembed",{format:"jsonp"}),new b.fn.oembed.OEmbedProvider("skitch","photo",["skitch.com/.+"],null,{yql:{xpath:"json",from:"json",url:function(a){return"http://skitch.com/oembed/?format=json&url="+a},
34
- datareturn:function(a){return b.fn.oembed.getPhotoCode(a.json.url,a.json)}}}),new b.fn.oembed.OEmbedProvider("mobypicture","photo",["mobypicture.com/user/.+/view/.+","moby.to/.+"],"http://api.mobypicture.com/oEmbed"),new b.fn.oembed.OEmbedProvider("flickr","photo",["flickr\\.com/photos/.+"],"http://flickr.com/services/oembed",{callbackparameter:"jsoncallback"}),new b.fn.oembed.OEmbedProvider("photobucket","photo",["photobucket\\.com/(albums|groups)/.+"],l()+"photobucket.com/oembed/"),new b.fn.oembed.OEmbedProvider("instagram",
35
- "photo",["instagr\\.?am(\\.com)?/.+"],l()+"api.instagram.com/oembed"),new b.fn.oembed.OEmbedProvider("SmugMug","photo",["smugmug.com/[-.\\w@]+/.+"],"http://api.smugmug.com/services/oembed/"),new b.fn.oembed.OEmbedProvider("dribbble","photo",["dribbble.com/shots/.+"],"http://api.dribbble.com/shots/$1?callback=?",{templateRegex:/.*shots\/([\d]+).*/,templateData:function(a){return!a.image_teaser_url?!1:'<img src="'+a.image_teaser_url+'"/>'}}),new b.fn.oembed.OEmbedProvider("chart.ly","photo",["chart\\.ly/[a-z0-9]{6,8}"],
36
- "http://chart.ly/uploads/large_$1.png",{templateRegex:/.*ly\/([^\/]+).*/,embedtag:{tag:"img"},nocache:1}),new b.fn.oembed.OEmbedProvider("circuitlab","photo",["circuitlab.com/circuit/.+"],"https://www.circuitlab.com/circuit/$1/screenshot/540x405/",{templateRegex:/.*circuit\/([^\/]+).*/,embedtag:{tag:"img"},nocache:1}),new b.fn.oembed.OEmbedProvider("23hq","photo",["23hq.com/[-.\\w@]+/photo/.+"],"http://www.23hq.com/23/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("img.ly","photo",["img\\.ly/.+"],
37
- "http://img.ly/show/thumb/$1",{templateRegex:/.*ly\/([^\/]+).*/,embedtag:{tag:"img"},nocache:1}),new b.fn.oembed.OEmbedProvider("twitgoo.com","photo",["twitgoo\\.com/.+"],"http://twitgoo.com/show/thumb/$1",{templateRegex:/.*com\/([^\/]+).*/,embedtag:{tag:"img"},nocache:1}),new b.fn.oembed.OEmbedProvider("imgur.com","photo",["imgur\\.com/gallery/.+"],l()+"imgur.com/$1l.jpg",{templateRegex:/.*gallery\/([^\/]+).*/,embedtag:{tag:"img"},nocache:1}),new b.fn.oembed.OEmbedProvider("visual.ly","rich",["visual\\.ly/.+"],
38
- null,{yql:{xpath:"//a[@id=\\'gc_article_graphic_image\\']/img",from:"htmlstring"}}),new b.fn.oembed.OEmbedProvider("gravtar","photo",["mailto:.+"],null,{templateRegex:/mailto:([^\/]+).*/,template:function(a,b){return'<img src="http://gravatar.com/avatar/'+b.md5()+'.jpg" alt="on Gravtar" class="jqoaImg">'}}),new b.fn.oembed.OEmbedProvider("twitter","rich",["twitter.com/.+"],"https://api.twitter.com/1/statuses/oembed.json"),new b.fn.oembed.OEmbedProvider("gmep","rich",["gmep.imeducate.com/.*","gmep.org/.*"],
39
- "http://gmep.org/oembed.json"),new b.fn.oembed.OEmbedProvider("urtak","rich",["urtak.com/(u|clr)/.+"],"http://oembed.urtak.com/1/oembed"),new b.fn.oembed.OEmbedProvider("cacoo","rich",["cacoo.com/.+"],"http://cacoo.com/oembed.json"),new b.fn.oembed.OEmbedProvider("dailymile","rich",["dailymile.com/people/.*/entries/.*"],"http://api.dailymile.com/oembed"),new b.fn.oembed.OEmbedProvider("dipity","rich",["dipity.com/timeline/.+"],"http://www.dipity.com/oembed/timeline/",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("sketchfab",
40
- "rich",["sketchfab.com/show/.+"],"http://sketchfab.com/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("speakerdeck","rich",["speakerdeck.com/.+"],"http://speakerdeck.com/oembed.json",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("popplet","rich",["popplet.com/app/.*"],"http://popplet.com/app/Popplet_Alpha.swf?page_id=$1&em=1",{templateRegex:/.*#\/([^\/]+).*/,embedtag:{width:460,height:460}}),new b.fn.oembed.OEmbedProvider("pearltrees","rich",["pearltrees.com/.*"],"http://cdn.pearltrees.com/s/embed/getApp?",
41
- {templateRegex:/.*N-f=1_(\d+).*N-p=(\d+).*/,embedtag:{width:460,height:460,flashvars:"lang=en_US&amp;embedId=pt-embed-$1-693&amp;treeId=$1&amp;pearlId=$2&amp;treeTitle=Diagrams%2FVisualization&amp;site=www.pearltrees.com%2FF"}}),new b.fn.oembed.OEmbedProvider("prezi","rich",["prezi.com/.*"],"http://prezi.com/bin/preziloader.swf?",{templateRegex:/.*com\/([^\/]+)\/.*/,embedtag:{width:550,height:400,flashvars:"prezi_id=$1&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0"}}),new b.fn.oembed.OEmbedProvider("tourwrist",
42
- "rich",["tourwrist.com/tours/.+"],null,{templateRegex:/.*tours.([\d]+).*/,template:function(a,b){setTimeout(function(){loadEmbeds&&loadEmbeds()},2E3);return"<div id='"+b+"' class='tourwrist-tour-embed direct'></div> <script type='text/javascript' src='http://tourwrist.com/tour_embed.js'><\/script>"}}),new b.fn.oembed.OEmbedProvider("meetup","rich",["meetup\\.(com|ps)/.+"],l()+"api.meetup.com/oembed"),new b.fn.oembed.OEmbedProvider("ebay","rich",["ebay\\.*"],l()+"togo.ebay.com/togo/togo.swf?2008013100",
43
- {templateRegex:/.*\/([^\/]+)\/(\d{10,13}).*/,embedtag:{width:355,height:300,flashvars:"base=http://togo.ebay.com/togo/&lang=en-us&mode=normal&itemid=$2&query=$1"}}),new b.fn.oembed.OEmbedProvider("wikipedia","rich",["wikipedia.org/wiki/.+"],"http://$1.wikipedia.org/w/api.php?action=parse&page=$2&format=json&section=0&callback=?",{templateRegex:/.*\/\/([\w]+).*\/wiki\/([^\/]+).*/,templateData:function(a){if(!a.parse)return!1;var b=a.parse.text["*"].replace(/href="\/wiki/g,'href="http://en.wikipedia.org/wiki');
44
- return'<div id="content"><h3><a class="nav-link" href="http://en.wikipedia.org/wiki/'+a.parse.displaytitle+'">'+a.parse.displaytitle+"</a></h3>"+b+"</div>"}}),new b.fn.oembed.OEmbedProvider("imdb","rich",["imdb.com/title/.+"],"http://www.imdbapi.com/?i=$1&callback=?",{templateRegex:/.*\/title\/([^\/]+).*/,templateData:function(a){return!a.Title?!1:'<div id="content"><h3><a class="nav-link" href="http://imdb.com/title/'+a.ID+'/">'+a.Title+"</a> ("+a.Year+")</h3><p>Starring: "+a.Actors+'</p><div id="photo-wrap" style="margin: auto;width:600px;height:450px;"><img class="photo" id="photo-display" src="'+
45
- a.Poster+'" alt="'+a.Title+'"></div> <div id="view-photo-caption">'+a.Plot+"</div></div>"}}),new b.fn.oembed.OEmbedProvider("livejournal","rich",["livejournal.com/"],"http://ljpic.seacrow.com/json/$2$4?jsonp=?",{templateRegex:/(http:\/\/(((?!users).)+)\.livejournal\.com|.*users\.livejournal\.com\/([^\/]+)).*/,templateData:function(a){return!a.username?!1:'<div><img src="'+a.image+'" align="left" style="margin-right: 1em;" /><span class="oembedall-ljuser"><a href="http://'+a.username+'.livejournal.com/profile"><img src="http://www.livejournal.com/img/userinfo.gif" alt="[info]" width="17" height="17" /></a><a href="http://'+
46
- a.username+'.livejournal.com/">'+a.username+"</a></span><br />"+a.name+"</div>"}}),new b.fn.oembed.OEmbedProvider("circuitbee","rich",["circuitbee\\.com/circuit/view/.+"],"http://c.circuitbee.com/build/r/schematic-embed.html?id=$1",{templateRegex:/.*circuit\/view\/(\d+).*/,embedtag:{tag:"iframe",width:"500",height:"350"}}),new b.fn.oembed.OEmbedProvider("googlecalendar","rich",["www.google.com/calendar/embed?.+"],"$1",{templateRegex:/(.*)/,embedtag:{tag:"iframe",width:"800",height:"600"}}),new b.fn.oembed.OEmbedProvider("jsfiddle",
47
- "rich",["jsfiddle.net/[^/]+/?"],"http://jsfiddle.net/$1/embedded/result,js,resources,html,css/?",{templateRegex:/.*net\/([^\/]+).*/,embedtag:{tag:"iframe",width:"100%",height:"300"}}),new b.fn.oembed.OEmbedProvider("jsbin","rich",["jsbin.com/.+"],"http://jsbin.com/$1/?",{templateRegex:/.*com\/([^\/]+).*/,embedtag:{tag:"iframe",width:"100%",height:"300"}}),new b.fn.oembed.OEmbedProvider("jotform","rich",["form.jotform.co/form/.+"],"$1?",{templateRegex:/(.*)/,embedtag:{tag:"iframe",width:"100%",height:"507"}}),
48
- new b.fn.oembed.OEmbedProvider("reelapp","rich",["reelapp\\.com/.+"],"http://www.reelapp.com/$1/embed",{templateRegex:/.*com\/(\S{6}).*/,embedtag:{tag:"iframe",width:"400",height:"338"}}),new b.fn.oembed.OEmbedProvider("linkedin","rich",["linkedin.com/pub/.+"],"https://www.linkedin.com/cws/member/public_profile?public_profile_url=$1&format=inline&isFramed=true",{templateRegex:/(.*)/,embedtag:{tag:"iframe",width:"368px",height:"auto"}}),new b.fn.oembed.OEmbedProvider("timetoast","rich",["timetoast.com/timelines/[0-9]+"],
49
- "http://www.timetoast.com/flash/TimelineViewer.swf?passedTimelines=$1",{templateRegex:/.*timelines\/([0-9]*)/,embedtag:{width:550,height:400,nocache:1}}),new b.fn.oembed.OEmbedProvider("pastebin","rich",["pastebin\\.com/[\\S]{8}"],"http://pastebin.com/embed_iframe.php?i=$1",{templateRegex:/.*\/(\S{8}).*/,embedtag:{tag:"iframe",width:"100%",height:"auto"}}),new b.fn.oembed.OEmbedProvider("mixlr","rich",["mixlr.com/.+"],"http://mixlr.com/embed/$1?autoplay=ae",{templateRegex:/.*com\/([^\/]+).*/,embedtag:{tag:"iframe",
50
- width:"100%",height:"auto"}}),new b.fn.oembed.OEmbedProvider("pastie","rich",["pastie\\.org/pastes/.+"],null,{yql:{xpath:'//pre[@class="textmate-source"]'}}),new b.fn.oembed.OEmbedProvider("github","rich",["gist.github.com/.+"],"https://github.com/api/oembed"),new b.fn.oembed.OEmbedProvider("github","rich",["github.com/[-.\\w@]+/[-.\\w@]+"],"https://api.github.com/repos/$1/$2?callback=?",{templateRegex:/.*\/([^\/]+)\/([^\/]+).*/,templateData:function(a){return!a.data.html_url?!1:'<div class="oembedall-githubrepos"><ul class="oembedall-repo-stats"><li>'+
51
- a.data.language+'</li><li class="oembedall-watchers"><a title="Watchers" href="'+a.data.html_url+'/watchers">&#x25c9; '+a.data.watchers+'</a></li><li class="oembedall-forks"><a title="Forks" href="'+a.data.html_url+'/network">&#x0265; '+a.data.forks+'</a></li></ul><h3><a href="'+a.data.html_url+'">'+a.data.name+'</a></h3><div class="oembedall-body"><p class="oembedall-description">'+a.data.description+'</p><p class="oembedall-updated-at">Last updated: '+a.data.pushed_at+"</p></div></div>"}}),new b.fn.oembed.OEmbedProvider("facebook",
52
- "rich",["facebook.com/(people/[^\\/]+/\\d+|[^\\/]+$)"],"https://graph.facebook.com/$2$3/?callback=?",{templateRegex:/.*facebook.com\/(people\/[^\/]+\/(\d+).*|([^\/]+$))/,templateData:function(a){if(!a.id)return!1;var b='<div class="oembedall-facebook1"><div class="oembedall-facebook2"><a href="http://www.facebook.com/">facebook</a> ',b=a.from?b+('<a href="http://www.facebook.com/'+a.from.id+'">'+a.from.name+"</a>"):a.link?b+('<a href="'+a.link+'">'+a.name+"</a>"):a.username?b+('<a href="http://www.facebook.com/'+
53
- a.username+'">'+a.name+"</a>"):b+('<a href="http://www.facebook.com/'+a.id+'">'+a.name+"</a>"),b=b+'</div><div class="oembedall-facebookBody"><div class="contents">',b=a.picture?b+('<a href="'+a.link+'"><img src="'+a.picture+'"></a>'):b+('<img src="https://graph.facebook.com/'+a.id+'/picture">');a.from&&(b+='<a href="'+a.link+'">'+a.name+"</a>");a.founded&&(b+="Founded: <strong>"+a.founded+"</strong><br>");a.category&&(b+="Category: <strong>"+a.category+"</strong><br>");a.website&&(b+='Website: <strong><a href="'+
54
- a.website+'">'+a.website+"</a></strong><br>");a.gender&&(b+="Gender: <strong>"+a.gender+"</strong><br>");a.description&&(b+=a.description+"<br>");return b+"</div></div>"}}),new b.fn.oembed.OEmbedProvider("stackoverflow","rich",["stackoverflow.com/questions/[\\d]+"],"http://api.stackoverflow.com/1.1/questions/$1?body=true&jsonp=?",{templateRegex:/.*questions\/([\d]+).*/,templateData:function(a){if(!a.questions)return!1;var a=a.questions[0],d=b(a.body).text(),d='<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"><span class="oembedall-vote-count-post"><strong>'+
55
- (a.up_vote_count-a.down_vote_count)+'</strong></span><div class="oembedall-viewcount">vote(s)</div></div></div><div class="oembedall-status"><strong>'+a.answer_count+'</strong>answer</div></div><div class="oembedall-views">'+a.view_count+' view(s)</div></div><div class="oembedall-summary"><h3><a class="oembedall-question-hyperlink" href="http://stackoverflow.com/questions/'+a.question_id+'/">'+a.title+'</a></h3><div class="oembedall-excerpt">'+d.substring(0,100)+'...</div><div class="oembedall-tags">';
56
- for(i in a.tags)d+='<a title="" class="oembedall-post-tag" href="http://stackoverflow.com/questions/tagged/'+a.tags[i]+'">'+a.tags[i]+"</a>";return d+='</div><div class="oembedall-fr"><div class="oembedall-user-info"><div class="oembedall-user-gravatar32"><a href="http://stackoverflow.com/users/'+a.owner.user_id+"/"+a.owner.display_name+'"><img width="32" height="32" alt="" src="http://www.gravatar.com/avatar/'+a.owner.email_hash+'?s=32&amp;d=identicon&amp;r=PG"></a></div><div class="oembedall-user-details"><a href="http://stackoverflow.com/users/'+
57
- a.owner.user_id+"/"+a.owner.display_name+'">'+a.owner.display_name+'</a><br><span title="reputation score" class="oembedall-reputation-score">'+a.owner.reputation+"</span></div></div></div></div></div>"}}),new b.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"),new b.fn.oembed.OEmbedProvider("screenr","rich",["screenr.com"],"http://www.screenr.com/embed/$1",
58
- {templateRegex:/.*\/([^\/]+).*/,embedtag:{tag:"iframe",width:"650",height:396}}),new b.fn.oembed.OEmbedProvider("gigpans","rich",["gigapan\\.org/[-.\\w@]+/\\d+"],"http://gigapan.org/gigapans/$1/options/nosnapshots/iframe/flash.html",{templateRegex:/.*\/(\d+)\/?.*/,embedtag:{tag:"iframe",width:"100%",height:400}}),new b.fn.oembed.OEmbedProvider("scribd","rich",["scribd\\.com/.+"],l()+"www.scribd.com/embeds/$1/content?start_page=1&view_mode=list",{templateRegex:/.*doc\/([^\/]+).*/,embedtag:{tag:"iframe",
59
- width:"100%",height:600}}),new b.fn.oembed.OEmbedProvider("kickstarter","rich",["kickstarter\\.com/projects/.+"],"$1/widget/card.html",{templateRegex:/([^\?]+).*/,embedtag:{tag:"iframe",width:"220",height:380}}),new b.fn.oembed.OEmbedProvider("amazon","rich",["amzn.com/B+","amazon.com.*/(B\\S+)($|\\/.*)"],l()+"rcm.amazon.com/e/cm?t=_APIKEY_&o=1&p=8&l=as1&asins=$1&ref=qf_br_asin_til&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr",{apikey:!0,templateRegex:/.*\/(B[0-9A-Z]+)($|\/.*)/,
60
- embedtag:{tag:"iframe",width:"120px",height:"240px"}}),new b.fn.oembed.OEmbedProvider("slideshare","rich",["slideshare.net"],l()+"www.slideshare.net/api/oembed/2",{format:"jsonp"}),new b.fn.oembed.OEmbedProvider("roomsharejp","rich",["roomshare\\.jp/(en/)?post/.*"],"http://roomshare.jp/oembed.json"),new b.fn.oembed.OEmbedProvider("lanyard","rich",["lanyrd.com/\\d+/.+"],null,{yql:{xpath:'(//div[@class="primary"])[1]',from:"htmlstring",datareturn:function(a){return!a.result?!1:'<div class="oembedall-lanyard">'+
61
- a.result+"</div>"}}}),new b.fn.oembed.OEmbedProvider("asciiartfarts","rich",["asciiartfarts.com/\\d+.html"],null,{yql:{xpath:"//pre/font",from:"htmlstring",datareturn:function(a){return!a.result?!1:'<pre style="background-color:000;">'+a.result+"</div>"}}}),new b.fn.oembed.OEmbedProvider("opengraph","rich",[".*"],null,{yql:{xpath:"//meta|//title|//link",from:"html",datareturn:function(a){!a["og:title"]&&(a.title&&a.description)&&(a["og:title"]=a.title);if(!a["og:title"]&&!a.title)return!1;var d=b("<p/>");
62
- if(a["og:video"]){var c=b('<embed src="'+a["og:video"]+'"/>');c.attr("type",a["og:video:type"]||"application/x-shockwave-flash").css("max-height",j.maxHeight||"auto").css("max-width",j.maxWidth||"auto");a["og:video:width"]&&c.attr("width",a["og:video:width"]);a["og:video:height"]&&c.attr("height",a["og:video:height"]);d.append(c)}else a["og:image"]&&(c=b('<img src="'+a["og:image"]+'">'),c.css("max-height",j.maxHeight||"auto").css("max-width",j.maxWidth||"auto"),a["og:image:width"]&&c.attr("width",
63
- a["og:image:width"]),a["og:image:height"]&&c.attr("height",a["og:image:height"]),d.append(c));a["og:title"]&&d.append("<b>"+a["og:title"]+"</b><br/>");a["og:description"]?d.append(a["og:description"]+"<br/>"):a.description&&d.append(a.description+"<br/>");return d}}})]})(jQuery);
64
- String.prototype.md5=function(){var b=function(b,l){var j=(b&65535)+(l&65535);return(b>>16)+(l>>16)+(j>>16)<<16|j&65535},l=function(d,l,j,a,k,c){d=b(b(l,d),b(a,c));return b(d<<k|d>>>32-k,j)},n=function(b,p,j,a,k,c,m){return l(p&j|~p&a,b,p,k,c,m)},o=function(b,p,j,a,k,c,m){return l(p&a|j&~a,b,p,k,c,m)},m=function(b,m,j,a,k,c,n){return l(j^(m|~a),b,m,k,c,n)};return function(b){var l="",j,a=4*b.length;for(j=0;j<a;j++)l+="0123456789abcdef".charAt(b[j>>2]>>8*(j%4)+4&15)+"0123456789abcdef".charAt(b[j>>
65
- 2]>>8*(j%4)&15);return l}(function(d){var p,j,a,k,c,t=d.length,g=1732584193,f=-271733879,e=-1732584194,h=271733878;for(c=0;c<t;c+=16)p=g,j=f,a=e,k=h,g=n(g,f,e,h,d[c+0],7,-680876936),h=n(h,g,f,e,d[c+1],12,-389564586),e=n(e,h,g,f,d[c+2],17,606105819),f=n(f,e,h,g,d[c+3],22,-1044525330),g=n(g,f,e,h,d[c+4],7,-176418897),h=n(h,g,f,e,d[c+5],12,1200080426),e=n(e,h,g,f,d[c+6],17,-1473231341),f=n(f,e,h,g,d[c+7],22,-45705983),g=n(g,f,e,h,d[c+8],7,1770035416),h=n(h,g,f,e,d[c+9],12,-1958414417),e=n(e,h,g,f,d[c+
66
- 10],17,-42063),f=n(f,e,h,g,d[c+11],22,-1990404162),g=n(g,f,e,h,d[c+12],7,1804603682),h=n(h,g,f,e,d[c+13],12,-40341101),e=n(e,h,g,f,d[c+14],17,-1502002290),f=n(f,e,h,g,d[c+15],22,1236535329),g=o(g,f,e,h,d[c+1],5,-165796510),h=o(h,g,f,e,d[c+6],9,-1069501632),e=o(e,h,g,f,d[c+11],14,643717713),f=o(f,e,h,g,d[c+0],20,-373897302),g=o(g,f,e,h,d[c+5],5,-701558691),h=o(h,g,f,e,d[c+10],9,38016083),e=o(e,h,g,f,d[c+15],14,-660478335),f=o(f,e,h,g,d[c+4],20,-405537848),g=o(g,f,e,h,d[c+9],5,568446438),h=o(h,g,f,
67
- e,d[c+14],9,-1019803690),e=o(e,h,g,f,d[c+3],14,-187363961),f=o(f,e,h,g,d[c+8],20,1163531501),g=o(g,f,e,h,d[c+13],5,-1444681467),h=o(h,g,f,e,d[c+2],9,-51403784),e=o(e,h,g,f,d[c+7],14,1735328473),f=o(f,e,h,g,d[c+12],20,-1926607734),g=l(f^e^h,g,f,d[c+5],4,-378558),h=l(g^f^e,h,g,d[c+8],11,-2022574463),e=l(h^g^f,e,h,d[c+11],16,1839030562),f=l(e^h^g,f,e,d[c+14],23,-35309556),g=l(f^e^h,g,f,d[c+1],4,-1530992060),h=l(g^f^e,h,g,d[c+4],11,1272893353),e=l(h^g^f,e,h,d[c+7],16,-155497632),f=l(e^h^g,f,e,d[c+10],
68
- 23,-1094730640),g=l(f^e^h,g,f,d[c+13],4,681279174),h=l(g^f^e,h,g,d[c+0],11,-358537222),e=l(h^g^f,e,h,d[c+3],16,-722521979),f=l(e^h^g,f,e,d[c+6],23,76029189),g=l(f^e^h,g,f,d[c+9],4,-640364487),h=l(g^f^e,h,g,d[c+12],11,-421815835),e=l(h^g^f,e,h,d[c+15],16,530742520),f=l(e^h^g,f,e,d[c+2],23,-995338651),g=m(g,f,e,h,d[c+0],6,-198630844),h=m(h,g,f,e,d[c+7],10,1126891415),e=m(e,h,g,f,d[c+14],15,-1416354905),f=m(f,e,h,g,d[c+5],21,-57434055),g=m(g,f,e,h,d[c+12],6,1700485571),h=m(h,g,f,e,d[c+3],10,-1894986606),
69
- e=m(e,h,g,f,d[c+10],15,-1051523),f=m(f,e,h,g,d[c+1],21,-2054922799),g=m(g,f,e,h,d[c+8],6,1873313359),h=m(h,g,f,e,d[c+15],10,-30611744),e=m(e,h,g,f,d[c+6],15,-1560198380),f=m(f,e,h,g,d[c+13],21,1309151649),g=m(g,f,e,h,d[c+4],6,-145523070),h=m(h,g,f,e,d[c+11],10,-1120210379),e=m(e,h,g,f,d[c+2],15,718787259),f=m(f,e,h,g,d[c+9],21,-343485551),g=b(g,p),f=b(f,j),e=b(e,a),h=b(h,k);return[g,f,e,h]}(function(b){var l=(b.length+8>>6)+1,j=[],a,k=16*l,c=b.length;for(a=0;a<k;a++)j.push(0);for(a=0;a<c;a++)j[a>>
70
- 2]|=(b.charCodeAt(a)&255)<<8*(a%4);j[a>>2]|=128<<8*(a%4);j[16*l-2]=8*c;return j}(this)))};
@@ -1,71 +0,0 @@
1
- (function(b){function m(){var a=window.location.protocol;return"file:"===a?"http://":a+"//"}function o(a,b){return b=b?b:"",a?o(--a,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".charAt(Math.floor(60*Math.random()))+b):b}function q(a,b){var h=a.apiendpoint,d="",c,h=h+(0>=h.indexOf("?")?"?":"&"),h=h.replace("#","%23");null!==a.maxWidth&&("undefined"==typeof a.params.maxwidth||null===a.params.maxwidth)&&(a.params.maxwidth=a.maxWidth);null!==a.maxHeight&&("undefined"==typeof a.params.maxheight||
2
- null===a.params.maxheight)&&(a.params.maxheight=a.maxHeight);for(c in a.params)c!=a.callbackparameter&&null!==a.params[c]&&(d+="&"+escape(c)+"="+a.params[c]);return h+="format="+a.format+"&url="+escape(b)+d,"json"!=a.dataType&&(h+="&"+a.callbackparameter+"=?"),h}function n(a,l,h){b("#jqoembeddata").data(l,a.code);j.beforeEmbed.call(h,a);j.onEmbed.call(h,a);j.afterEmbed.call(h,a)}function e(a,l,h){var d,c,f;if(void 0!=b("#jqoembeddata").data(l)&&"iframe"!=h.embedtag.tag)c={code:b("#jqoembeddata").data(l)},
3
- n(c,l,a);else if(h.yql){c=h.yql.from||"htmlstring";var g=h.yql.url?h.yql.url(l):l;f="SELECT * FROM "+c+' WHERE url="'+g+'" and '+(/html/.test(c)?"xpath":"itemPath")+"='"+(h.yql.xpath||"/")+"'";"html"==c&&(f+=" and compat='html5'");f=b.extend({url:m()+"query.yahooapis.com/v1/public/yql",dataType:"jsonp",data:{q:f,format:"json",env:"store://datatables.org/alltableswithkeys",callback:"?"},success:function(c){var d,f,e,k,j;if(h.yql.xpath&&"//meta|//title|//link"==h.yql.xpath){d={};null==c.query.results&&
4
- (c.query.results={meta:[]});e=0;for(k=c.query.results.meta.length;e<k;e++)(f=c.query.results.meta[e].name||c.query.results.meta[e].property||null,null!=f)&&(d[f.toLowerCase()]=c.query.results.meta[e].content);if(d.hasOwnProperty("title")&&d.hasOwnProperty("og:title")||null!=c.query.results.title&&(d.title=c.query.results.title),!d.hasOwnProperty("og:image")&&c.query.results.hasOwnProperty("link")){e=0;for(k=c.query.results.link.length;e<k;e++)c.query.results.link[e].hasOwnProperty("rel")&&"apple-touch-icon"==
5
- c.query.results.link[e].rel&&(d["og:image"]="/"==c.query.results.link[e].href.charAt(0)?g.match(/^(([a-z]+:)?(\/\/)?[^\/]+\/).*$/)[1]+c.query.results.link[e].href:c.query.results.link[e].href)}c=h.yql.datareturn(d)}else c=h.yql.datareturn?h.yql.datareturn(c.query.results):c.query.results.result;!1!==c&&(j=b.extend({},c),j.code=c,n(j,l,a))},error:function(){j.onError.call(a,l,h)}},j.ajaxOptions||{});b.ajax(f)}else if(h.templateRegex)if(""!==h.embedtag.tag){c=h.embedtag.flashvars||"";f=h.embedtag.tag||
6
- "embed";d=h.embedtag.width||"auto";var e=h.embedtag.height||"auto",p=l.replace(h.templateRegex,h.apiendpoint);if(h.nocache||(p+="&jqoemcache="+o(5)),h.apikey&&(p=p.replace("_APIKEY_",j.apikeys[h.name])),j.maxHeight&&j.maxWidth)if(j.useResponsiveResize){var r=0,s=d,t=e;d>j.maxWidth&&(r=j.maxWidth/d,s=j.maxWidth,t=e*r,e*=r,d*=r);e>j.maxHeight&&(r=j.maxHeight/e,t=j.maxHeight,s=d*r,d*=r);e=t;d=s}else e=j.maxHeight,d=j.maxWidth;d=b("<"+f+"/>").attr("src",p).attr("width",d).attr("height",e).attr("allowfullscreen",
7
- h.embedtag.allowfullscreen||"true").attr("allowscriptaccess",h.embedtag.allowfullscreen||"always").css("max-height",j.maxHeight||"auto").css("max-width",j.maxWidth||"auto");"embed"==f&&d.attr("type",h.embedtag.type||"application/x-shockwave-flash").attr("flashvars",l.replace(h.templateRegex,c));"iframe"==f&&d.attr("scrolling",h.embedtag.scrolling||"no").attr("frameborder",h.embedtag.frameborder||"0");c={code:d};n(c,l,a)}else h.apiendpoint?(h.apikey&&(h.apiendpoint=h.apiendpoint.replace("_APIKEY_",
8
- j.apikeys[h.name])),f=b.extend({url:l.replace(h.templateRegex,h.apiendpoint),dataType:"jsonp",success:function(c){var d=b.extend({},c);d.code=h.templateData(c);n(d,l,a)},error:function(){j.onError.call(a,l,h)}},j.ajaxOptions||{}),b.ajax(f)):(c={code:l.replace(h.templateRegex,h.template)},n(c,l,a));else c=q(h,l),f=b.extend({url:c,dataType:h.dataType||"jsonp",success:function(c){c=b.extend({},c);switch(c.type){case "file":case "photo":c.code=b.fn.oembed.getPhotoCode(l,c);break;case "video":case "rich":c.code=
9
- b.fn.oembed.getRichCode(l,c);break;default:c.code=b.fn.oembed.getGenericCode(l,c)}n(c,l,a)},error:function(){j.onError.call(a,l,h)}},j.ajaxOptions||{}),b.ajax(f)}function p(a){if(null===a)return null;var b,e={};for(b in a)null!==b&&(e[b.toLowerCase()]=a[b]);return e}b.fn.oembed=function(a,l,h){j=b.extend(!0,b.fn.oembed.defaults,l);var d="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 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 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 clickthru.ca clop.in conta.cc cort.as cot.ag crks.me ctvr.us cutt.us dai.ly decenturl.com dfl8.me digbig.com http://digg.com/[^/]+$ disq.us dld.bz dlvr.it do.my doiop.com dopen.us easyuri.com easyurl.net eepurl.com eweri.com 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 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 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 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 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 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 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 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.ebay.com r.im rb6.me read.bi 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 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 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 sn.im snipr.com snipurl.com snurl.com sp2.ro spedr.com srnk.net srs.li starturl.com stks.co su.pr surl.co.uk surl.hu t.cn t.co t.lh.com 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 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 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 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 urlshorteningservicefortwitter.com urlx.ie urlzen.com usat.ly use.my vb.ly vevo.ly vgn.am vl.am vm.lc w55.de wapo.st wapurl.co.uk wipi.es 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 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".split(" ");
10
- return 0===b("#jqoembeddata").length&&b('<span id="jqoembeddata"></span>').appendTo("body"),this.each(function(){var c=b(this),f=a&&(!a.indexOf("http://")||!a.indexOf("https://"))?a:c.attr("href"),g,l,m,n,o;if(h?j.onEmbed=h:j.onEmbed||(j.onEmbed=function(a){b.fn.oembed.insertCode(this,j.embedMethod,a)}),null!==f&&void 0!==f){l=0;for(m=d.length;l<m;l++)if(n=RegExp("://"+d[l]+"/","i"),null!==f.match(n))return o=b.extend({url:"http://api.longurl.org/v2/expand",dataType:"jsonp",data:{url:f,format:"json"},
11
- success:function(a){f=a["long-url"];g=b.fn.oembed.getOEmbedProvider(a["long-url"]);null!==g?(g.params=p(j[g.name])||{},g.maxWidth=j.maxWidth,g.maxHeight=j.maxHeight,e(c,f,g)):j.onProviderNotFound.call(c,f)}},j.ajaxOptions||{}),b.ajax(o),c;g=b.fn.oembed.getOEmbedProvider(f);null!==g?(g.params=p(j[g.name])||{},g.maxWidth=j.maxWidth,g.maxHeight=j.maxHeight,e(c,f,g)):j.onProviderNotFound.call(c,f)}return c})};var j;b.fn.oembed.defaults={maxWidth:null,maxHeight:null,useResponsiveResize:!1,includeHandle:!0,
12
- embedMethod:"auto",onProviderNotFound:function(){},beforeEmbed:function(){},afterEmbed:function(){},onEmbed:!1,onError:function(){},ajaxOptions:{timeout:2E3}};b.fn.oembed.insertCode=function(a,l,e){if(null!==e)switch("auto"==l&&null!==a.attr("href")?l="append":"auto"==l&&(l="replace"),l){case "replace":a.replaceWith(e.code);break;case "fill":a.html(e.code);break;case "append":a.wrap('<div class="oembedall-container"></div>');l=a.parent();j.includeHandle&&b('<span class="oembedall-closehide">&darr;</span>').insertBefore(a).click(function(){var a=
13
- encodeURIComponent(b(this).text());b(this).html("%E2%86%91"==a?"&darr;":"&uarr;");b(this).parent().children().last().toggle()});l.append("<br/>");try{e.code.clone().appendTo(l)}catch(d){l.append(e.code)}}};b.fn.oembed.getPhotoCode=function(a,b){var e,d=b.title?b.title:"",c;return d+=b.author_name?" - "+b.author_name:"",d+=b.provider_name?" - "+b.provider_name:"",b.url?e='<div><a href="'+a+"\" target='_blank'><img src=\""+b.url+'" alt="'+d+'"/></a></div>':b.thumbnail_url?(c=b.thumbnail_url.replace("_s",
14
- "_b"),e='<div><a href="'+a+"\" target='_blank'><img src=\""+c+'" alt="'+d+'"/></a></div>'):e="<div>Error loading this picture</div>",b.html&&(e+="<div>"+b.html+"</div>"),e};b.fn.oembed.getRichCode=function(a,b){return b.html};b.fn.oembed.getGenericCode=function(a,b){var e='<a href="'+a+'">'+(null!==b.title?b.title:a)+"</a>";return b.html&&(e+="<div>"+b.html+"</div>"),e};b.fn.oembed.getOEmbedProvider=function(a){for(var e,h,d,c=0;c<b.fn.oembed.providers.length;c++){e=0;for(h=b.fn.oembed.providers[c].urlschemes.length;e<
15
- h;e++)if(d=RegExp(b.fn.oembed.providers[c].urlschemes[e],"i"),null!==a.match(d))return b.fn.oembed.providers[c]}return null};b.fn.oembed.OEmbedProvider=function(a,e,h,d,c){this.name=a;this.type=e;this.urlschemes=h;this.apiendpoint=d;this.maxWidth=500;this.maxHeight=400;c=c||{};c.useYQL&&(c.yql="xml"==c.useYQL?{xpath:"//oembed/html",from:"xml",apiendpoint:this.apiendpoint,url:function(a){return this.apiendpoint+"?format=xml&url="+a},datareturn:function(a){return a.html.replace(/.*\[CDATA\[(.*)\]\]>$/,
16
- "$1")||""}}:{from:"json",apiendpoint:this.apiendpoint,url:function(a){return this.apiendpoint+"?format=json&url="+a},datareturn:function(a){var c,d,e;if("video"!=a.json.type&&(a.json.url||a.json.thumbnail_url))return'<img src="'+(a.json.url||a.json.thumbnail_url)+'" />';if(a.json.html.indexOf("iframe")){a.json.html.indexOf("allowfullscreen>")&&(a.json.html=a.json.html.replace("allowfullscreen>",'allowfullscreen="false">'));var a=b.parseHTML(a.json.html),f=a[0].width,l=a[0].height;return j.maxHeight&&
17
- j.maxWidth&&(j.useResponsiveResize?(d=f,e=l,f>j.maxWidth&&(c=j.maxWidth/f,d=j.maxWidth,e=l*c,l*=c,f*=c),l>j.maxHeight&&(c=j.maxHeight/l,e=j.maxHeight,d=f*c),l=e,f=d):(l=j.maxHeight,f=j.maxWidth)),a[0].width=f,a[0].height=l,a[0].outerHTML}return a.json.html||""}},this.apiendpoint=null);for(var f in c)this[f]=c[f];this.format=this.format||"json";this.callbackparameter=this.callbackparameter||"callback";this.embedtag=this.embedtag||{tag:""}};b.fn.updateOEmbedProvider=function(a,e,h,d,c){for(var f,g=
18
- 0;g<b.fn.oembed.providers.length;g++)if(b.fn.oembed.providers[g].name===a&&(null!==e&&(b.fn.oembed.providers[g].type=e),null!==h&&(b.fn.oembed.providers[g].urlschemes=h),null!==d&&(b.fn.oembed.providers[g].apiendpoint=d),null!==c))for(f in b.fn.oembed.providers[g].extraSettings=c,c)null!==c[f]&&(b.fn.oembed.providers[g][f]=c[f])};b.fn.oembed.providers=[new b.fn.oembed.OEmbedProvider("youtube","video",["youtube\\.com/watch.+v=[\\w-]+&?","youtu\\.be/[\\w-]+"],m()+"www.youtube.com/oembed",{useYQL:"json"}),
19
- new b.fn.oembed.OEmbedProvider("youtubeiframe","video",["youtube.com/embed"],"$1?wmode=transparent",{templateRegex:/(.*)/,embedtag:{tag:"iframe",width:"425",height:"349"}}),new b.fn.oembed.OEmbedProvider("wistia","video",["wistia.com/m/.+","wistia.com/embed/.+","wi.st/m/.+","wi.st/embed/.+"],"http://fast.wistia.com/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("xtranormal","video",["xtranormal\\.com/watch/.+"],"http://www.xtranormal.com/xtraplayr/$1/$2",{templateRegex:/.*com\/watch\/([\w\-]+)\/([\w\-]+).*/,
20
- embedtag:{tag:"iframe",width:"320",height:"269"}}),new b.fn.oembed.OEmbedProvider("scivee","video",["scivee.tv/node/.+"],"http://www.scivee.tv/flash/embedCast.swf?",{templateRegex:/.*tv\/node\/(.+)/,embedtag:{width:"480",height:"400",flashvars:"id=$1&type=3"}}),new b.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",{templateRegex:/.*watch\/([^\?]+).*/,
21
- embedtag:{width:"410",height:"341"}}),new b.fn.oembed.OEmbedProvider("gametrailers","video",["gametrailers\\.com/video/.+"],"http://media.mtvnservices.com/mgid:moses:video:gametrailers.com:$2",{templateRegex:/.*com\/video\/([\w\-]+)\/([\w\-]+).*/,embedtag:{width:"512",height:"288"}}),new b.fn.oembed.OEmbedProvider("funnyordie","video",["funnyordie\\.com/videos/.+"],"http://player.ordienetworks.com/flash/fodplayer.swf?",{templateRegex:/.*videos\/([^\/]+)\/([^\/]+)?/,embedtag:{width:512,height:328,
22
- flashvars:"key=$1"}}),new b.fn.oembed.OEmbedProvider("colledgehumour","video",["collegehumor\\.com/video/.+"],"http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=$1&use_node_id=true&fullscreen=1",{templateRegex:/.*video\/([^\/]+).*/,embedtag:{width:600,height:338}}),new b.fn.oembed.OEmbedProvider("metacafe","video",["metacafe\\.com/watch/.+"],"http://www.metacafe.com/fplayer/$1/$2.swf",{templateRegex:/.*watch\/(\d+)\/(\w+)\/.*/,embedtag:{width:400,height:345}}),new b.fn.oembed.OEmbedProvider("bambuser",
23
- "video",["bambuser\\.com/channel/.*/broadcast/.*"],"http://static.bambuser.com/r/player.swf?vid=$1",{templateRegex:/.*bambuser\.com\/channel\/.*\/broadcast\/(\w+).*/,embedtag:{width:512,height:339}}),new b.fn.oembed.OEmbedProvider("twitvid","video",["twitvid\\.com/.+"],"http://www.twitvid.com/embed.php?guid=$1&autoplay=0",{templateRegex:/.*twitvid\.com\/(\w+).*/,embedtag:{tag:"iframe",width:480,height:360}}),new b.fn.oembed.OEmbedProvider("aniboom","video",["aniboom\\.com/animation-video/.+"],"http://api.aniboom.com/e/$1",
24
- {templateRegex:/.*animation-video\/(\d+).*/,embedtag:{width:594,height:334}}),new b.fn.oembed.OEmbedProvider("vzaar","video",["vzaar\\.com/videos/.+","vzaar.tv/.+"],"http://view.vzaar.com/$1/player?",{templateRegex:/.*\/(\d+).*/,embedtag:{tag:"iframe",width:576,height:324}}),new b.fn.oembed.OEmbedProvider("snotr","video",["snotr\\.com/video/.+"],"http://www.snotr.com/embed/$1",{templateRegex:/.*\/(\d+).*/,embedtag:{tag:"iframe",width:400,height:330,nocache:1}}),new b.fn.oembed.OEmbedProvider("youku",
25
- "video",["v.youku.com/v_show/id_.+"],"http://player.youku.com/player.php/sid/$1/v.swf",{templateRegex:/.*id_(.+)\.html.*/,embedtag:{width:480,height:400,nocache:1}}),new b.fn.oembed.OEmbedProvider("tudou","video",["tudou.com/programs/view/.+/"],"http://www.tudou.com/v/$1/v.swf",{templateRegex:/.*view\/(.+)\//,embedtag:{width:480,height:400,nocache:1}}),new b.fn.oembed.OEmbedProvider("embedr","video",["embedr\\.com/playlist/.+"],"http://embedr.com/swf/slider/$1/425/520/default/false/std?",{templateRegex:/.*playlist\/([^\/]+).*/,
26
- embedtag:{width:425,height:520}}),new b.fn.oembed.OEmbedProvider("blip","video",["blip\\.tv/.+"],"http://blip.tv/oembed/"),new b.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"}),new b.fn.oembed.OEmbedProvider("animoto","video",["animoto.com/play/.+"],"http://animoto.com/services/oembed"),
27
- new b.fn.oembed.OEmbedProvider("hulu","video",["hulu\\.com/watch/.*"],"http://www.hulu.com/api/oembed.json"),new b.fn.oembed.OEmbedProvider("ustream","video",["ustream\\.tv/recorded/.*"],"http://www.ustream.tv/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("videojug","video",["videojug\\.com/(film|payer|interview).*"],"http://www.videojug.com/oembed.json",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("sapo","video",["videos\\.sapo\\.pt/.*"],"http://videos.sapo.pt/oembed",{useYQL:"json"}),
28
- new b.fn.oembed.OEmbedProvider("vodpod","video",["vodpod.com/watch/.*"],"http://vodpod.com/oembed.js",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("vimeo","video",["www.vimeo.com/groups/.*/videos/.*","www.vimeo.com/.*","vimeo.com/groups/.*/videos/.*","vimeo.com/.*"],"//vimeo.com/api/oembed.json"),new b.fn.oembed.OEmbedProvider("dailymotion","video",["dailymotion\\.com/.+"],"http://www.dailymotion.com/services/oembed"),new b.fn.oembed.OEmbedProvider("5min","video",["www\\.5min\\.com/.+"],"http://api.5min.com/oembed.xml",
29
- {useYQL:"xml"}),new b.fn.oembed.OEmbedProvider("National Film Board of Canada","video",["nfb\\.ca/film/.+"],"http://www.nfb.ca/remote/services/oembed/",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("qik","video",["qik\\.com/\\w+"],"http://qik.com/api/oembed.json",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("revision3","video",["revision3\\.com"],"http://revision3.com/api/oembed/"),new b.fn.oembed.OEmbedProvider("dotsub","video",["dotsub\\.com/view/.+"],"http://dotsub.com/services/oembed",{useYQL:"json"}),
30
- new b.fn.oembed.OEmbedProvider("clikthrough","video",["clikthrough\\.com/theater/video/\\d+"],"http://clikthrough.com/services/oembed"),new b.fn.oembed.OEmbedProvider("Kinomap","video",["kinomap\\.com/.+"],"http://www.kinomap.com/oembed"),new b.fn.oembed.OEmbedProvider("VHX","video",["vhx.tv/.+"],"http://vhx.tv/services/oembed.json"),new b.fn.oembed.OEmbedProvider("bambuser","video",["bambuser.com/.+"],"http://api.bambuser.com/oembed/iframe.json"),new b.fn.oembed.OEmbedProvider("justin.tv","video",
31
- ["justin.tv/.+"],"http://api.justin.tv/api/embed/from_url.json",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("official.fm","rich",["official.fm/.+"],"http://official.fm/services/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("chirbit","rich",["chirb.it/.+"],"http://chirb.it/oembed.json",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("Huffduffer","rich",["huffduffer.com/[-.\\w@]+/\\d+"],"http://huffduffer.com/oembed"),new b.fn.oembed.OEmbedProvider("Spotify","rich",["open.spotify.com/(track|album|user)/"],
32
- "https://embed.spotify.com/oembed/"),new b.fn.oembed.OEmbedProvider("shoudio","rich",["shoudio.com/.+","shoud.io/.+"],"http://shoudio.com/api/oembed"),new b.fn.oembed.OEmbedProvider("mixcloud","rich",["mixcloud.com/.+"],m()+"www.mixcloud.com/oembed/",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("rdio.com","rich",["rd.io/.+","rdio.com"],m()+"www.rdio.com/api/oembed/"),new b.fn.oembed.OEmbedProvider("Soundcloud","rich",["soundcloud.com/.+","snd.sc/.+"],m()+"soundcloud.com/oembed",{format:"js"}),
33
- new b.fn.oembed.OEmbedProvider("bandcamp","rich",["bandcamp\\.com/album/.+"],null,{yql:{xpath:"//meta[contains(@content, \\'EmbeddedPlayer\\')]",from:"html",datareturn:function(a){return a.meta?'<iframe width="400" height="100" src="'+a.meta.content+'" allowtransparency="true" frameborder="0"></iframe>':!1}}}),new b.fn.oembed.OEmbedProvider("deviantart","photo",["deviantart.com/.+","fav.me/.+","deviantart.com/.+"],"http://backend.deviantart.com/oembed",{format:"jsonp"}),new b.fn.oembed.OEmbedProvider("skitch",
34
- "photo",["skitch.com/.+"],null,{yql:{xpath:"json",from:"json",url:function(a){return"http://skitch.com/oembed/?format=json&url="+a},datareturn:function(a){return b.fn.oembed.getPhotoCode(a.json.url,a.json)}}}),new b.fn.oembed.OEmbedProvider("mobypicture","photo",["mobypicture.com/user/.+/view/.+","moby.to/.+"],"http://api.mobypicture.com/oEmbed"),new b.fn.oembed.OEmbedProvider("flickr","photo",["flickr\\.com/photos/.+"],"http://flickr.com/services/oembed",{callbackparameter:"jsoncallback"}),new b.fn.oembed.OEmbedProvider("photobucket",
35
- "photo",["photobucket\\.com/(albums|groups)/.+"],m()+"photobucket.com/oembed/"),new b.fn.oembed.OEmbedProvider("instagram","photo",["instagr\\.?am(\\.com)?/.+"],m()+"api.instagram.com/oembed"),new b.fn.oembed.OEmbedProvider("SmugMug","photo",["smugmug.com/[-.\\w@]+/.+"],"http://api.smugmug.com/services/oembed/"),new b.fn.oembed.OEmbedProvider("dribbble","photo",["dribbble.com/shots/.+"],"http://api.dribbble.com/shots/$1?callback=?",{templateRegex:/.*shots\/([\d]+).*/,templateData:function(a){return a.image_teaser_url?
36
- '<img src="'+a.image_teaser_url+'"/>':!1}}),new b.fn.oembed.OEmbedProvider("chart.ly","photo",["chart\\.ly/[a-z0-9]{6,8}"],"http://chart.ly/uploads/large_$1.png",{templateRegex:/.*ly\/([^\/]+).*/,embedtag:{tag:"img"},nocache:1}),new b.fn.oembed.OEmbedProvider("circuitlab","photo",["circuitlab.com/circuit/.+"],"https://www.circuitlab.com/circuit/$1/screenshot/540x405/",{templateRegex:/.*circuit\/([^\/]+).*/,embedtag:{tag:"img"},nocache:1}),new b.fn.oembed.OEmbedProvider("23hq","photo",["23hq.com/[-.\\w@]+/photo/.+"],
37
- "http://www.23hq.com/23/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("img.ly","photo",["img\\.ly/.+"],"http://img.ly/show/thumb/$1",{templateRegex:/.*ly\/([^\/]+).*/,embedtag:{tag:"img"},nocache:1}),new b.fn.oembed.OEmbedProvider("twitgoo.com","photo",["twitgoo\\.com/.+"],"http://twitgoo.com/show/thumb/$1",{templateRegex:/.*com\/([^\/]+).*/,embedtag:{tag:"img"},nocache:1}),new b.fn.oembed.OEmbedProvider("imgur.com","photo",["imgur\\.com/gallery/.+"],m()+"imgur.com/$1l.jpg",{templateRegex:/.*gallery\/([^\/]+).*/,
38
- embedtag:{tag:"img"},nocache:1}),new b.fn.oembed.OEmbedProvider("visual.ly","rich",["visual\\.ly/.+"],null,{yql:{xpath:"//a[@id=\\'gc_article_graphic_image\\']/img",from:"htmlstring"}}),new b.fn.oembed.OEmbedProvider("gravtar","photo",["mailto:.+"],null,{templateRegex:/mailto:([^\/]+).*/,template:function(a,b){return'<img src="http://gravatar.com/avatar/'+b.md5()+'.jpg" alt="on Gravtar" class="jqoaImg">'}}),new b.fn.oembed.OEmbedProvider("twitter","rich",["twitter.com/.+"],"https://api.twitter.com/1/statuses/oembed.json"),
39
- new b.fn.oembed.OEmbedProvider("gmep","rich",["gmep.imeducate.com/.*","gmep.org/.*"],"http://gmep.org/oembed.json"),new b.fn.oembed.OEmbedProvider("urtak","rich",["urtak.com/(u|clr)/.+"],"http://oembed.urtak.com/1/oembed"),new b.fn.oembed.OEmbedProvider("cacoo","rich",["cacoo.com/.+"],"http://cacoo.com/oembed.json"),new b.fn.oembed.OEmbedProvider("dailymile","rich",["dailymile.com/people/.*/entries/.*"],"http://api.dailymile.com/oembed"),new b.fn.oembed.OEmbedProvider("dipity","rich",["dipity.com/timeline/.+"],
40
- "http://www.dipity.com/oembed/timeline/",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("sketchfab","rich",["sketchfab.com/show/.+"],"http://sketchfab.com/oembed",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("speakerdeck","rich",["speakerdeck.com/.+"],"http://speakerdeck.com/oembed.json",{useYQL:"json"}),new b.fn.oembed.OEmbedProvider("popplet","rich",["popplet.com/app/.*"],"http://popplet.com/app/Popplet_Alpha.swf?page_id=$1&em=1",{templateRegex:/.*#\/([^\/]+).*/,embedtag:{width:460,height:460}}),
41
- new b.fn.oembed.OEmbedProvider("pearltrees","rich",["pearltrees.com/.*"],"http://cdn.pearltrees.com/s/embed/getApp?",{templateRegex:/.*N-f=1_(\d+).*N-p=(\d+).*/,embedtag:{width:460,height:460,flashvars:"lang=en_US&amp;embedId=pt-embed-$1-693&amp;treeId=$1&amp;pearlId=$2&amp;treeTitle=Diagrams%2FVisualization&amp;site=www.pearltrees.com%2FF"}}),new b.fn.oembed.OEmbedProvider("prezi","rich",["prezi.com/.*"],"http://prezi.com/bin/preziloader.swf?",{templateRegex:/.*com\/([^\/]+)\/.*/,embedtag:{width:550,
42
- height:400,flashvars:"prezi_id=$1&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0"}}),new b.fn.oembed.OEmbedProvider("tourwrist","rich",["tourwrist.com/tours/.+"],null,{templateRegex:/.*tours.([\d]+).*/,template:function(a,b){return setTimeout(function(){loadEmbeds&&loadEmbeds()},2E3),"<div id='"+b+"' class='tourwrist-tour-embed direct'></div> <script type='text/javascript' src='http://tourwrist.com/tour_embed.js'><\/script>"}}),new b.fn.oembed.OEmbedProvider("meetup","rich",
43
- ["meetup\\.(com|ps)/.+"],m()+"api.meetup.com/oembed"),new b.fn.oembed.OEmbedProvider("ebay","rich",["ebay\\.*"],m()+"togo.ebay.com/togo/togo.swf?2008013100",{templateRegex:/.*\/([^\/]+)\/(\d{10,13}).*/,embedtag:{width:355,height:300,flashvars:"base=http://togo.ebay.com/togo/&lang=en-us&mode=normal&itemid=$2&query=$1"}}),new b.fn.oembed.OEmbedProvider("wikipedia","rich",["wikipedia.org/wiki/.+"],"http://$1.wikipedia.org/w/api.php?action=parse&page=$2&format=json&section=0&callback=?",{templateRegex:/.*\/\/([\w]+).*\/wiki\/([^\/]+).*/,
44
- templateData:function(a){if(!a.parse)return!1;var b=a.parse.text["*"].replace(/href="\/wiki/g,'href="http://en.wikipedia.org/wiki');return'<div id="content"><h3><a class="nav-link" href="http://en.wikipedia.org/wiki/'+a.parse.displaytitle+'">'+a.parse.displaytitle+"</a></h3>"+b+"</div>"}}),new b.fn.oembed.OEmbedProvider("imdb","rich",["imdb.com/title/.+"],"http://www.imdbapi.com/?i=$1&callback=?",{templateRegex:/.*\/title\/([^\/]+).*/,templateData:function(a){return a.Title?'<div id="content"><h3><a class="nav-link" href="http://imdb.com/title/'+
45
- a.ID+'/">'+a.Title+"</a> ("+a.Year+")</h3><p>Starring: "+a.Actors+'</p><div id="photo-wrap" style="margin: auto;width:600px;height:450px;"><img class="photo" id="photo-display" src="'+a.Poster+'" alt="'+a.Title+'"></div> <div id="view-photo-caption">'+a.Plot+"</div></div>":!1}}),new b.fn.oembed.OEmbedProvider("livejournal","rich",["livejournal.com/"],"http://ljpic.seacrow.com/json/$2$4?jsonp=?",{templateRegex:/(http:\/\/(((?!users).)+)\.livejournal\.com|.*users\.livejournal\.com\/([^\/]+)).*/,templateData:function(a){return a.username?
46
- '<div><img src="'+a.image+'" align="left" style="margin-right: 1em;" /><span class="oembedall-ljuser"><a href="http://'+a.username+'.livejournal.com/profile"><img src="http://www.livejournal.com/img/userinfo.gif" alt="[info]" width="17" height="17" /></a><a href="http://'+a.username+'.livejournal.com/">'+a.username+"</a></span><br />"+a.name+"</div>":!1}}),new b.fn.oembed.OEmbedProvider("circuitbee","rich",["circuitbee\\.com/circuit/view/.+"],"http://c.circuitbee.com/build/r/schematic-embed.html?id=$1",
47
- {templateRegex:/.*circuit\/view\/(\d+).*/,embedtag:{tag:"iframe",width:"500",height:"350"}}),new b.fn.oembed.OEmbedProvider("googlecalendar","rich",["www.google.com/calendar/embed?.+"],"$1",{templateRegex:/(.*)/,embedtag:{tag:"iframe",width:"800",height:"600"}}),new b.fn.oembed.OEmbedProvider("jsfiddle","rich",["jsfiddle.net/[^/]+/?"],"http://jsfiddle.net/$1/embedded/result,js,resources,html,css/?",{templateRegex:/.*net\/([^\/]+).*/,embedtag:{tag:"iframe",width:"100%",height:"300"}}),new b.fn.oembed.OEmbedProvider("jsbin",
48
- "rich",["jsbin.com/.+"],"http://jsbin.com/$1/?",{templateRegex:/.*com\/([^\/]+).*/,embedtag:{tag:"iframe",width:"100%",height:"300"}}),new b.fn.oembed.OEmbedProvider("jotform","rich",["form.jotform.co/form/.+"],"$1?",{templateRegex:/(.*)/,embedtag:{tag:"iframe",width:"100%",height:"507"}}),new b.fn.oembed.OEmbedProvider("reelapp","rich",["reelapp\\.com/.+"],"http://www.reelapp.com/$1/embed",{templateRegex:/.*com\/(\S{6}).*/,embedtag:{tag:"iframe",width:"400",height:"338"}}),new b.fn.oembed.OEmbedProvider("linkedin",
49
- "rich",["linkedin.com/pub/.+"],"https://www.linkedin.com/cws/member/public_profile?public_profile_url=$1&format=inline&isFramed=true",{templateRegex:/(.*)/,embedtag:{tag:"iframe",width:"368px",height:"auto"}}),new b.fn.oembed.OEmbedProvider("timetoast","rich",["timetoast.com/timelines/[0-9]+"],"http://www.timetoast.com/flash/TimelineViewer.swf?passedTimelines=$1",{templateRegex:/.*timelines\/([0-9]*)/,embedtag:{width:550,height:400,nocache:1}}),new b.fn.oembed.OEmbedProvider("pastebin","rich",["pastebin\\.com/[\\S]{8}"],
50
- "http://pastebin.com/embed_iframe.php?i=$1",{templateRegex:/.*\/(\S{8}).*/,embedtag:{tag:"iframe",width:"100%",height:"auto"}}),new b.fn.oembed.OEmbedProvider("mixlr","rich",["mixlr.com/.+"],"http://mixlr.com/embed/$1?autoplay=ae",{templateRegex:/.*com\/([^\/]+).*/,embedtag:{tag:"iframe",width:"100%",height:"auto"}}),new b.fn.oembed.OEmbedProvider("pastie","rich",["pastie\\.org/pastes/.+"],null,{yql:{xpath:'//pre[@class="textmate-source"]'}}),new b.fn.oembed.OEmbedProvider("github","rich",["gist.github.com/.+"],
51
- "https://github.com/api/oembed"),new b.fn.oembed.OEmbedProvider("github","rich",["github.com/[-.\\w@]+/[-.\\w@]+"],"https://api.github.com/repos/$1/$2?callback=?",{templateRegex:/.*\/([^\/]+)\/([^\/]+).*/,templateData:function(a){return a.data.html_url?'<div class="oembedall-githubrepos"><ul class="oembedall-repo-stats"><li>'+a.data.language+'</li><li class="oembedall-watchers"><a title="Watchers" href="'+a.data.html_url+'/watchers">&#x25c9; '+a.data.watchers+'</a></li><li class="oembedall-forks"><a title="Forks" href="'+
52
- a.data.html_url+'/network">&#x0265; '+a.data.forks+'</a></li></ul><h3><a href="'+a.data.html_url+'">'+a.data.name+'</a></h3><div class="oembedall-body"><p class="oembedall-description">'+a.data.description+'</p><p class="oembedall-updated-at">Last updated: '+a.data.pushed_at+"</p></div></div>":!1}}),new b.fn.oembed.OEmbedProvider("facebook","rich",["facebook.com/(people/[^\\/]+/\\d+|[^\\/]+$)"],"https://graph.facebook.com/$2$3/?callback=?",{templateRegex:/.*facebook.com\/(people\/[^\/]+\/(\d+).*|([^\/]+$))/,
53
- templateData:function(a){if(!a.id)return!1;var b='<div class="oembedall-facebook1"><div class="oembedall-facebook2"><a href="http://www.facebook.com/">facebook</a> ';return b+=a.from?'<a href="http://www.facebook.com/'+a.from.id+'">'+a.from.name+"</a>":a.link?'<a href="'+a.link+'">'+a.name+"</a>":a.username?'<a href="http://www.facebook.com/'+a.username+'">'+a.name+"</a>":'<a href="http://www.facebook.com/'+a.id+'">'+a.name+"</a>",b+='</div><div class="oembedall-facebookBody"><div class="contents">',
54
- b+=a.picture?'<a href="'+a.link+'"><img src="'+a.picture+'"></a>':'<img src="https://graph.facebook.com/'+a.id+'/picture">',a.from&&(b+='<a href="'+a.link+'">'+a.name+"</a>"),a.founded&&(b+="Founded: <strong>"+a.founded+"</strong><br>"),a.category&&(b+="Category: <strong>"+a.category+"</strong><br>"),a.website&&(b+='Website: <strong><a href="'+a.website+'">'+a.website+"</a></strong><br>"),a.gender&&(b+="Gender: <strong>"+a.gender+"</strong><br>"),a.description&&(b+=a.description+"<br>"),b+"</div></div>"}}),
55
- new b.fn.oembed.OEmbedProvider("stackoverflow","rich",["stackoverflow.com/questions/[\\d]+"],"http://api.stackoverflow.com/1.1/questions/$1?body=true&jsonp=?",{templateRegex:/.*questions\/([\d]+).*/,templateData:function(a){if(!a.questions)return!1;var a=a.questions[0],e=b(a.body).text(),e='<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"><span class="oembedall-vote-count-post"><strong>'+
56
- (a.up_vote_count-a.down_vote_count)+'</strong></span><div class="oembedall-viewcount">vote(s)</div></div></div><div class="oembedall-status"><strong>'+a.answer_count+'</strong>answer</div></div><div class="oembedall-views">'+a.view_count+' view(s)</div></div><div class="oembedall-summary"><h3><a class="oembedall-question-hyperlink" href="http://stackoverflow.com/questions/'+a.question_id+'/">'+a.title+'</a></h3><div class="oembedall-excerpt">'+e.substring(0,100)+'...</div><div class="oembedall-tags">';
57
- for(i in a.tags)e+='<a title="" class="oembedall-post-tag" href="http://stackoverflow.com/questions/tagged/'+a.tags[i]+'">'+a.tags[i]+"</a>";return e+('</div><div class="oembedall-fr"><div class="oembedall-user-info"><div class="oembedall-user-gravatar32"><a href="http://stackoverflow.com/users/'+a.owner.user_id+"/"+a.owner.display_name+'"><img width="32" height="32" alt="" src="http://www.gravatar.com/avatar/'+a.owner.email_hash+'?s=32&amp;d=identicon&amp;r=PG"></a></div><div class="oembedall-user-details"><a href="http://stackoverflow.com/users/'+
58
- a.owner.user_id+"/"+a.owner.display_name+'">'+a.owner.display_name+'</a><br><span title="reputation score" class="oembedall-reputation-score">'+a.owner.reputation+"</span></div></div></div></div></div>")}}),new b.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"),new b.fn.oembed.OEmbedProvider("screenr","rich",["screenr.com"],"http://www.screenr.com/embed/$1",
59
- {templateRegex:/.*\/([^\/]+).*/,embedtag:{tag:"iframe",width:"650",height:396}}),new b.fn.oembed.OEmbedProvider("gigpans","rich",["gigapan\\.org/[-.\\w@]+/\\d+"],"http://gigapan.org/gigapans/$1/options/nosnapshots/iframe/flash.html",{templateRegex:/.*\/(\d+)\/?.*/,embedtag:{tag:"iframe",width:"100%",height:400}}),new b.fn.oembed.OEmbedProvider("scribd","rich",["scribd\\.com/.+"],m()+"www.scribd.com/embeds/$1/content?start_page=1&view_mode=list",{templateRegex:/.*doc\/([^\/]+).*/,embedtag:{tag:"iframe",
60
- width:"100%",height:600}}),new b.fn.oembed.OEmbedProvider("kickstarter","rich",["kickstarter\\.com/projects/.+"],"$1/widget/card.html",{templateRegex:/([^\?]+).*/,embedtag:{tag:"iframe",width:"220",height:380}}),new b.fn.oembed.OEmbedProvider("amazon","rich",["amzn.com/B+","amazon.com.*/(B\\S+)($|\\/.*)"],m()+"rcm.amazon.com/e/cm?t=_APIKEY_&o=1&p=8&l=as1&asins=$1&ref=qf_br_asin_til&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr",{apikey:!0,templateRegex:/.*\/(B[0-9A-Z]+)($|\/.*)/,
61
- embedtag:{tag:"iframe",width:"120px",height:"240px"}}),new b.fn.oembed.OEmbedProvider("slideshare","rich",["slideshare.net"],m()+"www.slideshare.net/api/oembed/2",{format:"jsonp"}),new b.fn.oembed.OEmbedProvider("roomsharejp","rich",["roomshare\\.jp/(en/)?post/.*"],"http://roomshare.jp/oembed.json"),new b.fn.oembed.OEmbedProvider("lanyard","rich",["lanyrd.com/\\d+/.+"],null,{yql:{xpath:'(//div[@class="primary"])[1]',from:"htmlstring",datareturn:function(a){return a.result?'<div class="oembedall-lanyard">'+
62
- a.result+"</div>":!1}}}),new b.fn.oembed.OEmbedProvider("asciiartfarts","rich",["asciiartfarts.com/\\d+.html"],null,{yql:{xpath:"//pre/font",from:"htmlstring",datareturn:function(a){return a.result?'<pre style="background-color:000;">'+a.result+"</div>":!1}}}),new b.fn.oembed.OEmbedProvider("opengraph","rich",[".*"],null,{yql:{xpath:"//meta|//title|//link",from:"html",datareturn:function(a){var e,h,d;return(!a["og:title"]&&a.title&&a.description&&(a["og:title"]=a.title),!a["og:title"]&&!a.title)?
63
- !1:(e=b("<p/>"),a["og:video"]?(h=b('<embed src="'+a["og:video"]+'"/>'),h.attr("type",a["og:video:type"]||"application/x-shockwave-flash").css("max-height",j.maxHeight||"auto").css("max-width",j.maxWidth||"auto"),a["og:video:width"]&&h.attr("width",a["og:video:width"]),a["og:video:height"]&&h.attr("height",a["og:video:height"]),e.append(h)):a["og:image"]&&(d=b('<img src="'+a["og:image"]+'">'),d.css("max-height",j.maxHeight||"auto").css("max-width",j.maxWidth||"auto"),a["og:image:width"]&&d.attr("width",
64
- a["og:image:width"]),a["og:image:height"]&&d.attr("height",a["og:image:height"]),e.append(d)),a["og:title"]&&e.append("<b>"+a["og:title"]+"</b><br/>"),a["og:description"]?e.append(a["og:description"]+"<br/>"):a.description&&e.append(a.description+"<br/>"),e)}}})]})(jQuery);
65
- String.prototype.md5=function(){var b=function(b,m){var j=(b&65535)+(m&65535);return(b>>16)+(m>>16)+(j>>16)<<16|j&65535},m=function(e,m,j,a,l,h){e=b(b(m,e),b(a,h));return b(e<<l|e>>>32-l,j)},o=function(b,p,j,a,l,h,d){return m(p&j|~p&a,b,p,l,h,d)},q=function(b,p,j,a,l,h,d){return m(p&a|j&~a,b,p,l,h,d)},n=function(b,p,j,a,l,h,d){return m(j^(p|~a),b,p,l,h,d)};return function(b){for(var m="",j=4*b.length,a=0;a<j;a++)m+="0123456789abcdef".charAt(b[a>>2]>>8*(a%4)+4&15)+"0123456789abcdef".charAt(b[a>>2]>>
66
- 8*(a%4)&15);return m}(function(e){for(var p,j,a,l,h=e.length,d=1732584193,c=-271733879,f=-1732584194,g=271733878,k=0;k<h;k+=16)p=d,j=c,a=f,l=g,d=o(d,c,f,g,e[k+0],7,-680876936),g=o(g,d,c,f,e[k+1],12,-389564586),f=o(f,g,d,c,e[k+2],17,606105819),c=o(c,f,g,d,e[k+3],22,-1044525330),d=o(d,c,f,g,e[k+4],7,-176418897),g=o(g,d,c,f,e[k+5],12,1200080426),f=o(f,g,d,c,e[k+6],17,-1473231341),c=o(c,f,g,d,e[k+7],22,-45705983),d=o(d,c,f,g,e[k+8],7,1770035416),g=o(g,d,c,f,e[k+9],12,-1958414417),f=o(f,g,d,c,e[k+10],
67
- 17,-42063),c=o(c,f,g,d,e[k+11],22,-1990404162),d=o(d,c,f,g,e[k+12],7,1804603682),g=o(g,d,c,f,e[k+13],12,-40341101),f=o(f,g,d,c,e[k+14],17,-1502002290),c=o(c,f,g,d,e[k+15],22,1236535329),d=q(d,c,f,g,e[k+1],5,-165796510),g=q(g,d,c,f,e[k+6],9,-1069501632),f=q(f,g,d,c,e[k+11],14,643717713),c=q(c,f,g,d,e[k+0],20,-373897302),d=q(d,c,f,g,e[k+5],5,-701558691),g=q(g,d,c,f,e[k+10],9,38016083),f=q(f,g,d,c,e[k+15],14,-660478335),c=q(c,f,g,d,e[k+4],20,-405537848),d=q(d,c,f,g,e[k+9],5,568446438),g=q(g,d,c,f,e[k+
68
- 14],9,-1019803690),f=q(f,g,d,c,e[k+3],14,-187363961),c=q(c,f,g,d,e[k+8],20,1163531501),d=q(d,c,f,g,e[k+13],5,-1444681467),g=q(g,d,c,f,e[k+2],9,-51403784),f=q(f,g,d,c,e[k+7],14,1735328473),c=q(c,f,g,d,e[k+12],20,-1926607734),d=m(c^f^g,d,c,e[k+5],4,-378558),g=m(d^c^f,g,d,e[k+8],11,-2022574463),f=m(g^d^c,f,g,e[k+11],16,1839030562),c=m(f^g^d,c,f,e[k+14],23,-35309556),d=m(c^f^g,d,c,e[k+1],4,-1530992060),g=m(d^c^f,g,d,e[k+4],11,1272893353),f=m(g^d^c,f,g,e[k+7],16,-155497632),c=m(f^g^d,c,f,e[k+10],23,-1094730640),
69
- d=m(c^f^g,d,c,e[k+13],4,681279174),g=m(d^c^f,g,d,e[k+0],11,-358537222),f=m(g^d^c,f,g,e[k+3],16,-722521979),c=m(f^g^d,c,f,e[k+6],23,76029189),d=m(c^f^g,d,c,e[k+9],4,-640364487),g=m(d^c^f,g,d,e[k+12],11,-421815835),f=m(g^d^c,f,g,e[k+15],16,530742520),c=m(f^g^d,c,f,e[k+2],23,-995338651),d=n(d,c,f,g,e[k+0],6,-198630844),g=n(g,d,c,f,e[k+7],10,1126891415),f=n(f,g,d,c,e[k+14],15,-1416354905),c=n(c,f,g,d,e[k+5],21,-57434055),d=n(d,c,f,g,e[k+12],6,1700485571),g=n(g,d,c,f,e[k+3],10,-1894986606),f=n(f,g,d,c,
70
- e[k+10],15,-1051523),c=n(c,f,g,d,e[k+1],21,-2054922799),d=n(d,c,f,g,e[k+8],6,1873313359),g=n(g,d,c,f,e[k+15],10,-30611744),f=n(f,g,d,c,e[k+6],15,-1560198380),c=n(c,f,g,d,e[k+13],21,1309151649),d=n(d,c,f,g,e[k+4],6,-145523070),g=n(g,d,c,f,e[k+11],10,-1120210379),f=n(f,g,d,c,e[k+2],15,718787259),c=n(c,f,g,d,e[k+9],21,-343485551),d=b(d,p),c=b(c,j),f=b(f,a),g=b(g,l);return[d,c,f,g]}(function(b){for(var m=(b.length+8>>6)+1,j=[],a=16*m,l=b.length,h=0;h<a;h++)j.push(0);for(a=0;a<l;a++)j[a>>2]|=(b.charCodeAt(a)&
71
- 255)<<8*(a%4);return j[a>>2]|=128<<8*(a%4),j[16*m-2]=8*l,j}(this)))};
@@ -1,23 +0,0 @@
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
- invalidUrl: "Please provide an valid URL!",
6
- noEmbedCode: "No embed code found, or site is not supported!",
7
- url: "URL:",
8
- width: "Width:",
9
- height: "Height:",
10
- widthTitle: "Width for the embeded Content",
11
- heightTitle: "Height for the embeded Content",
12
- maxWidth: "Max. Width:",
13
- maxHeight: "Max. Height:",
14
- maxWidthTitle: "Maximum Width for the embeded Content",
15
- maxHeightTitle: "Maximum Height for the embeded Content",
16
- resizeType: "Resize Type (Only Video's):",
17
- noresize: "No Resize (use default)",
18
- responsive: "Responsive Resize",
19
- custom: "Specific Resize",
20
- autoClose: "Automatically Close Dialog after Code is Embeded",
21
- noVimeo: "The owner of this video has set domain restrictions and you will not be able to embed it on your website.",
22
- Error: "Media Content could not been retrieved, please try a different URL."
23
- });
@@ -1,23 +0,0 @@
1
- CKEDITOR.plugins.setLang('oembed', 'ru', {
2
- title: "Внедрить медиа-контент (видео, аудио, фото и т.д.)",
3
- button: "Внедрить медиа-контент с различных сайтов",
4
- pasteUrl: "Вставьте ссылку на страницу с медиа-контентом (например YouTube, Flickr, Qik, Vimeo, Hulu, Viddler, MyOpera, и т.д.)",
5
- invalidUrl: "Вы ввели некорректный URL",
6
- noEmbedCode: "Не обнаружен код для вставки. Возможно, вы ввели ссылку с неподдерживаемого сайта.",
7
- url: "URL:",
8
- width: "Ширина:",
9
- height: "Высота:",
10
- widthTitle: "Ширина внедряемого медиа-контента",
11
- heightTitle: "Высота внедряемого медиа-контента",
12
- maxWidth: "Макс. ширина:",
13
- maxHeight: "Макс. высота:",
14
- maxWidthTitle: "Максимальная ширина внедряемого медиа-контента",
15
- maxHeightTitle: "Максимальная высота внедряемого медиа-контента",
16
- resizeType: "Изменение размера (только для видео):",
17
- noresize: "Без изменения (стандартный размер)",
18
- responsive: "Задать максимальный размер",
19
- custom: "Задать конкретный размер",
20
- autoClose: "Автоматически закрыть диалог после внедрения кода",
21
- noVimeo: "Владелец этого видео установил ограничения на домен, и вы не можете его встроить на ваш сайт.",
22
- Error: "Невозможно получить медиа-контент. Попробуйте другой URL."
23
- });
@@ -1,971 +0,0 @@
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.ebay.com", "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","stks.co", "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", "vevo.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 && resourceURL !== undefined) {
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
- useResponsiveResize: false,
117
- includeHandle: true,
118
- embedMethod: 'auto',
119
- // "auto", "append", "fill"
120
- onProviderNotFound: function() {},
121
- beforeEmbed: function() {},
122
- afterEmbed: function() {},
123
- onEmbed: false,
124
- onError: function() {},
125
- ajaxOptions: { timeout: 2000 }
126
- };
127
-
128
- /*
129
- * check protocol
130
- * @return The protocol correct.
131
- */
132
- function checkProtocol() {
133
- var protocol = window.location.protocol;
134
-
135
- // fix local
136
- if (protocol === "file:") {
137
- return "http://";
138
- } else {
139
- protocol += "//";
140
- }
141
-
142
- return protocol;
143
- }
144
-
145
- /* Private functions */
146
- function rand(length,current){ //Found on http://stackoverflow.com/questions/1349404/generate-a-string-of-5-random-characters-in-javascript
147
- current = current ? current : '';
148
- return length ? rand( --length , "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".charAt( Math.floor( Math.random() * 60 ) ) + current ) : current;
149
- }
150
-
151
- function getRequestUrl(provider, externalUrl) {
152
- var url = provider.apiendpoint,
153
- qs = "",
154
- i;
155
- url += (url.indexOf("?") <= 0) ? "?" : "&";
156
- url = url.replace('#','%23');
157
-
158
- if (provider.maxWidth !== null && (typeof provider.params.maxwidth === 'undefined' || provider.params.maxwidth === null)) {
159
- provider.params.maxwidth = provider.maxWidth;
160
- }
161
-
162
- if (provider.maxHeight !== null && (typeof provider.params.maxheight === 'undefined' || provider.params.maxheight === null)) {
163
- provider.params.maxheight = provider.maxHeight;
164
- }
165
-
166
- for (i in provider.params) {
167
- // We don't want them to jack everything up by changing the callback parameter
168
- if (i == provider.callbackparameter) continue;
169
-
170
- // allows the options to be set to null, don't send null values to the server as parameters
171
- if (provider.params[i] !== null) qs += "&" + escape(i) + "=" + provider.params[i];
172
- }
173
-
174
- url += "format=" + provider.format + "&url=" + escape(externalUrl) + qs;
175
- if(provider.dataType!='json') url += "&" + provider.callbackparameter + "=?";
176
-
177
- return url;
178
- }
179
- function success(oembedData, externalUrl, container) {
180
- $('#jqoembeddata').data(externalUrl, oembedData.code);
181
- settings.beforeEmbed.call(container, oembedData);
182
- settings.onEmbed.call(container, oembedData);
183
- settings.afterEmbed.call(container, oembedData);
184
- }
185
-
186
- function embedCode(container, externalUrl, embedProvider) {
187
- if ($('#jqoembeddata').data(externalUrl)!=undefined && embedProvider.embedtag.tag!='iframe'){
188
- var oembedData = {code: $('#jqoembeddata').data(externalUrl)};
189
- success(oembedData, externalUrl, container);
190
- }else if (embedProvider.yql) {
191
- var from = embedProvider.yql.from || 'htmlstring';
192
- var url = embedProvider.yql.url ? embedProvider.yql.url(externalUrl) : externalUrl;
193
- var query = 'SELECT * FROM '
194
- + from
195
- + ' WHERE url="' + (url) + '"'
196
- + " and " + (/html/.test(from) ? 'xpath' : 'itemPath') + "='" + (embedProvider.yql.xpath || '/')+"'" ;
197
- if(from=='html') query += " and compat='html5'";
198
- var ajaxopts = $.extend({
199
- url: checkProtocol() + "query.yahooapis.com/v1/public/yql",
200
- dataType: 'jsonp',
201
- data: {
202
- q: query,
203
- format: "json",
204
- env: 'store://datatables.org/alltableswithkeys',
205
- callback: "?"
206
- },
207
- success: function(data) {
208
- var result;
209
- if(embedProvider.yql.xpath && embedProvider.yql.xpath=='//meta|//title|//link'){
210
- var meta={};
211
- if (data.query.results == null) {
212
- data.query.results = {"meta": []};
213
- }
214
- for(var i=0, l=data.query.results.meta.length; i<l; i++){
215
- var name = data.query.results.meta[i].name||data.query.results.meta[i].property||null;
216
- if(name==null)continue;
217
- meta[name.toLowerCase()]=data.query.results.meta[i].content;
218
- }
219
- if (!meta.hasOwnProperty("title") || !meta.hasOwnProperty("og:title") ) {
220
- if ( data.query.results.title != null ) {
221
- meta.title = data.query.results.title;
222
- }
223
- }
224
- if (!meta.hasOwnProperty("og:image") && data.query.results.hasOwnProperty("link")) {
225
- for ( var i=0, l=data.query.results.link.length; i<l; i++){
226
- if ( data.query.results.link[i].hasOwnProperty("rel") ) {
227
- if (data.query.results.link[i].rel == "apple-touch-icon") {
228
- if ( data.query.results.link[i].href.charAt(0) == "/" ) {
229
- meta["og:image"] = url.match(/^(([a-z]+:)?(\/\/)?[^\/]+\/).*$/)[1] + data.query.results.link[i].href;
230
- } else {
231
- meta["og:image"] = data.query.results.link[i].href;
232
- }
233
- }
234
- }
235
- }
236
- }
237
- result = embedProvider.yql.datareturn(meta);
238
- }else{
239
- result = embedProvider.yql.datareturn ? embedProvider.yql.datareturn(data.query.results) : data.query.results.result;
240
- }
241
- if(result===false)return;
242
- var oembedData = $.extend({}, result);
243
- oembedData.code = result;
244
- success(oembedData, externalUrl, container);
245
- },
246
- error: function () {
247
- settings.onError.call(container, externalUrl, embedProvider);
248
- }
249
- }, settings.ajaxOptions || {});
250
-
251
- $.ajax(ajaxopts);
252
- }else if (embedProvider.templateRegex) {
253
- if(embedProvider.embedtag.tag!==''){
254
- var flashvars = embedProvider.embedtag.flashvars || '';
255
- var tag = embedProvider.embedtag.tag || 'embed';
256
- var width = embedProvider.embedtag.width || 'auto';
257
- var nocache = embedProvider.embedtag.nocache || 0;
258
- var height = embedProvider.embedtag.height || 'auto';
259
- var src =externalUrl.replace(embedProvider.templateRegex,embedProvider.apiendpoint);
260
- if(!embedProvider.nocache) src += '&jqoemcache='+rand(5);
261
- if (embedProvider.apikey) src = src.replace('_APIKEY_', settings.apikeys[embedProvider.name]);
262
-
263
- if (settings.maxHeight && settings.maxWidth) {
264
-
265
- if (settings.useResponsiveResize) {
266
-
267
- var ratio = 0; // Used for aspect ratio
268
-
269
- var newWidth = width;
270
- var newHeight = height;
271
-
272
- // Check if the current width is larger than the max
273
- if (width > settings.maxWidth) {
274
- ratio = settings.maxWidth / width;
275
-
276
- newWidth = settings.maxWidth;
277
- newHeight = height * ratio;
278
-
279
- // reset
280
- height = height * ratio;
281
- width = width * ratio;
282
- }
283
-
284
- // Check if current height is larger than max
285
- if (height > settings.maxHeight) {
286
- ratio = settings.maxHeight / height;
287
-
288
- newHeight = settings.maxHeight;
289
- newWidth = width * ratio;
290
-
291
- // reset
292
- width = width * ratio;
293
- }
294
-
295
- height = newHeight;
296
- width = newWidth;
297
- } else {
298
- height = settings.maxHeight;
299
- width = settings.maxWidth;
300
- }
301
-
302
- }
303
- var code = $('<'+tag+'/>')
304
- .attr('src',src)
305
- .attr('width',width)
306
- .attr('height',height)
307
- .attr('allowfullscreen',embedProvider.embedtag.allowfullscreen || 'true')
308
- .attr('allowscriptaccess',embedProvider.embedtag.allowfullscreen || 'always')
309
- .css('max-height', settings.maxHeight || 'auto' )
310
- .css('max-width', settings.maxWidth || 'auto' );
311
- if(tag=='embed')
312
- code
313
- .attr('type',embedProvider.embedtag.type || "application/x-shockwave-flash")
314
- .attr('flashvars',externalUrl.replace(embedProvider.templateRegex,flashvars));
315
- if(tag=='iframe')
316
- code
317
- .attr('scrolling',embedProvider.embedtag.scrolling || "no")
318
- .attr('frameborder',embedProvider.embedtag.frameborder || "0");
319
-
320
- var oembedData = {code: code};
321
- success(oembedData, externalUrl,container);
322
- }else if (embedProvider.apiendpoint) {
323
- //Add APIkey if true
324
- if (embedProvider.apikey) embedProvider.apiendpoint = embedProvider.apiendpoint.replace('_APIKEY_', settings.apikeys[embedProvider.name]);
325
- ajaxopts = $.extend({
326
- url: externalUrl.replace(embedProvider.templateRegex, embedProvider.apiendpoint),
327
- dataType: 'jsonp',
328
- success: function(data) {
329
- var oembedData = $.extend({}, data);
330
- oembedData.code = embedProvider.templateData(data);
331
- success(oembedData, externalUrl, container);
332
- },
333
- error: function () {
334
- settings.onError.call(container, externalUrl, embedProvider);
335
- }
336
- }, settings.ajaxOptions || {});
337
-
338
- $.ajax( ajaxopts );
339
- }else {
340
- var oembedData = {code: externalUrl.replace(embedProvider.templateRegex,embedProvider.template)};
341
- success(oembedData, externalUrl,container);
342
- }
343
- } else {
344
-
345
- var requestUrl = getRequestUrl(embedProvider, externalUrl),
346
- ajaxopts = $.extend({
347
- url: requestUrl,
348
- dataType: embedProvider.dataType || 'jsonp',
349
- success: function(data) {
350
- var oembedData = $.extend({}, data);
351
- switch (oembedData.type) {
352
- case "file": //Deviant Art has this
353
- case "photo":
354
- oembedData.code = $.fn.oembed.getPhotoCode(externalUrl, oembedData);
355
- break;
356
- case "video":
357
- case "rich":
358
- oembedData.code = $.fn.oembed.getRichCode(externalUrl, oembedData);
359
- break;
360
- default:
361
- oembedData.code = $.fn.oembed.getGenericCode(externalUrl, oembedData);
362
- break;
363
- }
364
- success(oembedData, externalUrl, container);
365
- },
366
- error: function () {
367
- settings.onError.call(container, externalUrl, embedProvider);
368
- }
369
- }, settings.ajaxOptions || {});
370
-
371
- $.ajax(ajaxopts);
372
- }
373
- };
374
-
375
- function getNormalizedParams(params) {
376
- if (params === null) return null;
377
- var key, normalizedParams = {};
378
- for (key in params) {
379
- if (key !== null) normalizedParams[key.toLowerCase()] = params[key];
380
- }
381
- return normalizedParams;
382
- }
383
-
384
- /* Public functions */
385
- $.fn.oembed.insertCode = function(container, embedMethod, oembedData) {
386
- if (oembedData === null) return;
387
- if(embedMethod=='auto' && container.attr("href") !== null) embedMethod='append';
388
- else if(embedMethod=='auto') embedMethod='replace';
389
- switch (embedMethod) {
390
- case "replace":
391
- container.replaceWith(oembedData.code);
392
- break;
393
- case "fill":
394
- container.html(oembedData.code);
395
- break;
396
- case "append":
397
- container.wrap('<div class="oembedall-container"></div>');
398
- var oembedContainer = container.parent();
399
- if (settings.includeHandle) {
400
- $('<span class="oembedall-closehide">&darr;</span>').insertBefore(container).click(function() {
401
- var encodedString = encodeURIComponent($(this).text());
402
- $(this).html((encodedString == '%E2%86%91') ? '&darr;' : '&uarr;');
403
- $(this).parent().children().last().toggle();
404
- });
405
- }
406
- oembedContainer.append('<br/>');
407
- try {
408
- oembedData.code.clone().appendTo(oembedContainer);
409
- } catch(e) {
410
- oembedContainer.append(oembedData.code);
411
- }
412
- /* Make videos semi-responsive
413
- * If parent div width less than embeded iframe video then iframe gets shrunk to fit smaller width
414
- * If parent div width greater thans embed iframe use the max widht
415
- * - works on youtubes and vimeo
416
- */
417
- /*if (settings.maxWidth) {
418
- var post_width = oembedContainer.parent().width();
419
- if (post_width < settings.maxWidth && settings.useResponsiveResize)
420
- {
421
- var iframe_width_orig = $('iframe',oembedContainer).width();
422
- var iframe_height_orig = $('iframe',oembedContainer).height();
423
- var ratio = iframe_width_orig / post_width;
424
- $('iframe',oembedContainer).width(iframe_width_orig / ratio);
425
- $('iframe',oembedContainer).height(iframe_height_orig / ratio);
426
- } else {
427
- if(settings.maxWidth){
428
- $('iframe',oembedContainer).width(settings.maxWidth);
429
- }
430
- if(settings.maxHeight){
431
- $('iframe',oembedContainer).height(settings.maxHeight);
432
- }
433
- }
434
- }*/
435
- break;
436
- }
437
- };
438
-
439
- $.fn.oembed.getPhotoCode = function (url, oembedData) {
440
- var code, alt = oembedData.title ? oembedData.title : '';
441
- alt += oembedData.author_name ? ' - ' + oembedData.author_name : '';
442
- alt += oembedData.provider_name ? ' - ' + oembedData.provider_name : '';
443
- if (oembedData.url) {
444
- code = '<div><a href="' + url + '" target=\'_blank\'><img src="' + oembedData.url + '" alt="' + alt + '"/></a></div>';
445
- } else if (oembedData.thumbnail_url) {
446
- var newURL = oembedData.thumbnail_url.replace('_s', '_b');
447
- code = '<div><a href="' + url + '" target=\'_blank\'><img src="' + newURL + '" alt="' + alt + '"/></a></div>';
448
- } else {
449
- code = '<div>Error loading this picture</div>';
450
- }
451
- if (oembedData.html) code += "<div>" + oembedData.html + "</div>";
452
- return code;
453
- };
454
-
455
- $.fn.oembed.getRichCode = function(url, oembedData) {
456
- var code = oembedData.html;
457
- return code;
458
- };
459
-
460
- $.fn.oembed.getGenericCode = function(url, oembedData) {
461
- var title = (oembedData.title !== null) ? oembedData.title : url,
462
- code = '<a href="' + url + '">' + title + '</a>';
463
- if (oembedData.html) code += "<div>" + oembedData.html + "</div>";
464
- return code;
465
- };
466
-
467
- $.fn.oembed.getOEmbedProvider = function(url) {
468
- for (var i = 0; i < $.fn.oembed.providers.length; i++) {
469
- for (var j = 0, l =$.fn.oembed.providers[i].urlschemes.length; j < l; j++) {
470
- var regExp = new RegExp($.fn.oembed.providers[i].urlschemes[j], "i");
471
- if (url.match(regExp) !== null) return $.fn.oembed.providers[i];
472
- }
473
- }
474
- return null;
475
- };
476
-
477
- $.fn.oembed.OEmbedProvider = function(name, type, urlschemesarray, apiendpoint, extraSettings) {
478
- this.name = name;
479
- this.type = type; // "photo", "video", "link", "rich", null
480
- this.urlschemes = urlschemesarray;
481
- this.apiendpoint = apiendpoint;
482
- this.maxWidth = 500;
483
- this.maxHeight = 400;
484
- extraSettings =extraSettings ||{};
485
-
486
- if(extraSettings.useYQL){
487
-
488
- if(extraSettings.useYQL=='xml'){
489
- extraSettings.yql = {xpath:"//oembed/html", from:'xml'
490
- , apiendpoint: this.apiendpoint
491
- , url: function(externalurl){return this.apiendpoint+'?format=xml&url='+externalurl; }
492
- , datareturn:function(results){return results.html.replace(/.*\[CDATA\[(.*)\]\]>$/,'$1') || ''; }
493
- };
494
- }else{
495
- extraSettings.yql = {from:'json'
496
- , apiendpoint: this.apiendpoint
497
- , url: function(externalurl){return this.apiendpoint+'?format=json&url='+externalurl; }
498
- , datareturn: function (results) {
499
-
500
- if (results.json.type != 'video' && (results.json.url || results.json.thumbnail_url)) {
501
- return '<img src="' + (results.json.url || results.json.thumbnail_url) + '" />';
502
- } else if (results.json.html.indexOf("iframe")) {
503
-
504
- // Quick fix to handle attribute less html5 properties in ckeditor
505
- if (results.json.html.indexOf("allowfullscreen>")) {
506
- results.json.html = results.json.html.replace('allowfullscreen>', 'allowfullscreen="false">');
507
- }
508
-
509
- var html = $.parseHTML(results.json.html);
510
-
511
- var width = html[0].width;
512
- var height = html[0].height;
513
-
514
- if (settings.maxHeight && settings.maxWidth) {
515
-
516
- if (settings.useResponsiveResize) {
517
-
518
- var ratio;
519
-
520
- var newWidth = width;
521
- var newHeight = height;
522
-
523
- // Check if the current width is larger than the max
524
- if (width > settings.maxWidth) {
525
- ratio = settings.maxWidth / width;
526
-
527
- newWidth = settings.maxWidth;
528
- newHeight = height * ratio;
529
-
530
- // reset
531
- height = height * ratio;
532
- width = width * ratio;
533
- }
534
-
535
- // Check if current height is larger than max
536
- if (height > settings.maxHeight) {
537
- ratio = settings.maxHeight / height;
538
-
539
- newHeight = settings.maxHeight;
540
- newWidth = width * ratio;
541
- }
542
-
543
- height = newHeight;
544
- width = newWidth;
545
- } else {
546
- height = settings.maxHeight;
547
- width = settings.maxWidth;
548
- }
549
-
550
- }
551
-
552
- html[0].width = width;
553
- html[0].height = height;
554
-
555
- return html[0].outerHTML;
556
- }
557
- return results.json.html || '';
558
- }
559
- };
560
- }
561
- this.apiendpoint = null;
562
- }
563
-
564
-
565
- for (var property in extraSettings) {
566
- this[property] = extraSettings[property];
567
- }
568
-
569
- this.format = this.format || 'json';
570
- this.callbackparameter = this.callbackparameter || "callback";
571
- this.embedtag = this.embedtag || {tag:""};
572
-
573
-
574
- };
575
-
576
- /*
577
- * Function to update existing providers
578
- *
579
- * @param {String} name The name of the provider
580
- * @param {String} type The type of the provider can be "file", "photo", "video", "rich"
581
- * @param {String} urlshemesarray Array of url of the provider
582
- * @param {String} apiendpoint The endpoint of the provider
583
- * @param {String} extraSettings Extra settings of the provider
584
- */
585
- $.fn.updateOEmbedProvider = function (name, type, urlschemesarray, apiendpoint, extraSettings) {
586
- for (var i = 0; i < $.fn.oembed.providers.length; i++) {
587
- if ($.fn.oembed.providers[i].name === name) {
588
- if (type !== null) {
589
- $.fn.oembed.providers[i].type = type;
590
- }
591
- if (urlschemesarray !== null) {
592
- $.fn.oembed.providers[i].urlschemes = urlschemesarray;
593
- }
594
- if (apiendpoint !== null) {
595
- $.fn.oembed.providers[i].apiendpoint = apiendpoint;
596
- }
597
- if (extraSettings !== null) {
598
- $.fn.oembed.providers[i].extraSettings = extraSettings;
599
- for (var property in extraSettings) {
600
- if (extraSettings[property] !== null) {
601
- $.fn.oembed.providers[i][property] = extraSettings[property];
602
- }
603
- }
604
- }
605
- }
606
- }
607
- };
608
-
609
- /* Native & common providers */
610
- $.fn.oembed.providers = [
611
-
612
- //Video
613
- //new $.fn.oembed.OEmbedProvider("youtube", "video", ["youtube\\.com/watch.+v=[\\w-]+&?", "youtu\\.be/[\\w-]+", "youtube.com/embed"], checkProtocol() + 'www.youtube.com/embed/$1?wmode=transparent', {
614
- // templateRegex: /.*(?:v\=|be\/|embed\/)([\w\-]+)&?.*/,embedtag: {tag: 'iframe',width: '425',height: '349'}
615
- //}),
616
-
617
- new $.fn.oembed.OEmbedProvider("youtube", "video", ["youtube\\.com/watch.+v=[\\w-]+&?", "youtu\\.be/[\\w-]+"], checkProtocol() + 'www.youtube.com/oembed', {useYQL:'json'}),
618
- new $.fn.oembed.OEmbedProvider("youtubeiframe", "video", ["youtube.com/embed"], "$1?wmode=transparent",
619
- {templateRegex:/(.*)/,embedtag : {tag: 'iframe', width:'425',height: '349'}}),
620
- 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'}),
621
- new $.fn.oembed.OEmbedProvider("xtranormal", "video", ["xtranormal\\.com/watch/.+"], "http://www.xtranormal.com/xtraplayr/$1/$2", {
622
- templateRegex: /.*com\/watch\/([\w\-]+)\/([\w\-]+).*/,embedtag: {tag: 'iframe',width: '320',height: '269'}}),
623
- new $.fn.oembed.OEmbedProvider("scivee", "video", ["scivee.tv/node/.+"], "http://www.scivee.tv/flash/embedCast.swf?", {
624
- templateRegex: /.*tv\/node\/(.+)/,embedtag: {width: '480',height: '400',flashvars:"id=$1&type=3"}}),
625
- 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", {
626
- templateRegex: /.*watch\/([^\?]+).*/,embedtag: {width: '410',height: '341'}}),
627
- new $.fn.oembed.OEmbedProvider("gametrailers", "video", ["gametrailers\\.com/video/.+"], "http://media.mtvnservices.com/mgid:moses:video:gametrailers.com:$2", {
628
- templateRegex: /.*com\/video\/([\w\-]+)\/([\w\-]+).*/,embedtag: {width: '512',height: '288' }}),
629
- new $.fn.oembed.OEmbedProvider("funnyordie", "video", ["funnyordie\\.com/videos/.+"], "http://player.ordienetworks.com/flash/fodplayer.swf?", {
630
- templateRegex: /.*videos\/([^\/]+)\/([^\/]+)?/,embedtag: {width: 512,height: 328,flashvars: "key=$1"}}),
631
- 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",
632
- {templateRegex:/.*video\/([^\/]+).*/ , embedtag : {width:600,height: 338}}),
633
- new $.fn.oembed.OEmbedProvider("metacafe", "video", ["metacafe\\.com/watch/.+"],"http://www.metacafe.com/fplayer/$1/$2.swf",
634
- {templateRegex:/.*watch\/(\d+)\/(\w+)\/.*/ , embedtag : {width:400,height: 345}}),
635
- new $.fn.oembed.OEmbedProvider("bambuser", "video", ["bambuser\\.com\/channel\/.*\/broadcast\/.*"],"http://static.bambuser.com/r/player.swf?vid=$1",
636
- {templateRegex:/.*bambuser\.com\/channel\/.*\/broadcast\/(\w+).*/ , embedtag : {width:512,height: 339 }}),
637
- new $.fn.oembed.OEmbedProvider("twitvid", "video", ["twitvid\\.com/.+"],"http://www.twitvid.com/embed.php?guid=$1&autoplay=0",
638
- {templateRegex:/.*twitvid\.com\/(\w+).*/ , embedtag : {tag:'iframe',width:480,height: 360 }}),
639
-
640
- new $.fn.oembed.OEmbedProvider("aniboom", "video", ["aniboom\\.com/animation-video/.+"],"http://api.aniboom.com/e/$1",
641
- {templateRegex:/.*animation-video\/(\d+).*/ , embedtag : {width:594,height: 334}}),
642
-
643
- new $.fn.oembed.OEmbedProvider("vzaar", "video", ["vzaar\\.com/videos/.+","vzaar.tv/.+"],"http://view.vzaar.com/$1/player?",
644
- {templateRegex:/.*\/(\d+).*/, embedtag : {tag:'iframe',width:576,height: 324 }}),
645
- new $.fn.oembed.OEmbedProvider("snotr", "video", ["snotr\\.com/video/.+"],"http://www.snotr.com/embed/$1",
646
- {templateRegex:/.*\/(\d+).*/, embedtag : {tag:'iframe',width:400,height: 330, nocache:1 }}),
647
-
648
- new $.fn.oembed.OEmbedProvider("youku", "video", ["v.youku.com/v_show/id_.+"],"http://player.youku.com/player.php/sid/$1/v.swf",
649
- {templateRegex:/.*id_(.+)\.html.*/, embedtag : {width:480,height:400, nocache:1 }}),
650
- new $.fn.oembed.OEmbedProvider("tudou", "video", ["tudou.com/programs/view/.+\/"],"http://www.tudou.com/v/$1/v.swf",
651
- {templateRegex:/.*view\/(.+)\//, embedtag : {width:480,height:400, nocache:1 }}),
652
-
653
- new $.fn.oembed.OEmbedProvider("embedr", "video", ["embedr\\.com/playlist/.+"],"http://embedr.com/swf/slider/$1/425/520/default/false/std?",
654
- {templateRegex:/.*playlist\/([^\/]+).*/, embedtag : {width:425,height: 520}}),
655
- new $.fn.oembed.OEmbedProvider("blip", "video", ["blip\\.tv/.+"], "http://blip.tv/oembed/"),
656
- 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'}),
657
- new $.fn.oembed.OEmbedProvider("animoto", "video", ["animoto.com/play/.+"], "http://animoto.com/services/oembed"),
658
- new $.fn.oembed.OEmbedProvider("hulu", "video", ["hulu\\.com/watch/.*"], "http://www.hulu.com/api/oembed.json"),
659
- new $.fn.oembed.OEmbedProvider("ustream", "video", ["ustream\\.tv/recorded/.*"], "http://www.ustream.tv/oembed",{useYQL:'json'}),
660
- new $.fn.oembed.OEmbedProvider("videojug", "video", ["videojug\\.com/(film|payer|interview).*"], "http://www.videojug.com/oembed.json",{useYQL:'json'}),
661
- new $.fn.oembed.OEmbedProvider("sapo", "video", ["videos\\.sapo\\.pt/.*"], "http://videos.sapo.pt/oembed",{useYQL:'json'}),
662
- new $.fn.oembed.OEmbedProvider("vodpod", "video", ["vodpod.com/watch/.*"], "http://vodpod.com/oembed.js",{useYQL:'json'}),
663
- new $.fn.oembed.OEmbedProvider("vimeo", "video", ["www\.vimeo\.com\/groups\/.*\/videos\/.*", "www\.vimeo\.com\/.*", "vimeo\.com\/groups\/.*\/videos\/.*", "vimeo\.com\/.*"], "//vimeo.com/api/oembed.json"),
664
- new $.fn.oembed.OEmbedProvider("dailymotion", "video", ["dailymotion\\.com/.+"],'http://www.dailymotion.com/services/oembed'),
665
- new $.fn.oembed.OEmbedProvider("5min", "video", ["www\\.5min\\.com/.+"], 'http://api.5min.com/oembed.xml',{useYQL:'xml'}),
666
- new $.fn.oembed.OEmbedProvider("National Film Board of Canada", "video", ["nfb\\.ca/film/.+"],'http://www.nfb.ca/remote/services/oembed/',{useYQL:'json'}),
667
- new $.fn.oembed.OEmbedProvider("qik", "video", ["qik\\.com/\\w+"], 'http://qik.com/api/oembed.json',{useYQL:'json'}),
668
- new $.fn.oembed.OEmbedProvider("revision3", "video", ["revision3\\.com"], "http://revision3.com/api/oembed/"),
669
- new $.fn.oembed.OEmbedProvider("dotsub", "video", ["dotsub\\.com/view/.+"], "http://dotsub.com/services/oembed",{useYQL:'json'}),
670
- new $.fn.oembed.OEmbedProvider("clikthrough", "video", ["clikthrough\\.com/theater/video/\\d+"], "http://clikthrough.com/services/oembed"),
671
- new $.fn.oembed.OEmbedProvider("Kinomap", "video", ["kinomap\\.com/.+"], "http://www.kinomap.com/oembed"),
672
- new $.fn.oembed.OEmbedProvider("VHX", "video", ["vhx.tv/.+"], "http://vhx.tv/services/oembed.json"),
673
- new $.fn.oembed.OEmbedProvider("bambuser", "video", ["bambuser.com/.+"], "http://api.bambuser.com/oembed/iframe.json"),
674
- new $.fn.oembed.OEmbedProvider("justin.tv", "video", ["justin.tv/.+"], 'http://api.justin.tv/api/embed/from_url.json',{useYQL:'json'}),
675
-
676
-
677
- //Audio
678
- new $.fn.oembed.OEmbedProvider("official.fm", "rich", ["official.fm/.+"], 'http://official.fm/services/oembed',{useYQL:'json'}),
679
- new $.fn.oembed.OEmbedProvider("chirbit", "rich", ["chirb.it/.+"], 'http://chirb.it/oembed.json',{useYQL:'json'}),
680
- new $.fn.oembed.OEmbedProvider("Huffduffer", "rich", ["huffduffer.com/[-.\\w@]+/\\d+"], "http://huffduffer.com/oembed"),
681
- new $.fn.oembed.OEmbedProvider("Spotify", "rich", ["open.spotify.com/(track|album|user)/"], "https://embed.spotify.com/oembed/"),
682
- new $.fn.oembed.OEmbedProvider("shoudio", "rich", ["shoudio.com/.+","shoud.io/.+"], "http://shoudio.com/api/oembed"),
683
- new $.fn.oembed.OEmbedProvider("mixcloud", "rich", ["mixcloud.com/.+"], checkProtocol() + 'www.mixcloud.com/oembed/', { useYQL: 'json' }),
684
- new $.fn.oembed.OEmbedProvider("rdio.com", "rich", ["rd.io/.+", "rdio.com"], checkProtocol() + "www.rdio.com/api/oembed/"),
685
- new $.fn.oembed.OEmbedProvider("Soundcloud", "rich", ["soundcloud.com/.+", "snd.sc/.+"], checkProtocol() + "soundcloud.com/oembed", { format: 'js' }),
686
- new $.fn.oembed.OEmbedProvider("bandcamp", "rich", ["bandcamp\\.com/album/.+"], null,
687
- {yql:{xpath:"//meta[contains(@content, \\'EmbeddedPlayer\\')]", from:'html'
688
- , datareturn:function(results){
689
- return results.meta ?'<iframe width="400" height="100" src="'+results.meta.content+'" allowtransparency="true" frameborder="0"></iframe>':false;
690
- }
691
- }
692
- }),
693
-
694
- //Photo
695
- new $.fn.oembed.OEmbedProvider("deviantart", "photo", ["deviantart.com/.+","fav.me/.+","deviantart.com/.+"], "http://backend.deviantart.com/oembed",{format:'jsonp'}),
696
- new $.fn.oembed.OEmbedProvider("skitch", "photo", ["skitch.com/.+"], null,
697
- {yql:{xpath:"json", from:'json'
698
- , url: function(externalurl){return 'http://skitch.com/oembed/?format=json&url='+externalurl; }
699
- , datareturn:function(data){return $.fn.oembed.getPhotoCode( data.json.url, data.json);}
700
- }
701
- }),
702
- new $.fn.oembed.OEmbedProvider("mobypicture", "photo", ["mobypicture.com/user/.+/view/.+","moby.to/.+"], "http://api.mobypicture.com/oEmbed"),
703
- new $.fn.oembed.OEmbedProvider("flickr", "photo", ["flickr\\.com/photos/.+"], "http://flickr.com/services/oembed",{callbackparameter:'jsoncallback'}),
704
- new $.fn.oembed.OEmbedProvider("photobucket", "photo", ["photobucket\\.com/(albums|groups)/.+"], checkProtocol() + "photobucket.com/oembed/"),
705
- new $.fn.oembed.OEmbedProvider("instagram", "photo", ["instagr\\.?am(\\.com)?/.+"], checkProtocol() + "api.instagram.com/oembed"),
706
- //new $.fn.oembed.OEmbedProvider("yfrog", "photo", ["yfrog\\.(com|ru|com\\.tr|it|fr|co\\.il|co\\.uk|com\\.pl|pl|eu|us)/.+"], checkProtocol() + "www.yfrog.com/api/oembed",{useYQL:"json"}),
707
- new $.fn.oembed.OEmbedProvider("SmugMug", "photo", ["smugmug.com/[-.\\w@]+/.+"], "http://api.smugmug.com/services/oembed/"),
708
-
709
- new $.fn.oembed.OEmbedProvider("dribbble", "photo", ["dribbble.com/shots/.+"], "http://api.dribbble.com/shots/$1?callback=?",
710
- { templateRegex:/.*shots\/([\d]+).*/,
711
- templateData : function(data){if(!data.image_teaser_url)return false;
712
- return '<img src="'+data.image_teaser_url+'"/>';
713
- }
714
- }),
715
- new $.fn.oembed.OEmbedProvider("chart.ly", "photo", ["chart\\.ly/[a-z0-9]{6,8}"],"http://chart.ly/uploads/large_$1.png",
716
- {templateRegex:/.*ly\/([^\/]+).*/ , embedtag : {tag:'img'},nocache:1}),
717
- //new $.fn.oembed.OEmbedProvider("stocktwits.com", "photo", ["stocktwits\\.com/message/.+"], "http://charts.stocktwits.com/production/original_$1.png?",
718
- // { templateRegex: /.*message\/([^\/]+).*/, embedtag: { tag: 'img'},nocache:1 }),
719
- new $.fn.oembed.OEmbedProvider("circuitlab", "photo", ["circuitlab.com/circuit/.+"],"https://www.circuitlab.com/circuit/$1/screenshot/540x405/",
720
- {templateRegex:/.*circuit\/([^\/]+).*/ , embedtag : {tag:'img'},nocache:1}),
721
- new $.fn.oembed.OEmbedProvider("23hq", "photo", ["23hq.com/[-.\\w@]+/photo/.+"],"http://www.23hq.com/23/oembed",{useYQL:"json"}),
722
- new $.fn.oembed.OEmbedProvider("img.ly", "photo", ["img\\.ly/.+"],"http://img.ly/show/thumb/$1",
723
- {templateRegex:/.*ly\/([^\/]+).*/ , embedtag : {tag:'img'},nocache:1
724
- }),
725
- new $.fn.oembed.OEmbedProvider("twitgoo.com", "photo", ["twitgoo\\.com/.+"],"http://twitgoo.com/show/thumb/$1",
726
- {templateRegex:/.*com\/([^\/]+).*/ , embedtag : {tag:'img'},nocache:1}),
727
- new $.fn.oembed.OEmbedProvider("imgur.com", "photo", ["imgur\\.com/gallery/.+"], checkProtocol() + "imgur.com/$1l.jpg",
728
- {templateRegex:/.*gallery\/([^\/]+).*/ , embedtag : {tag:'img'},nocache:1}),
729
- new $.fn.oembed.OEmbedProvider("visual.ly", "rich", ["visual\\.ly/.+"], null,
730
- {yql:{xpath:"//a[@id=\\'gc_article_graphic_image\\']/img", from:'htmlstring'}
731
- }),
732
- new $.fn.oembed.OEmbedProvider("gravtar", "photo", ["mailto:.+"],null,
733
- {templateRegex:/mailto:([^\/]+).*/
734
- , template : function(wm,email){
735
- return '<img src="http://gravatar.com/avatar/'+email.md5()+'.jpg" alt="on Gravtar" class="jqoaImg">';
736
- }
737
- }),
738
-
739
- //Rich
740
- new $.fn.oembed.OEmbedProvider("twitter", "rich", ["twitter.com/.+"], "https://api.twitter.com/1/statuses/oembed.json"),
741
- new $.fn.oembed.OEmbedProvider("gmep", "rich", ["gmep.imeducate.com/.*","gmep.org/.*"], "http://gmep.org/oembed.json"),
742
- new $.fn.oembed.OEmbedProvider("urtak", "rich", ["urtak.com/(u|clr)/.+"], "http://oembed.urtak.com/1/oembed"),
743
- new $.fn.oembed.OEmbedProvider("cacoo", "rich", ["cacoo.com/.+"], "http://cacoo.com/oembed.json"),
744
- new $.fn.oembed.OEmbedProvider("dailymile", "rich", ["dailymile.com/people/.*/entries/.*"], "http://api.dailymile.com/oembed"),
745
- new $.fn.oembed.OEmbedProvider("dipity", "rich", ["dipity.com/timeline/.+"],'http://www.dipity.com/oembed/timeline/',{useYQL:'json'}),
746
- new $.fn.oembed.OEmbedProvider("sketchfab", "rich", ["sketchfab.com/show/.+"],'http://sketchfab.com/oembed',{useYQL:'json'}),
747
- new $.fn.oembed.OEmbedProvider("speakerdeck", "rich", ["speakerdeck.com/.+"],'http://speakerdeck.com/oembed.json',{useYQL:'json'}),
748
- new $.fn.oembed.OEmbedProvider("popplet", "rich", ["popplet.com/app/.*"],"http://popplet.com/app/Popplet_Alpha.swf?page_id=$1&em=1",
749
- {templateRegex:/.*#\/([^\/]+).*/,embedtag : {width:460,height: 460} }),
750
-
751
- new $.fn.oembed.OEmbedProvider("pearltrees", "rich", ["pearltrees.com/.*"],"http://cdn.pearltrees.com/s/embed/getApp?",
752
- {templateRegex:/.*N-f=1_(\d+).*N-p=(\d+).*/, embedtag : {width:460,height: 460,
753
- flashvars : "lang=en_US&amp;embedId=pt-embed-$1-693&amp;treeId=$1&amp;pearlId=$2&amp;treeTitle=Diagrams%2FVisualization&amp;site=www.pearltrees.com%2FF"}
754
- }),
755
-
756
- new $.fn.oembed.OEmbedProvider("prezi", "rich", ["prezi.com/.*"],"http://prezi.com/bin/preziloader.swf?",
757
- {templateRegex:/.*com\/([^\/]+)\/.*/,embedtag : {width:550,height: 400,
758
- flashvars : "prezi_id=$1&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0"
759
- }
760
- }),
761
-
762
- new $.fn.oembed.OEmbedProvider("tourwrist", "rich", ["tourwrist.com/tours/.+"], null,
763
- { templateRegex:/.*tours.([\d]+).*/,
764
- template : function(wm,tourid){
765
- setTimeout(function(){if(loadEmbeds)loadEmbeds();},2000);
766
- return "<div id='"+tourid+"' class='tourwrist-tour-embed direct'></div> <script type='text/javascript' src='http://tourwrist.com/tour_embed.js'></script>";
767
- }
768
- }),
769
-
770
- new $.fn.oembed.OEmbedProvider("meetup", "rich", ["meetup\\.(com|ps)/.+"], checkProtocol() + "api.meetup.com/oembed"),
771
- new $.fn.oembed.OEmbedProvider("ebay", "rich", ["ebay\\.*"], checkProtocol() + "togo.ebay.com/togo/togo.swf?2008013100",
772
- {templateRegex:/.*\/([^\/]+)\/(\d{10,13}).*/, embedtag : {width:355,height: 300,
773
- flashvars : "base=http://togo.ebay.com/togo/&lang=en-us&mode=normal&itemid=$2&query=$1"
774
- }
775
- }),
776
- new $.fn.oembed.OEmbedProvider("wikipedia", "rich", ["wikipedia.org/wiki/.+"], "http://$1.wikipedia.org/w/api.php?action=parse&page=$2&format=json&section=0&callback=?",{
777
- templateRegex:/.*\/\/([\w]+).*\/wiki\/([^\/]+).*/,
778
- templateData : function(data){if(!data.parse)return false;
779
- var text = data.parse['text']['*'].replace(/href="\/wiki/g,'href="http://en.wikipedia.org/wiki');
780
- 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>';
781
- }
782
- }),
783
- new $.fn.oembed.OEmbedProvider("imdb", "rich", ["imdb.com/title/.+"], "http://www.imdbapi.com/?i=$1&callback=?",
784
- {templateRegex:/.*\/title\/([^\/]+).*/,
785
- templateData : function(data){if(!data.Title)return false;
786
- 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>';
787
- }
788
- }),
789
- new $.fn.oembed.OEmbedProvider("livejournal", "rich", ["livejournal.com/"], "http://ljpic.seacrow.com/json/$2$4?jsonp=?"
790
- ,{templateRegex:/(http:\/\/(((?!users).)+)\.livejournal\.com|.*users\.livejournal\.com\/([^\/]+)).*/,
791
- templateData : function(data){if(!data.username)return false;
792
- 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>';
793
- }
794
- }),
795
- new $.fn.oembed.OEmbedProvider("circuitbee", "rich", ["circuitbee\\.com/circuit/view/.+"],"http://c.circuitbee.com/build/r/schematic-embed.html?id=$1",
796
- {templateRegex:/.*circuit\/view\/(\d+).*/ ,embedtag : {tag: 'iframe', width:'500',height: '350'}
797
- }),
798
-
799
- new $.fn.oembed.OEmbedProvider("googlecalendar", "rich", ["www.google.com/calendar/embed?.+"],"$1",
800
- {templateRegex:/(.*)/ ,embedtag : {tag: 'iframe', width:'800',height: '600' }
801
- }),
802
- new $.fn.oembed.OEmbedProvider("jsfiddle", "rich", ["jsfiddle.net/[^/]+/?"],"http://jsfiddle.net/$1/embedded/result,js,resources,html,css/?",
803
- {templateRegex:/.*net\/([^\/]+).*/ ,embedtag : {tag: 'iframe', width:'100%',height: '300' }
804
- }),
805
- new $.fn.oembed.OEmbedProvider("jsbin", "rich", ["jsbin.com/.+"],"http://jsbin.com/$1/?",
806
- {templateRegex:/.*com\/([^\/]+).*/ ,embedtag : {tag: 'iframe', width:'100%',height: '300' }
807
- }),
808
-
809
- new $.fn.oembed.OEmbedProvider("jotform", "rich", ["form.jotform.co/form/.+"],"$1?",
810
- {templateRegex:/(.*)/ ,embedtag : {tag: 'iframe', width:'100%',height: '507' }
811
- }),
812
- new $.fn.oembed.OEmbedProvider("reelapp", "rich", ["reelapp\\.com/.+"],"http://www.reelapp.com/$1/embed",
813
- {templateRegex:/.*com\/(\S{6}).*/ ,embedtag : {tag: 'iframe', width:'400',height: '338'}
814
- }),
815
- 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",
816
- {templateRegex:/(.*)/ ,embedtag : {tag: 'iframe', width:'368px',height: 'auto'}
817
- }),
818
-
819
- new $.fn.oembed.OEmbedProvider("timetoast", "rich", ["timetoast.com/timelines/[0-9]+"],"http://www.timetoast.com/flash/TimelineViewer.swf?passedTimelines=$1",
820
- {templateRegex:/.*timelines\/([0-9]*)/ ,embedtag : { width:550,height: 400,nocache:1}
821
- }),
822
- new $.fn.oembed.OEmbedProvider("pastebin", "rich", ["pastebin\\.com/[\\S]{8}"],"http://pastebin.com/embed_iframe.php?i=$1",
823
- {templateRegex:/.*\/(\S{8}).*/ ,embedtag : {tag: 'iframe', width:'100%',height: 'auto'}
824
- }),
825
- new $.fn.oembed.OEmbedProvider("mixlr", "rich", ["mixlr.com/.+"],"http://mixlr.com/embed/$1?autoplay=ae",
826
- {templateRegex:/.*com\/([^\/]+).*/ ,embedtag : {tag: 'iframe', width:'100%',height: 'auto' }
827
- }),
828
- new $.fn.oembed.OEmbedProvider("pastie", "rich", ["pastie\\.org/pastes/.+"],null,{yql:{xpath:'//pre[@class="textmate-source"]'}}),
829
- new $.fn.oembed.OEmbedProvider("github", "rich", ["gist.github.com/.+"], "https://github.com/api/oembed"),
830
- new $.fn.oembed.OEmbedProvider("github", "rich", ["github.com/[-.\\w@]+/[-.\\w@]+"], "https://api.github.com/repos/$1/$2?callback=?"
831
- ,{templateRegex:/.*\/([^\/]+)\/([^\/]+).*/,
832
- templateData : function(data){ if(!data.data.html_url)return false;
833
- 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">&#x25c9; '+data.data.watchers+'</a></li>'
834
- +'<li class="oembedall-forks"><a title="Forks" href="'+data.data.html_url+'/network">&#x0265; '+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>'
835
- +'<p class="oembedall-updated-at">Last updated: '+data.data.pushed_at+'</p></div></div>';
836
- }
837
- }),
838
-
839
- new $.fn.oembed.OEmbedProvider("facebook", "rich", ["facebook.com/(people/[^\\/]+/\\d+|[^\\/]+$)"], "https://graph.facebook.com/$2$3/?callback=?"
840
- ,{templateRegex:/.*facebook.com\/(people\/[^\/]+\/(\d+).*|([^\/]+$))/,
841
- templateData : function(data){ if(!data.id)return false;
842
- var out = '<div class="oembedall-facebook1"><div class="oembedall-facebook2"><a href="http://www.facebook.com/">facebook</a> ';
843
- if(data.from) out += '<a href="http://www.facebook.com/'+data.from.id+'">'+data.from.name+'</a>';
844
- else if(data.link) out += '<a href="'+data.link+'">'+data.name+'</a>';
845
- else if(data.username) out += '<a href="http://www.facebook.com/'+data.username+'">'+data.name+'</a>';
846
- else out += '<a href="http://www.facebook.com/'+data.id+'">'+data.name+'</a>';
847
- out += '</div><div class="oembedall-facebookBody"><div class="contents">';
848
- if(data.picture) out += '<a href="'+data.link+'"><img src="'+data.picture+'"></a>';
849
- else out += '<img src="https://graph.facebook.com/'+data.id+'/picture">';
850
- if(data.from) out += '<a href="'+data.link+'">'+data.name+'</a>';
851
- if(data.founded) out += 'Founded: <strong>'+data.founded+'</strong><br>';
852
- if(data.category) out += 'Category: <strong>'+data.category+'</strong><br>';
853
- if(data.website) out += 'Website: <strong><a href="'+data.website+'">'+data.website+'</a></strong><br>';
854
- if(data.gender) out += 'Gender: <strong>'+data.gender+'</strong><br>';
855
- if(data.description) out += data.description + '<br>';
856
- out += '</div></div>';
857
- return out;
858
- }
859
- }),
860
- new $.fn.oembed.OEmbedProvider("stackoverflow", "rich", ["stackoverflow.com/questions/[\\d]+"], "http://api.stackoverflow.com/1.1/questions/$1?body=true&jsonp=?"
861
- ,{templateRegex:/.*questions\/([\d]+).*/,
862
- templateData : function(data){
863
- if(!data.questions)return false;
864
- var q = data.questions[0];
865
- var body = $(q.body).text();
866
- 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">'
867
- +'<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>'
868
- +'</div><div class="oembedall-status"><strong>'+q.answer_count+'</strong>answer</div></div><div class="oembedall-views">'+q.view_count+' view(s)</div></div>'
869
- +'<div class="oembedall-summary"><h3><a class="oembedall-question-hyperlink" href="http://stackoverflow.com/questions/'+q.question_id+'/">'+q.title+'</a></h3>'
870
- +'<div class="oembedall-excerpt">'+ body.substring(0,100)+'...</div><div class="oembedall-tags">';
871
- for(i in q.tags)
872
- out += '<a title="" class="oembedall-post-tag" href="http://stackoverflow.com/questions/tagged/'+q.tags[i]+'">'+q.tags[i]+'</a>';
873
- 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+'">'
874
- +'<img width="32" height="32" alt="" src="http://www.gravatar.com/avatar/'+q.owner.email_hash+'?s=32&amp;d=identicon&amp;r=PG"></a></div><div class="oembedall-user-details">'
875
- +'<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">'
876
- +q.owner.reputation+'</span></div></div></div></div></div>';
877
- return out;
878
- }
879
- }),
880
- 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"),
881
- new $.fn.oembed.OEmbedProvider("screenr", "rich", ["screenr\.com"], "http://www.screenr.com/embed/$1",
882
- {templateRegex:/.*\/([^\/]+).*/
883
- ,embedtag : {tag: 'iframe', width:'650',height: 396}
884
- }) ,
885
- new $.fn.oembed.OEmbedProvider("gigpans", "rich", ["gigapan\\.org/[-.\\w@]+/\\d+"],"http://gigapan.org/gigapans/$1/options/nosnapshots/iframe/flash.html",
886
- {templateRegex:/.*\/(\d+)\/?.*/,
887
- embedtag : {tag: 'iframe', width:'100%',height: 400 }
888
- }),
889
- new $.fn.oembed.OEmbedProvider("scribd", "rich", ["scribd\\.com/.+"], checkProtocol() + "www.scribd.com/embeds/$1/content?start_page=1&view_mode=list",
890
- {templateRegex:/.*doc\/([^\/]+).*/ ,
891
- embedtag : {tag: 'iframe', width:'100%',height: 600}
892
- }),
893
- new $.fn.oembed.OEmbedProvider("kickstarter", "rich", ["kickstarter\\.com/projects/.+"], "$1/widget/card.html",
894
- {templateRegex:/([^\?]+).*/ ,
895
- embedtag : {tag: 'iframe', width:'220',height: 380}
896
- }),
897
-
898
- new $.fn.oembed.OEmbedProvider("amazon", "rich", ["amzn.com/B+", "amazon.com.*/(B\\S+)($|\\/.*)"], checkProtocol() + "rcm.amazon.com/e/cm?t=_APIKEY_&o=1&p=8&l=as1&asins=$1&ref=qf_br_asin_til&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr"
899
- ,{apikey: true,templateRegex:/.*\/(B[0-9A-Z]+)($|\/.*)/,
900
- embedtag : {tag: 'iframe', width:'120px',height: '240px'}
901
- }),
902
-
903
- new $.fn.oembed.OEmbedProvider("slideshare", "rich", ["slideshare\.net"], checkProtocol() + "www.slideshare.net/api/oembed/2", { format: 'jsonp' }),
904
- new $.fn.oembed.OEmbedProvider("roomsharejp", "rich", ["roomshare\\.jp/(en/)?post/.*"], "http://roomshare.jp/oembed.json"),
905
-
906
- new $.fn.oembed.OEmbedProvider("lanyard", "rich", ["lanyrd.com/\\d+/.+"], null,
907
- {yql:{xpath:'(//div[@class="primary"])[1]', from: 'htmlstring'
908
- , datareturn:function(results){
909
- if(!results.result) return false;
910
- return '<div class="oembedall-lanyard">'+results.result+'</div>';
911
- }
912
- }
913
- }),
914
- new $.fn.oembed.OEmbedProvider("asciiartfarts", "rich", ["asciiartfarts.com/\\d+.html"], null,
915
- {yql:{xpath:'//pre/font', from: 'htmlstring'
916
- , datareturn:function(results){
917
- if(!results.result) return false;
918
- return '<pre style="background-color:000;">'+results.result+'</div>';
919
- }
920
- }
921
- }),
922
-
923
-
924
-
925
- //Use Open Graph Where applicable
926
- new $.fn.oembed.OEmbedProvider("opengraph", "rich", [".*"], null,
927
- {yql:{xpath:"//meta|//title|//link", from:'html'
928
- , datareturn:function(results){
929
- if(!results['og:title'] && results['title'] &&results['description'])results['og:title']=results['title'];
930
- if(!results['og:title'] && !results['title'])return false;
931
- var code = $('<p/>');
932
- if(results['og:video']) {
933
- var embed = $('<embed src="'+results['og:video']+'"/>');
934
- embed
935
- .attr('type',results['og:video:type'] || "application/x-shockwave-flash")
936
- .css('max-height', settings.maxHeight || 'auto' )
937
- .css('max-width', settings.maxWidth || 'auto' );
938
- if(results['og:video:width']) embed.attr('width',results['og:video:width']);
939
- if(results['og:video:height']) embed.attr('height',results['og:video:height']);
940
- code.append(embed);
941
- }else if(results['og:image']) {
942
- var img = $('<img src="'+results['og:image']+'">');
943
- img.css('max-height', settings.maxHeight || 'auto' ).css('max-width', settings.maxWidth || 'auto' );
944
- if(results['og:image:width']) img.attr('width',results['og:image:width']);
945
- if(results['og:image:height']) img.attr('height',results['og:image:height']);
946
- code.append(img);
947
- }
948
- if(results['og:title']) code.append('<b>'+results['og:title']+'</b><br/>');
949
- if(results['og:description'])
950
- code.append(results['og:description']+'<br/>');
951
- else if(results['description'])
952
- code.append(results['description']+'<br/>');
953
- return code;
954
- }
955
- }
956
- })
957
-
958
- ];
959
- })(jQuery);
960
-
961
- //This is needed for gravatar :(
962
- 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;
963
- };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);
964
- }return[m,n,o,p];
965
- };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);
966
- }return c;
967
- };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);
968
- }for(f=0;f<g;f++){c[f>>2]|=(a.charCodeAt(f)&255)<<f%4*8;
969
- }c[f>>2]|=128<<f%4*8;c[b*16-2]=g*8;return c;
970
- };return i(h(j(this)));
971
- };