1. 25 Apr, 2015 2 commits
    • deuce's avatar
      Add jsdocs for js.scope. · 18e8e576
      deuce authored
      18e8e576
    • deuce's avatar
      Fix exit() behaviour by introducing the new js.scope value which is the · f3256d81
      deuce authored
      scripts global scope (as opposed to js.global which is the instance global
      scope), and having exit() define exit_code in js.scope instead of js.global.
      
      This also sets exit_code in js.scope to null when preparing to execute a new
      script.  If a new script starts in the same scope as an old one, the old
      exit_code value will be destroyed.
      
      This should only impact scripts where js.global != js.scope (bbs.exec()ed,
      and mailsrvr)
      f3256d81
  2. 08 Oct, 2013 1 commit
  3. 03 Oct, 2013 1 commit
  4. 13 Sep, 2013 1 commit
  5. 16 Mar, 2013 1 commit
  6. 08 Feb, 2013 1 commit
  7. 15 Mar, 2012 4 commits
  8. 12 Nov, 2011 1 commit
  9. 02 Nov, 2011 1 commit
  10. 29 Oct, 2011 1 commit
  11. 28 Oct, 2011 1 commit
  12. 26 Oct, 2011 1 commit
  13. 19 Oct, 2011 1 commit
  14. 16 Oct, 2011 2 commits
  15. 11 Oct, 2011 1 commit
  16. 10 Oct, 2011 1 commit
  17. 09 Oct, 2011 6 commits
  18. 08 Oct, 2011 2 commits
  19. 31 Aug, 2011 2 commits
    • rswindell's avatar
      Eliminate problematic js properties in non-debug builds: · a3c7a535
      rswindell authored
      js.gc_counter, js.gc_last_bytes, js.bytes, and js.max_bytes
      Since these properties rely on internal JS context structure offsets, they're
      not always compatible with replaced (upgraded or downgraded) JS library
      (shared object or DLL) and can cause crashes in some cases. They can be
      useful in some debugging cases, so I'm leaving them in the debug build, but
      use with caution.
      a3c7a535
    • rswindell's avatar
      Fix bug introduced in rev 1.44: a js.on_exit() handler could not change the · 576d5d67
      rswindell authored
      value of js.auto_terminate (e.g. the irc.js could not restore the original
      value, thus re-enabling auto-terminate upon exit of the IRC client).
      576d5d67
  20. 12 Aug, 2011 1 commit
  21. 13 Jul, 2011 1 commit
  22. 02 Apr, 2010 3 commits
  23. 13 Mar, 2010 1 commit
    • rswindell's avatar
      Remove Deuce's jsexec object, define js.startup_dir instead, which is now · 49b9ff9f
      rswindell authored
      (potentially) non-blank for external JS modules configured in SCFG->External
      Programs, as well as those executed from jsexec. If the startup_dir is
      specified in SCFG and no path is given for the .js file, it will look in the
      startup_dir first. js.startup_dir will be an empty string for all other cases
      (currently).
      49b9ff9f
  24. 18 Aug, 2009 1 commit
  25. 14 Aug, 2009 2 commits
    • rswindell's avatar
      When executing (not loading) a script from a file, 3 new properties are · 71d44c8f
      rswindell authored
      created:
      js.exec_path - full path and filename of file executed
      js.exec_dir - directory of executed file
      js.exec_file - filename executed (with no path)
      71d44c8f
    • rswindell's avatar
      Added JS load() search path extensibility: · f45e2156
      rswindell authored
      Configurable via ctrl/sbbs.ini file JavaScriptLoadPath key value
      (comma-separate listed of search directories), default value is "load".
      This list is exposed in the JS object model via the js.load_path_list array
      (may be modified by scripts).
      For JSexec, the default load path list may be over-ridden with the '-i' option.
      For relative load paths (e.g. not beginning with '/' or '\'), the path is
      assumed to be a sub-directory of the (configurable) mods or exec directories
      and is searched accordingly.
      So, by default, load("somefile.js") will search in this order:
      mods/load/somefile.js
      exec/load/somefile.js
      mods/somefile.js
      exec/somefile.js
      f45e2156