Get started using jsYossGeneral

Get help with yoss!
Post Reply
Dr. Madskull
Posts: 19
Joined: Tue Jun 04, 2019 11:35 am

Get started using jsYossGeneral

Post by Dr. Madskull » Tue Feb 11, 2020 9:21 pm

Hi there! Long time no update, so I felt it's time to actually document what can be done with the jsYossGeneral library.

What is it? It is a simple plugin allowing you to control some things which the javascript cannot normally do, like getting the content of the home directory! I do this simple; each function comes with an explanation and a usage example.

hideControlBox

Code: Select all

jsYossGeneral.hideControlBox(true);
Calling this function with true will hide the minimize-button along with the other buttons after three seconds of the mouse not moving. As soon as the mouse moves, the buttons show up again.

Call with false to make them show regardless of any mouse movements.

hideMouse

Code: Select all

jsYossGeneral.hideMouse(true);
Hide the mouse pointer after three seconds of mouse not moving. As soon as the mouse moves mouse pointer is shown again.
You could probably get this working with some hideous javascript calls, but this is easier!

Call with false to always show mouse pointer.

getHomeDirectoryFiles

Code: Select all

var imgs = jsYossGeneral.getHomeDirectoryFiles("*.jpg|*.png|*.gif");
fileNames = imgs.split(";");
Returns a semi-colon separated list of all files in the users Documents\YourOwnScreenSaver directory.

The search-pattern can be used to filter specific file format(s).
Example:

Code: Select all

var files = jsFileLoader.getHomeDirectoryFiles("*.html|*.js");
files might look like this: "index.html;last.html;all.js;mostly.js"
First the html files, then the js files, the order you specify in the search pattern.

See screen saver yoss_slideshow.js for a working example!

Post Reply