How to create a favlet to allow my members to use this code offsite?

favlet should have a link they can drag to their toolbar links.

<form><input type="button" onClick="fullwin('')" value="Screensaver"></a></form>

or if i make ita regular href link can they drag that to their toolbar links?

<a href="forumer.com/index.php?act=Attach&type=post&id=7101" target="_blank">screensaver</a>


how do I make it open full window with a regular href link though?

Dani AI

Generated

posted the JavaScript screensaver and asked how to let members drag a favlet to their toolbar; asked for clarification. Two realistic approaches are available: a bookmarklet that runs the screensaver inside the browser, or packaging a native Windows screensaver (.scr/.exe) for full integration. Each has trade-offs: bookmarklets are simple to distribute but are limited by popup blockers, framing headers, and browser fullscreen rules; native builds give full control but require packaging and testing.

A reliable bookmarklet pattern is to inject a full-window element on the current page and call the Fullscreen API (a bookmarklet click counts as a user gesture). This avoids popup-blocker issues that often block window.open. Example (replace the example URL with the hosted screensaver page and URL-encode when creating the actual bookmarklet):

javascript:(function(){
  var s='https://example.com/screensaver.html';
  var f=document.createElement('iframe');
  f.src=s;
  f.style.cssText='position:fixed;left:0;top:0;width:100%;height:100%;border:0;z-index:2147483647;background:#000';
  document.documentElement.appendChild(f);
  try{
    if(f.requestFullscreen) f.requestFullscreen();
    else if(f.webkitRequestFullscreen) f.webkitRequestFullscreen();
    else if(f.mozRequestFullScreen) f.mozRequestFullScreen();
  }catch(e){}
})();

Notes: the target page must allow being framed (no X-Frame-Options/CSP frame-ancestors). Some browsers may still prompt or block fullscreen for framed content. For drag-to-bookmarks, present the bookmarklet as an anchor with href="javascript:..." and instruct users to drag it to the bookmarks bar or use the browser’s “Add bookmark” action.

For a native screensaver, package the HTML/JS into a Windows app (Electron, NW.js, or a small C#/C++ wrapper with an embedded WebView). Implement handling for screensaver command-line switches (Windows uses /s, /p, /c) and open a borderless fullscreen window on /s. Then build the exe, rename to .scr, and install. Electron and native-packaging tools avoid watermarks and give complete control; see the Electron docs for packaging guidance and the Fullscreen API docs for browser behavior: Electron | Element.requestFullscreen. For background on the screensaver format: Screensaver (Wikipedia).

Final tips: test on multiple browsers/Windows versions, sign the executable to reduce SmartScreen warnings, and provide clear install/uninstall instructions.

Recommended Answers

All 4 Replies

Member Avatar for Member #114696

Uh....didnt understood your question well....by toolbarlink do yo mean bookmarks or what?

A bookmarklet yes, its a favorites link, that is a short clickable code that can be executed from favorites links. sometimes called a favlet..

You see I have created a javascript screensaver for my website, I wish to allow my users to use the screensaver on their computer desktop but I dont know how to create an .exe type screensaver that they can download. This was just an idea. An .exe screensaver would ofcourse be better.

There aremany that can be downloaded but I wish to have control of the appearance of the screensaver. Its a photo screensaver but I wish to createa background for photos based on the wallpaper of my website.

Doesanyone know of a free downloadable screensaver creation program that will allow me to do that but will not watermark my images?

Member Avatar for Member #114696

I dont have any ideo of favlets.

Uh...you have made which kind of screensaver...i mean format. Is it a photo album?

this is my screensaver its javascript. I want to recreate this as an exe file for download to work on a persons computer in thenormal manner of screensavers

here is link to see what it does

forumer.com/index.php?act=Attach&type=post&id=7101

here is its code

<script language="JavaScript">
<!--
Timeout=60000 // set delay time for effect
Timer=""
function oStatic() {
clearTimeout(Timer)
if(timerRunning == true||blurred==1){ // if win1 opened or opener is blurred, return
return
}
timerRunning = true
win1=window.open("",'','fullscreen') // if win1 not opened, open win1
Timer=setTimeout("oStatic()",Timeout) // run function oStatic after delay
}
opened=0 // win1 not opened
function oActive(){ // 
clearTimeout(Timer)
if(opened==1){return} // if win1 opened, return
timerRunning = false
Timer=setTimeout("oStatic()",Timeout) // if win1 not opened run function oStatic after delay
}
document.onmousemove=oActive // detect mouse movement
document.onmousedown=oActive // detect if button pressed
document.onkeypress=oActive // detect if key press
setTimeout("oActive()",1000)
//-->
</script> 

<BODY onblur="blurred='1'" onfocus="blurred='0';oActive()">

 <script>document.write(Timeout/1000);</script> 
</BODY>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.