JAVASCRIPT 5
Userinfo.js Guest on 17th October 2020 01:14:40 AM
  1. /* Show user-info plugin script */
  2.  
  3. if (window.rcmail) {
  4.   rcmail.addEventListener('init', function() {
  5.     // <span id="settingstabdefault" class="tablink"><roundcube:button command="preferences" type="link" label="preferences" title="editpreferences" /></span>
  6.     var tab = $('<span>').attr('id', 'settingstabpluginuserinfo').addClass('tablink');
  7.  
  8.     $('<a>').attr('href', rcmail.env.comm_path + '&_action=plugin.userinfo')
  9.       .text(rcmail.get_label('userinfo', 'userinfo'))
  10.       .click(function(e) { return rcmail.command('plugin.userinfo', '', this, e); })
  11.       .appendTo(tab);
  12.  
  13.     // add button and register command
  14.     rcmail.add_element(tab, 'tabs');
  15.     rcmail.register_command('plugin.userinfo', function() { rcmail.goto_url('plugin.userinfo') }, true);
  16.   })
  17. }

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.