Skip to content

Instantly share code, notes, and snippets.

@joshgillies
Created January 31, 2012 04:11
Show Gist options
  • Save joshgillies/1708729 to your computer and use it in GitHub Desktop.
Save joshgillies/1708729 to your computer and use it in GitHub Desktop.
Print Preview Shizz
(function(url, search) {
var printButton = $("#nav").find(".printer");
var searchString = (search) ? search + "&SQ_DESIGN_NAME=printer_friendly" : false;
var printButtonHref = (searchString) ? printButton.attr("href") + searchString : false;
(printButtonHref) ? printButton.attr("href", printButtonHref) : printButton.attr("href");
})("<MySource_PRINT id="__global__" var="asset_url" />", window.location.search);
@joshgillies
Copy link
Author

It's hax, we lurve iiiiit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment