<commit_before>const FuncUtils = require('pydio/util/func')

export default function (pydio) {

    return function(){
        let link;
        let url = global.document.location.href;
        if(url.indexOf('#') > 0){
            url = url.substring(0, url.indexOf('#'));
        }
        if(url.indexOf('?') > 0){
            url = url.substring(0, url.indexOf('?'));
        }
        let repoId = pydio.repositoryId || (pydio.user ? pydio.user.activeRepository : null);
        if(pydio.user){
            const slug = pydio.user.repositories.get(repoId).getSlug();
            if(slug) repoId = slug;
        }
        link = url + '?goto=' + repoId + encodeURIComponent(pydio.getUserSelection().getUniqueNode().getPath());

        pydio.UI.openComponentInModal('PydioReactUI', 'PromptDialog', {
            dialogTitleId:369,
            fieldLabelId:296,
            defaultValue:link,
            submitValue:FuncUtils.Empty
        });

<commit_msg>Do not use goTo in short link<commit_after>const FuncUtils = require('pydio/util/func')

export default function (pydio) {

    return function(){
        let link;
        let url = global.document.location.href;
        if(url.indexOf('#') > 0){
            url = url.substring(0, url.indexOf('#'));
        }
        if(url.indexOf('?') > 0){
            url = url.substring(0, url.indexOf('?'));
        }
        let repoId = pydio.repositoryId || (pydio.user ? pydio.user.activeRepository : null);
        if(pydio.user){
            const slug = pydio.user.repositories.get(repoId).getSlug();
            if(slug) repoId = slug;
        }
        link = LangUtils.trimRight(url, '/') + pydio.getUserSelection().getUniqueNode().getPath();

        pydio.UI.openComponentInModal('PydioReactUI', 'PromptDialog', {
            dialogTitleId:369,
            fieldLabelId:296,
            defaultValue:link,
            submitValue:FuncUtils.Empty
        });


{'fraction_non_alphanumeric': 0.145010395010395, 'fraction_numerical': 0.010395010395010396, 'mean_word_length': 2.219063545150502, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7316630', 'n_tokens_mistral': 611, 'n_tokens_neox': 593, 'n_words': 100}