Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

@Kelsenellenelvian: could you add this modified WriteBackPrograms to t

Featured Replies

It is just a small mod but with this the user is able to user only-image-names (if they are stored in ./Graphics) or use fully qualified paths like %ROOT%\apps\app\wpi_image.png

function WriteBackPrograms(programs)
{
position="program.js";
whatfunc="WriteBackPrograms()";

for (var i=0; i<programs.length; i++)
{
if (IndentText)
textindent =' ';
else
textindent ='';

if (programs[i].picf != null)
{
if (programs[i].textl != "Top")
{
if (programs[i].textl != "Bottom")
{
pwidth=programs[i].picw;
pheight=programs[i].pich;
textloc=programs[i].textl;
desc[i+1]=imagelocationlr + programs[i].picf + imagepart2lr + pwidth + imagepart3lr + pheight + imagepart4lr + textloc + imagepart5lr + textindent + programs[i].desc;
}
}

if (programs[i].textl != "Left")
{
if (programs[i].textl != "Right")
{
if (programs[i].textl != "Bottom")
{
pwidth=programs[i].picw;
pheight=programs[i].pich;
textloc=programs[i].textl;
desc[i+1]=textindent + programs[i].desc + imagepart1t + imagelocationtb + programs[i].picf + imagepart2tb + pwidth + imagepart3tb + pheight + imagepart4tb;
}
else
{
pwidth=programs[i].picw;
pheight=programs[i].pich;
textloc=programs[i].textl;
desc[i+1]=imagelocationtb + programs[i].picf + imagepart2tb + pwidth + imagepart3tb + pheight + imagepart4tb + imagepart1b + imageparteb + textindent + programs[i].desc;
}
}
}
//check if a fully qualified path was set
if (desc[i+1].match(/img src=".*\\.*"/g) != null) {
//remove ./Graphics/
desc[i+1]=desc[i+1].replace(/src=".\/Graphics\//gi, 'src="');
//replace variables (e.g. %ROOT%)
desc[i+1]=ReplacePath(desc[i+1].replace(/src="([^"]*)"/gi, 'src="$1"'));
//get path to image
path_to_image = desc[i+1].replace(/.*src="([^"]*)".*/i, "$1");
//replace every "\" with "/"
path_to_image = path_to_image.replace(/\\/g, '/');
//build new description
desc[i+1]=desc[i+1].replace(/src="[^"]*"/gi, 'src="file://' + path_to_image + '"');
}
}
else
desc[i+1]=textindent + programs[i].desc;

prog[i+1]=programs[i].prog;
ordr[i+1]=programs[i].ordr;
uid[i+1]=programs[i].uid;
dflt[i+1]=programs[i].dflt;
cat[i+1]=programs[i].cat;
forc[i+1]=programs[i].forc;
configs[i+1]=programs[i].configs;
deps[i+1]=programs[i].deps;
excl[i+1]=programs[i].excl;
cond[i+1]=programs[i].cond;
gcond[i+1]=programs[i].gcond;
regb[i+1]=programs[i].regb;
cmd1[i+1]=programs[i].cmd1;
cmd2[i+1]=programs[i].cmd2;
cmd3[i+1]=programs[i].cmd3;
cmd4[i+1]=programs[i].cmd4;
cmd5[i+1]=programs[i].cmd5;
cmd6[i+1]=programs[i].cmd6;
rega[i+1]=programs[i].rega;
picf[i+1]=programs[i].picf;
picw[i+1]=programs[i].picw;
pich[i+1]=programs[i].pich;
textl[i+1]=programs[i].text1;
}

prog[programs.length+1]=null;
}

I think you see where the mod happens. :-)

Al

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.