I'm converting pages from an old format to new via Snippets. All was right in the world, up until I noticed Chrome's console "shortening" URL's so they would display better.
var url = "http://www.somewebsite.com/this/is/a/really/really/really/really/long/ass/url/that/will/be/cutoff/later/on/just/wait/wait/for/it/wait/for/it/there/here/are/some/query/strings?awwww=snap&this=is&really=happening" console.log(url); // Spits out // "http://www.somewebsite.com/this/is/a/really/really/really/really/long/ass/u…r/it/there/here/are/some/query/strings?awwww=snap&this=is&really=happening"
These aren't the actual URL's, but you get the idea. Is there a way of removing formatting from Google Chrome's console area? This snag pretty much ruined all my plans, hoping to not have to use a headless browser just to get raw text output. :-\
To disable URL shortener for particular post, simply click on the URL shortener icon on the bottom of the Publishing Window. When the icon is orange, it indicates that it is enabled.
Url Shortener for Google Chrome™ Just click our extension icon on toolbar to shorten the URL of current page with TinyURL.com url shortener service.
URL shortening is the translation of a long Uniform Resource Locator (URL) into an abbreviated alternative that redirects to the longer URL. The original URL shortening service was TinyURL, which was launched in 2002 by Kevin Gilbertson to make links on his unicyclist site easier to share.
Basically, when the URL shortener gives you your shortened URL, it "remembers" the full address. When other users go to the shortened URL, they will be automatically redirected to the full address. The webpage will still exist at the longer URL—the shortened URL is simply a shortcut to make the link easier to manage.
One workaround I found wasn't to log the actual values I was wanting. Instead I set it to a window variable and use copy(window.varToCopy)
copy()
is a native Chrome function you can use in the console to copy the data to your clipboard. Luckily it seems that it doesn't format anything you pass into it, so I can then get the actual URL rather than the broken one.
This is only a workaround, hopefully someone knows how to remove console formatting!
My workaround is to use console.dir(url);
. It isn't designed for this purpose, but it definitely does the trick:
You can't really open the hierarchical listing, but you don't need to anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With