paltalk - Sub-Dark/Admin GitHub Wiki
var bHasActiveX = ((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('MSIE') != -1) && (parseInt(navigator.appVersion) >= 4)); var bUnsupportedBrowser = ((navigator.userAgent.indexOf('Safari') != -1) || (navigator.userAgent.indexOf('Opera') != -1)); var detected;
if (typeof (detected) == "undefined" && bHasActiveX) { document.write(['<script language="VBscript">', 'Function isPaltalkInstalledVB()', 'on error resume next', 'Set paltalkObj = CreateObject("pallauncher.command")', 'isPaltalkInstalledVB = IsObject(paltalkObj)', 'Set paltalkObj = nothing', 'End Function', '</script>'].join("\n")); }
function checkPaltalk() { if (!isPaltalkInstalled()) { return gotoDownloadPage() } return true; }
function isPaltalkInstalled() { if (bUnsupportedBrowser) { return true; } else if (!bHasActiveX) { var paltalkMime = navigator.mimeTypes["application/x-paltalk"]; detected = true;
if (typeof (paltalkMime) == "object")
{
return true;
}
else
{
return false;
}
}
else
{
if (isPaltalkInstalledVB())
{
detected = true;
return true;
}
}
detected = true;
return false;
}
function gotoDownloadPage(target_url) { var download_url = "http://www.paltalk.com/download.shtml";
if (target_url != null && target_url != '')
{
download_url = download_url + "?target=" + target_url;
}
window.location.href = download_url;
return false;
}
function gotoDownloadPageWithRefc(target_url, refc) { var download_url = "http://www.paltalk.com/en/client_download.shtml";
if (target_url != null && target_url != '')
{
download_url = download_url + "?target=" + target_url;
if (refc > 0)
{
download_url = download_url + "&refc=" + refc;
}
}
window.location.href = download_url;
return false;
}
function executeCmd(target_url) {
if (isPaltalkInstalled())
{
window.location.href = target_url;
}
else
{
gotoDownloadPage(target_url);
alert("If Paltalk is installed on your computer and you are getting this message, then select Run ActiveX Control at the top of this window and try again. This will run Paltalk, and a SuperIM session will be initiated.");
}
}
function launchGroup(group_id) { if (navigator.appVersion.indexOf("Mac") != -1) { window.location.href = "http://express.paltalk.com/index.html?gid=" + encoded_ug_id; } else { executeCmd("paltalk://groups/" + group_id); }
}
function launchPaltalk() { executeCmd("paltalk://"); }
function launchGroupWithRefc(group_id, refc) { executeCmd("paltalk://groups/" + group_id); }
function addBuddy(uid) { executeCmd("paltalk://addbuddy/" + uid); }
function removeBuddy(uid) { executeCmd("paltalk://removebuddy/" + uid); }
function launchRecorder() { executeCmd("paltalk://launchrecorder/"); }
function launchRecorder() { executeCmd("paltalk://launchrecorder/"); }
function updateN2PBalanceCmd() { executeCmd("paltalk://n2pbal/"); }
function updateMydispPicCmd() { executeCmd("paltalk://updatemydisppic/"); }
function showaskofferCmd() { executeCmd("paltalk://showaskoffer/"); }
function showdialerCmd() { executeCmd("paltalk://showdialer/"); }
function takeATourCmd() { executeCmd("paltalk://takeatour/"); }
function preferencesCmd() { executeCmd("paltalk://preferences/"); }
function guidesRequestCmd() { executeCmd("paltalk://guidesrequest/"); }
function guidesVolunteerCmd() { executeCmd("paltalk://guidesvolunteer/"); }
function addPalCmd() { executeCmd("paltalk://addpal/"); }
function myFavoritesCmd() { executeCmd("paltalk://myfavorites/"); }
function onNowCmd() { executeCmd("paltalk://onnow/"); }
function liveGuideCmd() { executeCmd("paltalk://liveguide/"); }
function helpRoomCmd() { executeCmd("paltalk://SubDark/"); }
function inviteAFriendCmd() { executeCmd("paltalk://inviteafriend/"); }
function startWebSuperIMCmd() { executeCmd("paltalk://startwebsuperim/"); }
function chatAIMCmd() { executeCmd("paltalk://chataim/"); }
function chatYHCmd() { executeCmd("paltalk://chatyh/"); }
function chatICQCmd() { executeCmd("paltalk://chaticq/"); }
function browseRoomsCmd() { executeCmd("paltalk://browserooms/"); }
function autoPlaceCmd() { executeCmd("paltalk://autoplace/"); }
function topRatedRoomsCmd() { executeCmd("paltalk://topratedrooms/"); }
function createOwnRoomCmd() { executeCmd("paltalk://createownroom/"); }
function makePhoneCallCmd() { executeCmd("paltalk://makephonecall/"); }
function ssonCommand(mptUrl) { executeCmd("paltalk://sson/" + mptUrl); }
function getOutlookAddresses() { executeCmd("paltalk://getOutlookEmails"); }
function launchImWindow(uid) { launchImWindowWithRefc(uid, 0); }
function launchImWindowWithRefc(uid, refc) { if (isPaltalkInstalled()) { executeCmd("paltalk://pm/" + uid); } else { if (refc > 0) { window.location.href = "http://express.paltalk.com/index.html?pid=" + uid + "&refc=" + refc; } else { window.location.href = "http://express.paltalk.com/index.html?pid=" + uid; } } }
function openGroup(encoded_ug_id, encoded_group_id, refc) { if (refc > 0) { window.location.href = "http://www.paltalk.com/g2/group/" + encoded_group_id + "/WebLoader.wmt?refc=" + refc; } else { window.location.href = "http://www.paltalk.com/g2/group/" + encoded_group_id + "/WebLoader.wmt"; } }
function openGroupByEncodedUG(encoded_ug_id, bRoomOpened, refc) { if (navigator.appVersion.indexOf("Mac") != -1) { window.location.href = "http://express.paltalk.com/index.html?gid=" + encoded_ug_id; } else { if (!bRoomOpened) { if (refc > 0) { window.location.href = "http://www.paltalk.com/g2/paltalk/" + encoded_ug_id + "/index.wmt?refc=" + refc; } else { window.location.href = "http://www.paltalk.com/g2/paltalk/" + encoded_ug_id + "/index.wmt"; }
}
else
{
if (isPaltalkInstalled())
{
launchGroup(encoded_ug_id);
}
else
{
if (refc > 0)
{
window.location.href = "http://express.paltalk.com/index.html?gid=" + encoded_ug_id + "&refc=" + refc;
}
else
{
window.location.href = "http://express.paltalk.com/index.html?gid=" + encoded_ug_id;
}
}
}
}
}
function launchURL(target_url) { if (isPaltalkInstalled()) { window.location.href = "paltalk://sson/" + target_url; } else { window.location.href = target_url; } }