Skip to main content
Commonmark migration
Source Link

#Update 2014/09/29:

Update 2014/09/29:

#Update 2014/09/29:

Update 2014/09/29:

added 1 character in body
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64

Update#Update 2014/09/29:

Update 2014/09/29:

#Update 2014/09/29:

Post Closed as "Not suitable for this site" by Brock Adams
replaced http://stackapps.com/ with https://stackapps.com/
Source Link

I have previously installed and been working with the "StackPrinter" Greasemonkey scriptthe "StackPrinter" Greasemonkey script -- which displays a button on each Stack Exchange question to print that question with StackPrinter.

// ==UserScript==
// @name           StackPrinter
// @description    Add Printer-Friendly button to question

// @include         http://stackoverflow.com/questions/*
// @include        https://stackoverflow.com/questions/*

// @include         http://serverfault.com/questions/*
// @include        https://serverfault.com/questions/*

// @include         http://superuser.com/questions/*
// @include        https://superuser.com/questions/*

// @include         httphttps://stackapps.com/questions/*
// @include        https://stackapps.com/questions/*

// @include         http://meta.stackoverflow.com/questions/*
// @include        https://meta.stackoverflow.com/questions/*

// @include         http://*.stackexchange.com/questions/*
// @include        https://*.stackexchange.com/questions/*

// @include         http://askubuntu.com/questions/*
// @include        https://askubuntu.com/questions/*

// @include         http://answers.onstartups.com/questions/*
// @include        https://answers.onstartups.com/questions/*

// @include         http://meta.mathoverflow.net/questions/*
// @include        https://meta.mathoverflow.net/questions/*

// @include         http://mathoverflow.net/questions/*
// @include        https://mathoverflow.net/questions/*

// ==/UserScript==

function with_jquery(f) {
  var script = document.createElement("script");
  script.type = "text/javascript";
  script.textContent = "(" + f.toString() + ")(jQuery)";
  document.body.appendChild(script);
};

with_jquery(function($) {
       var re = new RegExp("^http://(.*?)\.(com|net|org)");
       var group = re.exec(window.location.href);
       var service = group[1];
       $('#question .vote:first').append(''
         +'<div id="PrinterFriendly" style="margin-top:8px">'
         +'<a alt="Printer-Friendly" title="Printer-Friendly"'
         +'  href="javascript:'
         +'    (function(){'
         +'      f=\''
                   +'http://www.stackprinter.com/export?format=HTML&service='
                   +service
                   +'&question='
                   +$('.vote').find('input[type=hidden]:first').val()
                   +'\';'
         +'      a=function(){if(!window.open(f))location.href=f};'
         +'      if(/Firefox/.test(navigator.userAgent))'
         +'       {setTimeout(a,0)}else{a()}'
         +'    })()'
         +'  "'
         +'> <img width="33px" height="33px" '
         +'    src="http://www.stackprinter.com/images/printer.gif">'
         +'  </img>'
         +'</a></div>'
       );
});

I have previously installed and been working with the "StackPrinter" Greasemonkey script -- which displays a button on each Stack Exchange question to print that question with StackPrinter.

// ==UserScript==
// @name           StackPrinter
// @description    Add Printer-Friendly button to question

// @include         http://stackoverflow.com/questions/*
// @include        https://stackoverflow.com/questions/*

// @include         http://serverfault.com/questions/*
// @include        https://serverfault.com/questions/*

// @include         http://superuser.com/questions/*
// @include        https://superuser.com/questions/*

// @include         http://stackapps.com/questions/*
// @include        https://stackapps.com/questions/*

// @include         http://meta.stackoverflow.com/questions/*
// @include        https://meta.stackoverflow.com/questions/*

// @include         http://*.stackexchange.com/questions/*
// @include        https://*.stackexchange.com/questions/*

// @include         http://askubuntu.com/questions/*
// @include        https://askubuntu.com/questions/*

// @include         http://answers.onstartups.com/questions/*
// @include        https://answers.onstartups.com/questions/*

// @include         http://meta.mathoverflow.net/questions/*
// @include        https://meta.mathoverflow.net/questions/*

// @include         http://mathoverflow.net/questions/*
// @include        https://mathoverflow.net/questions/*

// ==/UserScript==

function with_jquery(f) {
  var script = document.createElement("script");
  script.type = "text/javascript";
  script.textContent = "(" + f.toString() + ")(jQuery)";
  document.body.appendChild(script);
};

with_jquery(function($) {
       var re = new RegExp("^http://(.*?)\.(com|net|org)");
       var group = re.exec(window.location.href);
       var service = group[1];
       $('#question .vote:first').append(''
         +'<div id="PrinterFriendly" style="margin-top:8px">'
         +'<a alt="Printer-Friendly" title="Printer-Friendly"'
         +'  href="javascript:'
         +'    (function(){'
         +'      f=\''
                   +'http://www.stackprinter.com/export?format=HTML&service='
                   +service
                   +'&question='
                   +$('.vote').find('input[type=hidden]:first').val()
                   +'\';'
         +'      a=function(){if(!window.open(f))location.href=f};'
         +'      if(/Firefox/.test(navigator.userAgent))'
         +'       {setTimeout(a,0)}else{a()}'
         +'    })()'
         +'  "'
         +'> <img width="33px" height="33px" '
         +'    src="http://www.stackprinter.com/images/printer.gif">'
         +'  </img>'
         +'</a></div>'
       );
});

I have previously installed and been working with the "StackPrinter" Greasemonkey script -- which displays a button on each Stack Exchange question to print that question with StackPrinter.

// ==UserScript==
// @name           StackPrinter
// @description    Add Printer-Friendly button to question

// @include         http://stackoverflow.com/questions/*
// @include        https://stackoverflow.com/questions/*

// @include         http://serverfault.com/questions/*
// @include        https://serverfault.com/questions/*

// @include         http://superuser.com/questions/*
// @include        https://superuser.com/questions/*

// @include         https://stackapps.com/questions/*
// @include        https://stackapps.com/questions/*

// @include         http://meta.stackoverflow.com/questions/*
// @include        https://meta.stackoverflow.com/questions/*

// @include         http://*.stackexchange.com/questions/*
// @include        https://*.stackexchange.com/questions/*

// @include         http://askubuntu.com/questions/*
// @include        https://askubuntu.com/questions/*

// @include         http://answers.onstartups.com/questions/*
// @include        https://answers.onstartups.com/questions/*

// @include         http://meta.mathoverflow.net/questions/*
// @include        https://meta.mathoverflow.net/questions/*

// @include         http://mathoverflow.net/questions/*
// @include        https://mathoverflow.net/questions/*

// ==/UserScript==

function with_jquery(f) {
  var script = document.createElement("script");
  script.type = "text/javascript";
  script.textContent = "(" + f.toString() + ")(jQuery)";
  document.body.appendChild(script);
};

with_jquery(function($) {
       var re = new RegExp("^http://(.*?)\.(com|net|org)");
       var group = re.exec(window.location.href);
       var service = group[1];
       $('#question .vote:first').append(''
         +'<div id="PrinterFriendly" style="margin-top:8px">'
         +'<a alt="Printer-Friendly" title="Printer-Friendly"'
         +'  href="javascript:'
         +'    (function(){'
         +'      f=\''
                   +'http://www.stackprinter.com/export?format=HTML&service='
                   +service
                   +'&question='
                   +$('.vote').find('input[type=hidden]:first').val()
                   +'\';'
         +'      a=function(){if(!window.open(f))location.href=f};'
         +'      if(/Firefox/.test(navigator.userAgent))'
         +'       {setTimeout(a,0)}else{a()}'
         +'    })()'
         +'  "'
         +'> <img width="33px" height="33px" '
         +'    src="http://www.stackprinter.com/images/printer.gif">'
         +'  </img>'
         +'</a></div>'
       );
});
include copy of working greasemonkey script and bookmarklet, for posterity
Source Link
Loading
Not a bug in stackapps, StackPrinter is a third-party app.
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64
Loading
Source Link
Loading