diff options
-rw-r--r-- | maine_coon.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/maine_coon.js b/maine_coon.js index 6bda3e7..c914a02 100644 --- a/maine_coon.js +++ b/maine_coon.js @@ -424,13 +424,15 @@ let elemStyle = U.around(commandline._callbacks.cancel, modes.PROMPT, callback); } - autocommands.add( - 'DOMLoad', - /.*/, - function (args) { - if (displayURL) - echo(args.url); - } + events.addSessionListener( + document.getElementById("appcontent"), + "DOMContentLoaded", + function (event) { + let doc = event.originalTarget; + if (doc instanceof HTMLDocument && !doc.defaultView.frameElement && displayURL) + echo(doc.location.href); + }, + true ); options.add( |