From 317f8f8f0651488f226b5280a8f036c7c135c639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 4 Dec 2017 17:54:04 +0100 Subject: Add oembed --- release/plugins/Audio/dialogs/audio.js | 9 + release/plugins/Audio/docs/install.html | 69 +++++++ release/plugins/Audio/docs/styles.css | 67 +++++++ release/plugins/Audio/images/audio.png | Bin 0 -> 15258 bytes release/plugins/Audio/images/icon.png | Bin 0 -> 1356 bytes release/plugins/Audio/images/placeholder.png | Bin 0 -> 862 bytes release/plugins/a11yhelp/dialogs/a11yhelp.js | 12 +- .../a11yhelp/dialogs/lang/_translationstatus.txt | 2 +- release/plugins/a11yhelp/dialogs/lang/af.js | 4 +- release/plugins/a11yhelp/dialogs/lang/ar.js | 4 +- release/plugins/a11yhelp/dialogs/lang/az.js | 11 ++ release/plugins/a11yhelp/dialogs/lang/bg.js | 4 +- release/plugins/a11yhelp/dialogs/lang/ca.js | 17 +- release/plugins/a11yhelp/dialogs/lang/cs.js | 6 +- release/plugins/a11yhelp/dialogs/lang/cy.js | 6 +- release/plugins/a11yhelp/dialogs/lang/da.js | 14 +- release/plugins/a11yhelp/dialogs/lang/de-ch.js | 10 +- release/plugins/a11yhelp/dialogs/lang/de.js | 13 +- release/plugins/a11yhelp/dialogs/lang/el.js | 6 +- release/plugins/a11yhelp/dialogs/lang/en-gb.js | 4 +- release/plugins/a11yhelp/dialogs/lang/en.js | 4 +- release/plugins/a11yhelp/dialogs/lang/eo.js | 9 +- release/plugins/a11yhelp/dialogs/lang/es-mx.js | 13 ++ release/plugins/a11yhelp/dialogs/lang/es.js | 11 +- release/plugins/a11yhelp/dialogs/lang/et.js | 4 +- release/plugins/a11yhelp/dialogs/lang/eu.js | 4 +- release/plugins/a11yhelp/dialogs/lang/fa.js | 6 +- release/plugins/a11yhelp/dialogs/lang/fi.js | 6 +- release/plugins/a11yhelp/dialogs/lang/fo.js | 4 +- release/plugins/a11yhelp/dialogs/lang/fr-ca.js | 8 +- release/plugins/a11yhelp/dialogs/lang/fr.js | 19 +- release/plugins/a11yhelp/dialogs/lang/gl.js | 16 +- release/plugins/a11yhelp/dialogs/lang/gu.js | 4 +- release/plugins/a11yhelp/dialogs/lang/he.js | 4 +- release/plugins/a11yhelp/dialogs/lang/hi.js | 4 +- release/plugins/a11yhelp/dialogs/lang/hr.js | 12 +- release/plugins/a11yhelp/dialogs/lang/hu.js | 8 +- release/plugins/a11yhelp/dialogs/lang/id.js | 16 +- release/plugins/a11yhelp/dialogs/lang/it.js | 6 +- release/plugins/a11yhelp/dialogs/lang/ja.js | 6 +- release/plugins/a11yhelp/dialogs/lang/km.js | 4 +- release/plugins/a11yhelp/dialogs/lang/ko.js | 6 +- release/plugins/a11yhelp/dialogs/lang/ku.js | 6 +- release/plugins/a11yhelp/dialogs/lang/lt.js | 4 +- release/plugins/a11yhelp/dialogs/lang/lv.js | 4 +- release/plugins/a11yhelp/dialogs/lang/mk.js | 6 +- release/plugins/a11yhelp/dialogs/lang/mn.js | 4 +- release/plugins/a11yhelp/dialogs/lang/nb.js | 6 +- release/plugins/a11yhelp/dialogs/lang/nl.js | 15 +- release/plugins/a11yhelp/dialogs/lang/no.js | 6 +- release/plugins/a11yhelp/dialogs/lang/oc.js | 12 ++ release/plugins/a11yhelp/dialogs/lang/pl.js | 12 +- release/plugins/a11yhelp/dialogs/lang/pt-br.js | 6 +- release/plugins/a11yhelp/dialogs/lang/pt.js | 16 +- release/plugins/a11yhelp/dialogs/lang/ro.js | 6 +- release/plugins/a11yhelp/dialogs/lang/ru.js | 8 +- release/plugins/a11yhelp/dialogs/lang/si.js | 8 +- release/plugins/a11yhelp/dialogs/lang/sk.js | 10 +- release/plugins/a11yhelp/dialogs/lang/sl.js | 12 +- release/plugins/a11yhelp/dialogs/lang/sq.js | 4 +- release/plugins/a11yhelp/dialogs/lang/sr-latn.js | 4 +- release/plugins/a11yhelp/dialogs/lang/sr.js | 4 +- release/plugins/a11yhelp/dialogs/lang/sv.js | 8 +- release/plugins/a11yhelp/dialogs/lang/th.js | 4 +- release/plugins/a11yhelp/dialogs/lang/tr.js | 8 +- release/plugins/a11yhelp/dialogs/lang/tt.js | 8 +- release/plugins/a11yhelp/dialogs/lang/ug.js | 10 +- release/plugins/a11yhelp/dialogs/lang/uk.js | 4 +- release/plugins/a11yhelp/dialogs/lang/vi.js | 8 +- release/plugins/a11yhelp/dialogs/lang/zh-cn.js | 8 +- release/plugins/a11yhelp/dialogs/lang/zh.js | 8 +- release/plugins/dialog/dialogDefinition.js | 2 +- release/plugins/html5video/dialogs/html5video.js | 5 + release/plugins/icons.png | Bin 7124 -> 4993 bytes release/plugins/icons_hidpi.png | Bin 21417 -> 14581 bytes release/plugins/iframe/dialogs/iframe.js | 2 +- release/plugins/image/dialogs/image.js | 56 +++--- release/plugins/link/dialogs/anchor.js | 9 +- release/plugins/link/dialogs/link.js | 48 ++--- release/plugins/link/images/anchor.png | Bin 589 -> 752 bytes release/plugins/link/images/hidpi/anchor.png | Bin 1379 -> 1109 bytes release/plugins/liststyle/dialogs/liststyle.js | 2 +- release/plugins/oembed/LICENSE.md | 21 +++ release/plugins/oembed/README.md | 201 +++++++++++++++++++++ release/plugins/oembed/libs/jquery.oembed.min.js | 71 ++++++++ release/plugins/widget/images/handle.png | Bin 0 -> 220 bytes 86 files changed, 777 insertions(+), 291 deletions(-) create mode 100644 release/plugins/Audio/dialogs/audio.js create mode 100644 release/plugins/Audio/docs/install.html create mode 100644 release/plugins/Audio/docs/styles.css create mode 100644 release/plugins/Audio/images/audio.png create mode 100644 release/plugins/Audio/images/icon.png create mode 100644 release/plugins/Audio/images/placeholder.png create mode 100644 release/plugins/a11yhelp/dialogs/lang/az.js create mode 100644 release/plugins/a11yhelp/dialogs/lang/es-mx.js create mode 100644 release/plugins/a11yhelp/dialogs/lang/oc.js create mode 100644 release/plugins/html5video/dialogs/html5video.js create mode 100644 release/plugins/oembed/LICENSE.md create mode 100644 release/plugins/oembed/README.md create mode 100644 release/plugins/oembed/libs/jquery.oembed.min.js create mode 100644 release/plugins/widget/images/handle.png (limited to 'release/plugins') diff --git a/release/plugins/Audio/dialogs/audio.js b/release/plugins/Audio/dialogs/audio.js new file mode 100644 index 0000000..da9495c --- /dev/null +++ b/release/plugins/Audio/dialogs/audio.js @@ -0,0 +1,9 @@ +CKEDITOR.dialog.add("audio",function(d){function g(a,c){var b=this.getValue();!b&&"id"==this.id&&(b=m());a.setAttribute(this.id,b);if(b)switch(this.id){case "poster":c.backgroundImage="url("+b+")";break;case "width":c.width=b+"px";break;case "height":c.height=b+"px"}}function i(a,c,b){c=this.id.match(/(\w+)(\d)/);a=c[1];c=parseInt(c[2],10);(b[c]||(b[c]={}))[a]=this.getValue()}function j(a){a?this.setValue(a.getAttribute(this.id)):"id"==this.id&&this.setValue(m())}function h(a,c){var b=this.id.match(/(\w+)(\d)/), +d=b[1],b=parseInt(b[2],10);(b=c[b])&&this.setValue(b[d])}function m(){var a=new Date;return"audio"+a.getFullYear()+a.getMonth()+a.getDate()+a.getHours()+a.getMinutes()+a.getSeconds()}var e=d.lang.audio,l=function(){var a=this.previewImage;a.removeListener("load",l);a.removeListener("error",f);a.removeListener("abort",f);this.setValueOf("info","width",a.$.width);this.setValueOf("info","height",a.$.height)},f=function(){var a=this.previewImage;a.removeListener("load",l);a.removeListener("error",f); +a.removeListener("abort",f)};return{title:e.dialogTitle,minWidth:400,minHeight:200,onShow:function(){this.fakeImage=this.audioNode=null;this.previewImage=d.document.createElement("img");var a=this.getSelectedElement();if(a&&a.data("cke-real-element-type")&&"audio"==a.data("cke-real-element-type")){this.fakeImage=a;var a=d.restoreRealElement(a),c=[],b=a.getElementsByTag("source","");0==b.count()&&(b=a.getElementsByTag("source","cke"));for(var e=0,f=b.count();e",d.document),a.setAttributes({controls:"controls"}));var c={},b=[];this.commitContent(a,c,b);for(var f="",g="",i=e.linkTemplate||"",j=e.fallbackTemplate||"",h=0;h',g+=i.replace("%src%",k.src).replace("%type%", +k.type))}a.setHtml(f+j.replace("%links%",g));a=d.createFakeElement(a,"cke_audio","audio",!1);a.setStyles(c);this.fakeImage?(a.replace(this.fakeImage),d.getSelection().selectElement(a)):(c=new CKEDITOR.dom.element("DIV",d.document),d.insertElement(c),c.append(a))},onHide:function(){this.previewImage&&(this.previewImage.removeListener("load",l),this.previewImage.removeListener("error",f),this.previewImage.removeListener("abort",f),this.previewImage.remove(),this.previewImage=null)},contents:[{id:"info", +elements:[{type:"hbox",widths:["","100px"],children:[{type:"text",id:"poster",label:e.poster,commit:g,setup:j,onChange:function(){var a=this.getDialog(),c=this.getValue();if(0 + + + +Audio plugin + + + + +

Audio Plugin for CKEditor

+ +

Introduction

+

This is a plugin to create HTML5 <audio> elements in CKEditor.

+

Version history:

+
    +
  1. 1.0: 10-July-2015. First version.
  2. +
+ +

Installation

+

1. Copying the files

+

Extract the contents of the zip in you plugins directory, so it ends up like + this
+ +

+
+ckeditor\
+	...
+	images\
+	lang\
+	plugins\
+		...
+		audio\
+			plugin.js
+			dialogs\
+				audio.js
+			docs\
+				install.html
+			images\
+				icon.png
+				placeholder.png
+		...
+	skins\
+	themes\
+
+

2. Adding it to CKEditor

+

Now add the plugin in your config.js or custom js configuration +file: +config.extraPlugins='audio'; +

+ +

3. Add it to your toolbar

+

In your toolbar configuration, add a new 'Audio' item in the place where you want the button to show up.

+ +

4. Configure server browser for audio

+

You can use the config.filebrowserAudioBrowseUrl entry to specify a url so the file browser shows just audio elements (as long as your configure properly your file browser).

+ +

5. Use it

+

Now empty the cache of your browser and reload the editor, the new button should show up and you can add <audio> elements into the content.

+ +

Final notes

+

Please, note that only newer browsers support the Audio element, in older ones a simple text linking to the source audios is provided, you might want to +use some javascript or css to customize the final behavior of these elements.

+ + +

Disclaimers

+

CKEditor is © CKSource.com

+ + diff --git a/release/plugins/Audio/docs/styles.css b/release/plugins/Audio/docs/styles.css new file mode 100644 index 0000000..5eba91e --- /dev/null +++ b/release/plugins/Audio/docs/styles.css @@ -0,0 +1,67 @@ +body { + font-family: Arial, Helvetica, sans-serif; + font-size: 90%; +} +h1 { + text-align:center; + font-size:180%; +} +h2 { + border-bottom:2px solid #CCC; + margin:1em 0 0.4em 0; +} +h3 { + margin-bottom:0.4em; +} +p { + margin:0 0 1em 1em; + text-align:justify; +} +ol { + margin:0 0 1.2em 1em; + padding:0; + list-style-type:none; +} +ol li { + margin:0.2em 0; +} +pre { + font-size:100%; + font-family:"Courier New", Courier, mono; + background-color: #CCCCCC; + border:1px solid #999; + padding:0.2em 1em; + margin: 0.4em 0; + display:block; + white-space: pre; + overflow: auto; +} +code { + font-size:100%; + font-family:"Courier New", Courier, mono; + background-color: #CCCCCC; + border:1px solid #999; + padding:0.2em; + white-space: pre; +} +form { + margin:0 0 0 1em; +} +span.key { + color: #006600; +} +#install { + display:none +} +#languages ul { + display:inline; + list-style-type:none; + margin:0; + padding:0; +} +#languages li { + display:inline; + margin:0; + padding:0; + vertical-align:bottom; +} diff --git a/release/plugins/Audio/images/audio.png b/release/plugins/Audio/images/audio.png new file mode 100644 index 0000000..b4a4ef7 Binary files /dev/null and b/release/plugins/Audio/images/audio.png differ diff --git a/release/plugins/Audio/images/icon.png b/release/plugins/Audio/images/icon.png new file mode 100644 index 0000000..1ec7ecc Binary files /dev/null and b/release/plugins/Audio/images/icon.png differ diff --git a/release/plugins/Audio/images/placeholder.png b/release/plugins/Audio/images/placeholder.png new file mode 100644 index 0000000..1456cac Binary files /dev/null and b/release/plugins/Audio/images/placeholder.png differ diff --git a/release/plugins/a11yhelp/dialogs/a11yhelp.js b/release/plugins/a11yhelp/dialogs/a11yhelp.js index 4585951..0b2c0f1 100644 --- a/release/plugins/a11yhelp/dialogs/a11yhelp.js +++ b/release/plugins/a11yhelp/dialogs/a11yhelp.js @@ -1,10 +1,10 @@ /* - Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. + Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ -CKEDITOR.dialog.add("a11yHelp",function(l){var a=l.lang.a11yhelp,n=CKEDITOR.tools.getNextId(),e={8:a.backspace,9:a.tab,13:a.enter,16:a.shift,17:a.ctrl,18:a.alt,19:a.pause,20:a.capslock,27:a.escape,33:a.pageUp,34:a.pageDown,35:a.end,36:a.home,37:a.leftArrow,38:a.upArrow,39:a.rightArrow,40:a.downArrow,45:a.insert,46:a["delete"],91:a.leftWindowKey,92:a.rightWindowKey,93:a.selectKey,96:a.numpad0,97:a.numpad1,98:a.numpad2,99:a.numpad3,100:a.numpad4,101:a.numpad5,102:a.numpad6,103:a.numpad7,104:a.numpad8, -105:a.numpad9,106:a.multiply,107:a.add,109:a.subtract,110:a.decimalPoint,111:a.divide,112:a.f1,113:a.f2,114:a.f3,115:a.f4,116:a.f5,117:a.f6,118:a.f7,119:a.f8,120:a.f9,121:a.f10,122:a.f11,123:a.f12,144:a.numLock,145:a.scrollLock,186:a.semiColon,187:a.equalSign,188:a.comma,189:a.dash,190:a.period,191:a.forwardSlash,192:a.graveAccent,219:a.openBracket,220:a.backSlash,221:a.closeBracket,222:a.singleQuote};e[CKEDITOR.ALT]=a.alt;e[CKEDITOR.SHIFT]=a.shift;e[CKEDITOR.CTRL]=a.ctrl;var f=[CKEDITOR.ALT,CKEDITOR.SHIFT, -CKEDITOR.CTRL],p=/\$\{(.*?)\}/g,t=function(){var a=l.keystrokeHandler.keystrokes,g={},c;for(c in a)g[a[c]]=c;return function(a,c){var b;if(g[c]){b=g[c];for(var h,k,m=[],d=0;d=h&&(b-=k,m.push(e[k]));m.push(e[b]||String.fromCharCode(b));b=m.join("+")}else b=a;return b}}();return{title:a.title,minWidth:600,minHeight:400,contents:[{id:"info",label:l.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",focus:function(){this.getElement().focus()}, -html:function(){for(var e='\x3cdiv class\x3d"cke_accessibility_legend" role\x3d"document" aria-labelledby\x3d"'+n+'_arialbl" tabIndex\x3d"-1"\x3e%1\x3c/div\x3e\x3cspan id\x3d"'+n+'_arialbl" class\x3d"cke_voice_label"\x3e'+a.contents+" \x3c/span\x3e",g=[],c=a.legend,l=c.length,f=0;f=l&&(c-=f,h.push(d[f]));h.push(d[c]||String.fromCharCode(c));c=h.join("+")}else c=a;return c};return{title:a.title,minWidth:600,minHeight:400,contents:[{id:"info",label:e.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",focus:function(){this.getElement().focus()},html:function(){for(var b= +'\x3cdiv class\x3d"cke_accessibility_legend" role\x3d"document" aria-labelledby\x3d"'+q+'_arialbl" tabIndex\x3d"-1"\x3e%1\x3c/div\x3e\x3cspan id\x3d"'+q+'_arialbl" class\x3d"cke_voice_label"\x3e'+a.contents+" \x3c/span\x3e",d=[],c=a.legend,l=c.length,f=0;fCKEDITOR.env.version&&(a["class"]="cke_anchor"),a=new CKEDITOR.style({element:"a",attributes:a}),a.type=CKEDITOR.STYLE_INLINE,c.applyStyle(a))}},onHide:function(){delete this._.selectedElement},onShow:function(){var a=c.getSelection(),b=a.getSelectedElement(),d=b&&b.data("cke-realelement"),e=d?CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,b):CKEDITOR.plugins.link.getSelectedLink(c); -if(e){this._.selectedElement=e;var f=e.data("cke-saved-name");this.setValueOf("info","txtName",f||"");!d&&a.selectElement(e);b&&(this._.selectedElement=b)}this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:c.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:c.lang.link.anchor.name,required:!0,validate:function(){return this.getValue()?!0:(alert(c.lang.link.anchor.errorName),!1)}}]}]}}); \ No newline at end of file +CKEDITOR.dialog.add("anchor",function(c){function e(b,a){return b.createFakeElement(b.document.createElement("a",{attributes:a}),"cke_anchor","anchor")}return{title:c.lang.link.anchor.title,minWidth:300,minHeight:60,onOk:function(){var b=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),a={id:b,name:b,"data-cke-saved-name":b};this._.selectedElement?this._.selectedElement.data("cke-realelement")?(b=e(c,a),b.replace(this._.selectedElement),CKEDITOR.env.ie&&c.getSelection().selectElement(b)):this._.selectedElement.setAttributes(a): +(b=(b=c.getSelection())&&b.getRanges()[0],b.collapsed?(a=e(c,a),b.insertNode(a)):(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(a["class"]="cke_anchor"),a=new CKEDITOR.style({element:"a",attributes:a}),a.type=CKEDITOR.STYLE_INLINE,a.applyToRange(b)))},onHide:function(){delete this._.selectedElement},onShow:function(){var b=c.getSelection(),a;a=b.getRanges()[0];var d=b.getSelectedElement();a.shrink(CKEDITOR.SHRINK_ELEMENT);a=(d=a.getEnclosedNode())&&d.type===CKEDITOR.NODE_ELEMENT&&("anchor"===d.data("cke-real-element-type")|| +d.is("a"))?d:void 0;var f=(d=a&&a.data("cke-realelement"))?CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,a):CKEDITOR.plugins.link.getSelectedLink(c);if(f){this._.selectedElement=f;var e=f.data("cke-saved-name");this.setValueOf("info","txtName",e||"");!d&&b.selectElement(f);a&&(this._.selectedElement=a)}this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:c.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:c.lang.link.anchor.name,required:!0,validate:function(){return this.getValue()? +!0:(alert(c.lang.link.anchor.errorName),!1)}}]}]}}); \ No newline at end of file diff --git a/release/plugins/link/dialogs/link.js b/release/plugins/link/dialogs/link.js index fcb4b64..e8581a7 100644 --- a/release/plugins/link/dialogs/link.js +++ b/release/plugins/link/dialogs/link.js @@ -1,26 +1,28 @@ /* - Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. + Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ -(function(){CKEDITOR.dialog.add("link",function(g){var n=CKEDITOR.plugins.link,p=function(){var a=this.getDialog(),b=a.getContentElement("target","popupFeatures"),a=a.getContentElement("target","linkTargetName"),m=this.getValue();if(b&&a)switch(b=b.getElement(),b.hide(),a.setValue(""),m){case "frame":a.setLabel(g.lang.link.targetFrameName);a.getElement().show();break;case "popup":b.show();a.setLabel(g.lang.link.targetPopupName);a.getElement().show();break;default:a.setValue(m),a.getElement().hide()}}, -f=function(a){a.target&&this.setValue(a.target[this.id]||"")},h=function(a){a.advanced&&this.setValue(a.advanced[this.id]||"")},k=function(a){a.target||(a.target={});a.target[this.id]=this.getValue()||""},l=function(a){a.advanced||(a.advanced={});a.advanced[this.id]=this.getValue()||""},c=g.lang.common,b=g.lang.link,d;return{title:b.title,minWidth:350,minHeight:230,contents:[{id:"info",label:b.info,title:b.info,elements:[{id:"linkType",type:"select",label:b.type,"default":"url",items:[[b.toUrl,"url"], -[b.toAnchor,"anchor"],[b.toEmail,"email"]],onChange:function(){var a=this.getDialog(),b=["urlOptions","anchorOptions","emailOptions"],m=this.getValue(),e=a.definition.getContents("upload"),e=e&&e.hidden;"url"==m?(g.config.linkShowTargetTab&&a.showPage("target"),e||a.showPage("upload")):(a.hidePage("target"),e||a.hidePage("upload"));for(e=0;e=f.length&&n.showDisplayTextForElement(h,a)?c.show():c.hide();this._.selectedElements=f;this.setupContent(b)},onOk:function(){var a={};this.commitContent(a);if(this._.selectedElements.length){var b= +this._.selectedElements,g=n.getLinkAttributes(c,a),f=[],h,d,l,e,k;for(k=0;k=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|| +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)}, +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&& +(c.query.results={meta:[]});e=0;for(k=c.query.results.meta.length;ej.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", +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_", +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 "link":c.code="Flickr"== +c.provider_name?b.fn.oembed.getPhotoCode(l,c):b.fn.oembed.getGenericCode(l,c);break;case "video":case "rich":c.code=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(" "); +return 0===b("#jqoembeddata").length&&b('').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');l=a.parent();j.includeHandle&&b('').insertBefore(a).click(function(){var a= +encodeURIComponent(b(this).text());b(this).html("%E2%86%91"==a?"↓":"↑");b(this).parent().children().last().toggle()});l.append("
");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='
'+d+'
':b.thumbnail_url?(c=b.thumbnail_url.replace("_s", +"_b"),e='
'+d+'
'):e="Flickr"==b.provider_name?'

"+a+"

":"
Error loading this picture
",e};b.fn.oembed.getRichCode=function(a,b){return b.html};b.fn.oembed.getGenericCode=function(a,b){var e=''+(null!==b.title?b.title:a)+"";return b.html&&(e+="
"+b.html+"
"),e};b.fn.oembed.getOEmbedProvider=function(a){for(var e,h,d,c=0;c$/, +"$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)&&!a.json.html.indexOf("iframe"))return'';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&&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=0;g':!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},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)/.+"],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? +'':!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/.+"], +"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\/([^\/]+).*/, +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'on Gravtar'}}),new b.fn.oembed.OEmbedProvider("twitter","rich",["twitter.com/.+"],"https://api.twitter.com/1/statuses/oembed.json?id="), +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/.+"], +"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}}), +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&embedId=pt-embed-$1-693&treeId=$1&pearlId=$2&treeTitle=Diagrams%2FVisualization&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&lock_to_path=0&color=ffffff&autoplay=no&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),"