░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/datadrive/moodledata/filedir/4f/62
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: 4f62f0781959e20c40286100365ea4650ba8ccaf
/*global H5P*/ /** @namespace H5PUpgrades */ var H5PUpgrades = H5PUpgrades || {}; H5PUpgrades['H5P.Link'] = (function () { return { 1: { /** * Asynchronous content upgrade hook. * Upgrades content parameters to support link v1.1. * * Sets protocol to none. * * @params {Object} parameters * @params {function} finished */ 1: function (parameters, finished) { var allowedProtocols = ['http://', 'https://', '/']; var urlProtocol; var url = parameters.url || ''; // Check if url had any allowed protocols allowedProtocols.forEach(function (protocol) { if (url.substr(0, protocol.length) === protocol) { urlProtocol = protocol; url = url.substr(protocol.length); } }); // Set new link widget parameters parameters.linkWidget = { url: url }; if (urlProtocol) { parameters.linkWidget.protocol = urlProtocol; } else { parameters.linkWidget.protocol = 'other'; } //Remove old url delete parameters.url; // Done finished(null, parameters); } } }; })();
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 4f62f0781959e20c40286100365ea4650ba8ccaf
?
1.2 KB
2023-08-03 13:28
EDIT