/* eslint no-var: "error" */
/* eslint no-unused-vars: "off" */
/* eslint linebreak-style: "off" */
/* eslint promise/no-nesting: "off" */
/* eslint-env es6*/
/* eslint camelcase: "off" */
// Put this file in path/to/plugin/amd/src
// You can call it anything you like

import Debugger from './util/debugger';
import {get_strings} from 'core/str';
import {getStrings} from 'core/str';
import ModalFactory from 'core/modal_factory';
import ModalEvents from 'core/modal_events';

/* Determine the proper getstrings function to use (MDL4.3+ recommends use of getStrings, which is jquery independent) */
const getstrFunc = (getStrings !== undefined) ? getStrings : get_strings;

let debug = new Debugger("treestudyplan-manageshares");

 /**
  * Init function for tool-actionhrefs
  */
export function init() {
  debug.info("Initializing manageshares");
  const userselect = document.getElementById('id_userid');
  userselect.addEventListener("change", (e) => {
      let url = URL.parse(window.location);
      url.search = "?userid=" + userselect.value;
      window.location = String(url);
    });

}
