added script test

This commit is contained in:
Rudis Muiznieks 2023-09-25 13:30:27 -05:00
parent 96b6dd28f7
commit ca6dc23145
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
2 changed files with 10 additions and 1 deletions

View File

@ -4,7 +4,7 @@ class KagiSummarizerExtension extends Minz_Extension {
public function init() { public function init() {
$this->registerTranslates(); $this->registerTranslates();
$this->registerHook('entry_before_display', [$this, 'addSummarizeButton']); $this->registerHook('entry_before_display', [$this, 'addSummarizeButton']);
//Minz_View::appendScript($this->getFileUrl('script.js', 'js'), false, false, false); Minz_View::appendScript($this->getFileUrl('script.js', 'js'), false, false, false);
//Minz_View::appendStyle($this->getFileUrl('style.css', 'css')); //Minz_View::appendStyle($this->getFileUrl('style.css', 'css'));
} }

9
static/script.js Normal file
View File

@ -0,0 +1,9 @@
if (document.readyState && document.readyState !== 'loading') {
documentReady();
} else {
document.addEventListener('DOMContentLoaded', documentReady, false);
}
function documentReady() {
console.log('executed documentReady');
}