// Author: Sai Charan (http://saicharan.in/blog)
// Distributed without warranties or conditions of any kind, either
// express or implied except those under the CC BY-NC 3.0 license.
// You may obtain a copy of the license at:
//
// http://creativecommons.org/licenses/by-nc/3.0/
//
// Leave comments at:
// http://saicharan.in/blog/2009/07/12/hn-submit-button/
(function() {
var hn_link = "http://news.ycombinator.com/submitlink?u=";
if (window.hn_url) {
hn_link += encodeURIComponent(hn_url);
}
else {
hn_link += encodeURIComponent(document.location);
}
if (window.hn_title) {
hn_link += "&t=" + encodeURIComponent(hn_title);
}
else {
hn_link += "&t=" + encodeURIComponent(document.title);
}
var write_string = "Submit";
document.write(write_string);
})()