HEX
Server: Apache
System: Linux dev.epsylon.net 3.10.0-1160.144.1.el7.tuxcare.els2.x86_64 #1 SMP Sun Feb 15 11:22:42 UTC 2026 x86_64
User: nexper (1054)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/nexper/public_html/sites/all/modules/media/js/plugins/media.fromurl.js
(function ($) {
namespace('Drupal.media.browser.plugin');

Drupal.media.browser.plugin.fromurl = function (mediaBrowser, options) {
  return {
    init: function () {
      tabset = mediaBrowser.getTabset();
      tabset.tabs('add', '#fromurl', 'From URL');
      mediaBrowser.listen('tabs.show', function (e, id) {
        if (id == 'fromurl') {
          // We only need to set this once.
          // We probably could set it upon load.
          if (mediaBrowser.getActivePanel().html() == '') {
            mediaBrowser.getActivePanel().html(options.fromUrlForm);
          }
        }
      });
    }
  };
};

// For now, I guess self registration makes sense.
// Really though, we should be doing it via drupal_add_js and some settings
// from the drupal variable.
// @todo: needs a review.
Drupal.media.browser.register('fromurl', Drupal.media.browser.plugin.fromurl, {});

})(jQuery);