debian-mirror-gitlab/app/assets/javascripts/shortcuts_dashboard_navigation.js
2017-08-17 22:00:37 +05:30

13 lines
278 B
JavaScript

/**
* Helper function that finds the href of the fiven selector and updates the location.
*
* @param {String} selector
*/
export default (selector) => {
const link = document.querySelector(selector).getAttribute('href');
if (link) {
window.location = link;
}
};