In addition to this blog I also have a blog about recipes. I decided that I wanted a print icon on the main page for each post so that people can print the recipes. Googling provided various suggestions, none of which worked. However, I eventually cobbled together the following, which seems to work…
Edit the code of your blog and find the code
<!-- email post links -->
Above that put the following…
[javascript]&لتر;سيناريو>
function printPost(postUrl)
{
doPrint = true;
var pw = window.open(postUrl);
}
إذا(opener.doPrint == true)
{
window.print();
window.onfocus = function() { window.close(); }
}
&لتر;/سيناريو>
&لتر;a expr:href=’&كما;javascript:printPost(&كما; + &كما;&كما;&كما; + معطيات:post.url + &كما;&كما;&كما; + &كما;);&كما;’>&لتر;img src=‘https://siteresources.worldbank.org/images/Print_plain.gif’/>&لتر;/ا>[/javascript]
And you’re done!
Credit in various parts goes to…
Consuming Experience
Blogger Plugins
Sharkysoft
“Hi James I realise it has been a long while, but I just checked this on windows 11 (build 23H2)…”