Fmstrat / shorten

A URL Shortening and Privacy Tool for ownCloud
31 stars 14 forks source link

linkText id changes on every file, looks for linkText class #31

Open scambra opened 8 years ago

scambra commented 8 years ago

Fix for #3

Rocco83 commented 8 years ago

Hi,

When this patch is planned to be released? Is correct to keep the other two #linkText ?

function replaceUrl() {
        if ($('#linkText').css('display') == 'block') {
                var curUrl = $('#linkText').val();
                $('#linkText').val('Please wait...');
                makeUrl(curUrl);
        }
}

function makeUrl(curUrl, partUrl) {
        var shortenurl = OC.linkTo("shorten","makeurl").replace("apps/shorten","index.php/apps/shorten");
        $.post(shortenurl, { curUrl: curUrl }, function (data) {
                $('#linkText').val(data);
        });
}