Add icon and message handler for print button

I’m inclined to think it’s not worth adding a corresponding page
control button because it’ll require a lot of tiddlers for the
translation etc.
This commit is contained in:
Jermolene
2016-10-08 10:10:54 +01:00
parent ee66d1a1af
commit c4e13bc94a
3 changed files with 26 additions and 0 deletions
+4
View File
@@ -53,6 +53,10 @@ exports.startup = function() {
$tw.rootWidget.addEventListener("tm-browser-refresh",function(event) {
window.location.reload(true);
});
// Listen for the tm-print message
$tw.rootWidget.addEventListener("tm-print",function(event) {
window.print();
});
// Listen for the tm-home message
$tw.rootWidget.addEventListener("tm-home",function(event) {
window.location.hash = "";