[graphics/okular] core/script: Wrap some pdf specific javascript console functions to console.log

Sune Vuorela <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 074ad44c3fd134ead39ea1ce6c7711a45cf531df by Sune Vuorela.
Committed on 17/08/2026 at 08:06.
Pushed by sune into branch 'master'.

Wrap some pdf specific javascript console functions to console.log

M  +4    -0    core/script/builtin.js

https://invent.kde.org/graphics/okular/-/commit/074ad44c3fd134ead39ea1ce6c7711a45cf531df

diff --git a/core/script/builtin.js b/core/script/builtin.js
index 15d4e1587..6f0a6d168 100644
--- a/core/script/builtin.js
+++ b/core/script/builtin.js
@@ -15,6 +15,10 @@
             this.__proto__[name] = Doc[name];
         }
     }
+    console.println = function(args) { console.log(args) }
+    console.show = function(args) { console.log(">>>>") }
+    console.hide = function(args) { console.log("<<<<") }
+    console.clear = function(args) { console.log("----") }
 }
 
 /* Builtin functions for Okular's PDF JavaScript interpretation. */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.