3

I am looking for a Chrome extension that automatically transforms long and obfuscated URLs into the real URLs.

Example how it is at the moment:

https://nylas.com/blog/nylas-pro/?utm_medium=email&utm_campaign=Nylas%20Pro%20Announcement&utm_content=Nylas%20Pro%20Announcement+CID_ac818d46fdab699a20daff65deef674d&utm_source=Campaign%20Monitor&utm_term=Read%20More

enter image description here

Example how I want it to be:

https://nylas.com/blog/nylas-pro
  • How would it know what's obfuscated URL and what's not? – Tom Apr 23 '16 at 19:58
  • Dear @Tom, that's a good question...maybe based on the length and number of ? used? – orschiro Apr 24 '16 at 7:15
  • Ya, that would be nice especially, for example, google search result links. IDK any personally but maybe someone else does – Tom Apr 24 '16 at 13:47
  • where would the transformed URL be shown? – ᔕᖺᘎᕊ May 8 '16 at 15:02
  • 1
    would you be willing to use a userscript? It would have a shortcut that you press which would prompt you to ctrl+c the transformed URL... – ᔕᖺᘎᕊ May 8 '16 at 15:05
1

I've made a quick userscript to do this.

When you press Ctrl + Shift + U (if you want a different shortcut, please comment and I'll change it for you :), you'll get a prompt to copy a cleaned-up version of the URL:

enter image description here

This will work in both Firefox and Chrome.

If you're using Firefox, you'll need to install the Greasemonkey extension first.

If you're using Chrome, you'll need to install the Tampermonkey extension first.

Then, just click this link to install it -- Greasemonkey/Tampermonkey will detect it's a userscript and ask you to install it.


The code, if you're interested :)

// ==UserScript==
// @name         URL deobfuscater
// @namespace    http://stackexchange.com/users/4337810/
// @version      1.0
// @description  A userscript that lets you quickly copy a cleaned-up version of the current URL
// @author       ᔕᖺᘎᕊ (http://stackexchange.com/users/4337810/)
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    document.onkeyup = function(e) {
        if(e.ctrlKey && e.shiftKey && (e.keyCode == 117 || e.keyCode == 85)) {
            window.prompt('Press Ctrl+C/Ctrl+X', location.protocol + '//' + location.hostname + location.pathname);
        }
    };
})();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.