• Resolved apedog

    (@apedog)


    I have a lot of old encoded url’s that I’m updating to latin only slugs and am using the redirection plugin to make sure the old links redirect to their new targets.
    Editing (and viewing) these links is quite a hassle. I’ve a couple of hundred of these old non-latin urls.

    I’ve added these lines of code in a separate js file, and they do the job. Barely. It only allows me to edit the links in encoded form. But not to view.
    And it’s obviously a hack.

    $(document).on('blur','.edit-redirection input',function(){$(this).val(encodeURI($(this).val()))})
    $(document).on('focus','.edit-redirection input',function(){$(this).val(decodeURI($(this).val()))})

    I’m certain there should be a more elegant way to encodeURI the values only on submit and using the redirection plugin javascript.
    However the js is minified (not a problem) and obfuscated (quite a problem).

    Is there a non-obfuscated version of the script – that I can look through?
    Or is such a file intentionally unavailable? (What with redirection plugin being both comprehensive, fast yet free)

    Thanks,
    apedog

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Godley

    (@johnny5)

    What are you looking for in the JS file? Redirection is a transpiled React app and doesn’t really make a lot of human sense, even if it wasn’t compressed.

    Thread Starter apedog

    (@apedog)

    Basically I want to decode the non-latin url’s when the plugin prints them onscreen.
    And also when printing the value in the edit box/ textfield. So I can edit human-readable url’s.
    And, of course, to encode them only when they are being submitted back to the server.

    Plugin Author John Godley

    (@johnny5)

    Ok, the JS code is not really suitable for modification like this. If you want to perform those additions you’ll need to add them another way

    The plugin will eventually not have this problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is there a non-obfuscated version of the redirection.js file?’ is closed to new replies.