Skip to content

Commit

Permalink
Revert "Use URL instead of iframe to remove blocks from Moodle securi…
Browse files Browse the repository at this point in the history
…ty. Filter will convert URLs on iframes"

This reverts commit 5c04fb0.
  • Loading branch information
Yurujai committed Jul 3, 2024
1 parent 5c04fb0 commit f236823
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

defined('MOODLE_INTERNAL') || exit();

$plugin->version = 2024070302;
$plugin->version = 2023024601;
$plugin->requires = 2016112900;
$plugin->maturity = MATURITY_STABLE;
$plugin->component = 'atto_pumukitmedia';
$plugin->dependencies = [
'filter_pumukitmedia' => 2022021801
];
$plugin->release = '1.1.0';
$plugin->release = '1';
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,12 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a
url = e.data.url;
}

var iframe = '<a href="' + url + '" target="_blank" class="pumukit-media-link">' + url + '</a>';
var iframe =
'<div class="embed-responsive embed-responsive-16by9 tv-iframe">' +
'<iframe class="embed-responsive-item tv-iframe-item" src="' + url +
'" allowfullscreen allow="microphone; camera; display-capture"></iframe>' +
'<span style="display: none;">Video</span>' +
'</div>';
this.get('host').insertContentAtFocusPoint(iframe);
this.markUpdated();
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,12 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a
url = e.data.url;
}

var iframe = '<a href="' + url + '" target="_blank" class="pumukit-media-link">' + url + '</a>';
var iframe =
'<div class="embed-responsive embed-responsive-16by9 tv-iframe">' +
'<iframe class="embed-responsive-item tv-iframe-item" src="' + url +
'" allowfullscreen allow="microphone; camera; display-capture"></iframe>' +
'<span style="display: none;">Video</span>' +
'</div>';
this.get('host').insertContentAtFocusPoint(iframe);
this.markUpdated();
},
Expand Down
13 changes: 6 additions & 7 deletions yui/src/button/js/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,12 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a
url = e.data.url;
}

// var iframe =
// '<div class="embed-responsive embed-responsive-16by9 tv-iframe">' +
// '<iframe class="embed-responsive-item tv-iframe-item" src="' + url +
// '" allowfullscreen allow="microphone; camera; display-capture"></iframe>' +
// '<span style="display: none;">Video</span>' +
// '</div>';
var iframe = '<a href="' + url + '" target="_blank" class="pumukit-media-link">' + url + '</a>';
var iframe =
'<div class="embed-responsive embed-responsive-16by9 tv-iframe">' +
'<iframe class="embed-responsive-item tv-iframe-item" src="' + url +
'" allowfullscreen allow="microphone; camera; display-capture"></iframe>' +
'<span style="display: none;">Video</span>' +
'</div>';
this.get('host').insertContentAtFocusPoint(iframe);
this.markUpdated();
},
Expand Down

0 comments on commit f236823

Please sign in to comment.