Code Monkey home page Code Monkey logo

Comments (4)

billthefarmer avatar billthefarmer commented on August 22, 2024

OK, that is possible. I propose that if there is a file Diary/js/entry.js it gets loaded by all pages, in the same way as styles. I will investigate. Let me know if you meant something different.

from diary.

alihardan avatar alihardan commented on August 22, 2024

Yes, this is what I mean.

Instead making Diary/js/entry.js and load it in all pages, you can make a header.html file and allow users to write any header, like writing <script> or <style> tag.

Of course, there is not much difference. Do what you think is better.

Thanks.

from diary.

billthefarmer avatar billthefarmer commented on August 22, 2024

I investigated including a HTML file. There is a link type for this, but it is apparently not widely supported. There are several ways of importing JavaScript into JavaScript.

I have implemented this by adding a <script></script> tag at the beginning of the HTML in the same way as styles. There is also a menu option to edit the file. The file is Diary/js/script.js, which will be used if present. Script errors get logged by the WebView in the device log file.

This will be in the next release.

from diary.

alihardan avatar alihardan commented on August 22, 2024

Yep, It works perfectly. Thank you very much.

from diary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.