Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
4ae91812
Commit
4ae91812
authored
21 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
JavaScript documentation page.
parent
8ad96377
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/js.html
+98
-0
98 additions, 0 deletions
docs/js.html
with
98 additions
and
0 deletions
docs/js.html
0 → 100644
+
98
−
0
View file @
4ae91812
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=windows-1252"
>
<meta
name=
"GENERATOR"
content=
"Microsoft FrontPage 4.0"
>
<meta
name=
"ProgId"
content=
"FrontPage.Editor.Document"
>
<title>
JavaScript in Synchronet
</title>
</head>
<body>
<h1><span
style=
"FONT-FAMILY: Arial"
>
JavaScript in Synchronet
</span></h1>
<p
class=
"MsoNormal"
><span
style=
"font-family: Arial"
>
Synchronet v3.1
</span><span
style=
"FONT-FAMILY: Arial"
>
uses
<a
href=
"http://mozilla.org/js/"
>
Netscapes JavaScript engine
</a>
(version 1.5) for its preferred local scripting environment.
<br>
You can learn about the core JavaScript language and object model from the
following Netscape documents:
<o:p>
</o:p>
</span></p>
<ul
style=
"MARGIN-TOP: 0in"
type=
"disc"
>
<li
class=
"MsoNormal"
style=
"mso-list: l2 level1 lfo5; tab-stops: list .5in"
><span
style=
"FONT-FAMILY: Arial"
><a
href=
"http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/"
>
Core
JavaScript Guide
</a><o:p>
</o:p>
</span></li>
<li
class=
"MsoNormal"
style=
"mso-list: l2 level1 lfo5; tab-stops: list .5in"
><span
style=
"FONT-FAMILY: Arial"
><a
href=
"http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/"
>
Core
JavaScript Reference
</a><o:p>
</o:p>
</span></li>
</ul>
<p
class=
"MsoNormal"
><span
style=
"FONT-FAMILY: Arial"
>
JavaScript is an
established, mature scripting language syntactically similar to C++ and Java.
<b><br>
JavaScript is
</b>
<b>
not Java
</b>
.
<o:p>
</o:p>
</span></p>
<p
class=
"MsoNormal"
><span
style=
"FONT-FAMILY: Arial"
>
The ECMA and ISO standards
organizations have standardized the core JavaScript language in
<a
href=
"http://developer.netscape.com/docs/javascript/e262-pdf.pdf"
>
ECMA-262
</a>
(ECMAScript) and ISO-16262.
<o:p>
</o:p>
</span></p>
<h2><span
style=
"font-family: Arial"
>
Baja and JavaScript
</span></h2>
<p><span
style=
"font-family: Arial"
><a
href=
"baja.html"
>
Baja
</a>
is the original
programming language of Synchronet (introduced in v2.0), used to create
Synchronet-specific
<i>
modules
</i>
and
<i>
command shells
</i>
. Baja was
originally designed as a simple BASIC-like language for controlling the display
of menus and command prompts, accepting commands from the user and passing on
control to high-level BBS functions. Over the years, Baja has been extended and
enhanced to allow a high-level of functionality, but it was never going to reach
the power and flexibility of JavaScript.
</span></p>
<p><span
style=
"font-family: Arial"
>
For example Baja modules and command shells,
see the
<b><samp>
.src
</samp></b>
files in your Synchronet
<b><code>
exec
</code></b>
directory.
</span></p>
<p><span
style=
"font-family: Arial"
>
For the foreseeable future Baja modules and
command-shells will continue to be supported in Synchronet, but sysops and
developers are encouraged to use JavaScript instead of Baja moving forward. With
very few exceptions, everything that can be done in a Baja module can be done in
a JavaScript module, and much much more.
</span></p>
<p><span
style=
"font-family: Arial"
>
Eventually, all the stock command-shells and
external modules will be converted to JavaScript.
</span></p>
<h2><span
style=
"font-family: Arial"
>
JavaScript Files
</span></h2>
<p><span
style=
"font-family: Arial"
>
JavaScript files are just ASCII text files.
They are normally named with a
<b><code>
.js
</code></b>
file extension and located in your
Synchronet
<b><samp>
exec
</samp></b>
directory. JavaScript files do not need to be compiled.
JavaScript files are loaded into memory at the time of execution, so a change to
a JavaScript file will take effect the next time that file is executed.
</span></p>
<p><span
style=
"font-family: Arial"
>
For example JavaScript modules and services,
see the
<b><samp>
.js
</samp></b>
files in your Synchronet
<b><code>
exec
</code></b>
directory.
</span></p>
<h2><span
style=
"font-family: Arial"
>
Integration
</span></h2>
<p><span
style=
"font-family: Arial"
>
At this time (v3.10j beta), JavaScript files
can be executed from:
</span></p>
<ul>
<li><span
style=
"font-family: Arial"
><b>
Telnet/Rlogin Server
</b>
<br>
as a timed event, external program (door), login/logon/newuser module,
<br>
basically anywhere a Baja module or executable can be launched
</span></li>
<li><span
style=
"font-family: Arial"
><b>
FTP Server
</b><br>
dynamically generates HTML index files
<br>
see
<samp>
exec/ftp-html.js
</samp></span></li>
<li><span
style=
"font-family: Arial"
><b>
Services
</b><br>
all services at this time (both static and dynamic) are written in
JavaScript
<br>
see
<samp>
exec/*service.js
</samp>
and
<samp>
ctrl/services.cfg
</samp></span></li>
</ul>
<p><span
style=
"font-family: Arial"
>
From the Telnet/Rlogin server, a JavaScript file is executed on a native command-line
by placing a question mark (
<samp>
?
</samp>
) at the beginning of the command-line
before the JavaScript file name (in SCFG). It is not necessary to specify the
<b><samp>
.js
</samp></b>
portion of the file name on the command-line. For example, the command-line to execute
the file
<tt>
exec/newslink.js
</tt>
would be
"
<tt>
?newslink
</tt>
"
.
</span></p>
<h2><span
style=
"font-family: Arial"
>
Object Model
</span></h2>
<p><span
style=
"font-family: Arial"
>
Synchronet has its own JavaScript object
model, not to be confused with the Document Object Model (DOM) used in web
browsers. In order to fully understand the capabilities of JavaScript modules in
Synchronet, you must familiarize yourself with
<a
href=
"http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/"
>
Core
JavaScript
</a>
as well as the
<a
href=
"jsobjs.html"
>
Synchronet JavaScript Object
Model
</a>
.
</span></p>
</body>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment