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
2ee0230b
Commit
2ee0230b
authored
19 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Updated to mention web server, ssjs files, and other minor stuff.
parent
b4490f93
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
+27
-14
27 additions, 14 deletions
docs/js.html
with
27 additions
and
14 deletions
docs/js.html
+
27
−
14
View file @
2ee0230b
...
...
@@ -28,8 +28,9 @@ following Netscape documents:<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>
established, mature scripting language syntactically similar to C++ and Java.
<p><a
href=
"js/guide/intro.html#1012569"
>
JavaScript is
<b>
not Java
</b></a>
.
<o:p>
</o:p>
</span></p>
<p
class=
"MsoNormal"
><span
style=
"FONT-FAMILY: Arial"
>
The ECMA and ISO standards
...
...
@@ -39,7 +40,7 @@ organizations have standardized the core JavaScript language in <a href="http://
</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
programm
ing language of Synchronet (introduced in v2.0), used to create
script
ing 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
...
...
@@ -57,42 +58,54 @@ a JavaScript module, and much much more.</span></p>
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.
They are normally named with a
<b><code>
.js
</code></b>
file extension
and located in your Synchronet
<b><samp>
exec
</samp></b>
directory or with a
<b><code>
.ssjs
</code></b>
and located in your Synchronet
<b><samp>
web
</samp></b>
hierarchy. 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>
a JavaScript file will take effect the next time that file is executed
(no recycling of servers is normally required)
.
</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>
see the
<b><samp>
.js
</samp></b>
files in your Synchronet
<b><code>
exec
</code></b>
directory.
<p>
Modified stock
<b><samp>
.js
</samp></b>
files should be placed in your Synchronet
<b><code>
mods
</code></b>
directory to prevent
over-writing by future upgrades.
</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>
<p><span
style=
"font-family: Arial"
>
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>
Web Server (v3.12+)
</b><br>
dynamically generates HTML files
<br>
see
<samp>
web/html/*.ssjs
</samp></span>
<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>
see
<samp>
exec/ftp-html.js
</samp>
and
<samp>
exec/ftp-web-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>
see
<samp>
exec/*service.js
</samp>
and
<samp>
ctrl/services.
ini
</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>
the file
<tt>
exec/newslink.js
</tt>
would be
"
<tt>
?newslink
</tt>
"
or
"
<tt>
?newslink.js
</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
<h2><span
style=
"font-family: Arial"
>
Object Model
(methods and properties)
</span></h2>
<p><span
style=
"font-family: Arial"
>
Synchronet has its own
constantly evolving
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=
"js/ref/index.html"
>
Core
JavaScript
</a>
as well as the
<a
href=
"jsobjs.html"
>
Synchronet JavaScript Object
Model
</a>
.
</span></p>
<p
align=
"right"
><font
face=
"Arial,Helvetica"
size=
"1"
>
$Id$
</font>
</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