UserScript Direction

Code Direction

Our goal over time is to make each script like a regular JS class, or a Vue JS component. The idea being that in a single component you can set multiple created events, methods, watchers etc.

{
  created:() {
      main()
  },
  methods: {
      main(args){
          this.load_model()
          this.run_model(html_image)
        	diffgram.create()
      }
  },
  watch: {
      instance_creation(
          run()
      )
      instance_deletion()
      file()
  }
}

General Direction

A few general goals of where we are going with this (in addition to above more general format)

  1. Video specific functions, like loading next n frames
  2. More watchers - we want to make every major UI interaction available.
  3. Continue to improve runtime performance (eg screen freezing)
  4. Better expose, add error handling, and document diffgram annotation functions. (eg create instance, general UI features etc).
  5. Continue to reflect on where it makes more sense to expose primitives directly and where we want to enforce handling through a function. (For example setting left_nav_width directly vs a set_left_nav_width() function).

Overall we plan to keep making userscripts more powerful and more integrated. We also plan to take the best and most popular public scripts (including our own examples) and "promote" them to standard features.

If you have ideas for this please feel free to post on github or drop us a line [email protected]