Jump to content
Welcome to our new Citrix community!
  • Storefront 2.6 and Windows 10 Edge Browser


    cugcblogs

    samjacobsrnd.png by Sam Jacobs, CTP

    If you've been following Feng Huang's blog on customizing Receiver, you've probably seen StoreFront 3.0 and Windows 10 Edge Browser. In it, Feng explains how StoreFront 3.0 has been given the smarts to allow you to use the native Receiver with Edge.

    What if you are still running StoreFront 2.6 (or 2.5)? Since Edge cannot run the ActiveX controls necessary for client detection, only the HTML5 Receiver would be used (see: Receiver Feature Matrix for HTML5 Receiver limitations).

     

    This post will use a slightly modified version of another one of Feng's posts - Preparing for NPAPI Being Disabled by Google Chrome - to give you the ability to use the native Receiver with Edge and StoreFront 2.x.

    In that post, Feng discusses how to:

    • Disable the prompt to install the Receiver
    • Provide a permanent link for downloading the Receiver
    • Provide a link to switch between the native (full) Receiver and the HTML5 Receiver (referred to as the 'Lite' version of the Receiver).

     

    However, the modifications discussed in the post are specific to Chrome. With just a bit of tweaking, we can add the above features to work for any browser.

     

    We begin by adding the following strings to custom.wrstrings.en.js and a localized version for every language you need to support to custom.wrstrings.[language].js. 

        DownloadReceiver: 'Install full Receiver',    DownloadReceiverToolTip: 'Install the full version of Receiver on your PC',    ChangeToLiteClient: "Use lite version of Receiver",    ChangeToLiteClientToolTip: "You are currently using the full version of Receiver to launch applications. Click here to change to use the lite version. The lite version should be used for Chromebooks, and anytime the full version of the Receiver can not be installed.",    ChangeToFullClient: "Change to full Receiver",    ChangeToFullClientToolTip: "You are currently using the lite version of Receiver to launch applications. Click here to change to use the full version.",

    Next, we need to add the code below to custom.script.js (in the contrib folder of the StoreWeb site).

    $(document).ready(function () {    // 10-15-2015 - sj - disable the client download prompt for ALL browsers    function endPluginAssistant() {        CTXS.setCookie(CTXS.COOKIE_PLUGIN_ASSISTANT_STATE, CTXS.PLUGIN_ASSISTANT_DONE);        if (CTXS.getCookie(CTXS.COOKIE_PLUGIN_ASSISTANT_STATE) === null) {            CTXS.displayTemplate("CookiesAreDisabled");        } else {            CTXS.Application.displaySpinner();            CTXS.Events.publish(CTXS.Events.pluginAssistant.done);        }    };    var origInit = CTXS.PluginDetection.init;    CTXS.PluginDetection.init = function() {        endPluginAssistant();    }    // 10-15-2015 - sj - add links for downloading the Receiver and switching between clients    $.ctxs.ctxsUserMenu.prototype._origGenerateDropDownMenu = $.ctxs.ctxsUserMenu.prototype._generateDropDownMenu;    $.ctxs.ctxsUserMenu.prototype._generateDropDownMenu = function(ddMenu) {        var self = this;        var $mBody = ddMenu.children(".usermenu-body");        if ((CTXS.ClientInfo.isWindows() || CTXS.ClientInfo.isMacOSX())) {            var clientUrl = CTXS.ClientInfo.isWindows() ? CTXS.Config.pluginAssistant.win32.path : CTXS.Config.pluginAssistant.macOS.path;            $mBody.append('

    '.format(clientUrl));        }        if ((CTXS.Config.pluginAssistant.html5.enabled == CTXS.Html5Client.ENABLED_FALLBACK) && (! CTXS.Html5Client.mustUseHtml5Client())) {    CTXS.Html5Client.usingHtml5Client = function (flag) {                return (CTXS.getCookie("CtxsUseHtml5Client") == "true");            };            var label = (CTXS.getCookie("CtxsUseHtml5Client") == "true") ? $.localization.string('ChangeToFullClient') : $.localization.string('ChangeToLiteClient');            var title = (CTXS.getCookie("CtxsUseHtml5Client") == "true") ? $.localization.string('ChangeToFullClientToolTip') : $.localization.string('ChangeToLiteClientToolTip');            $mBody.append('

    ' + label + '

    ')                .find('#userdetails-changeclient')                .click(function(event) {                    if (CTXS.getCookie("CtxsUseHtml5Client") == "true") {                        CTXS.setCookie("CtxsUseHtml5Client", "false", true);                        $('#userdetails-changeclient').text($.localization.string('ChangeToLiteClient'));                        $('#userdetails-changeclient').attr('title', $.localization.string('ChangeToLiteClientToolTip'));                    } else {                        CTXS.setCookie("CtxsUseHtml5Client", "true", true);                        $('#userdetails-changeclient').text($.localization.string('ChangeToFullClient'));                        $('#userdetails-changeclient').attr('title', $.localization.string('ChangeToFullClientToolTip'));                    }                    event.preventDefault();                });        }        self._origGenerateDropDownMenu(ddMenu);    };});

    The code above adds the following links to the dropdown next to the user's name:

    sjacobs10231501.png.e3d93e6f58541dd1b8ac475249ac26e3.png

    By default, the Receiver will be downloaded from citrix.com. To deploy Receiver from StoreFront, see Section 2.2 here: Customize and Deploy Citrix Receiver.

    If you hover over the second option:

    sjacobs10231502.png.64921ba66b77d81fa6114e00cd5e4f45.png

    Click the option to switch to the HTML5 ("lite") Receiver.

    Click the menu option once again ...

    sjacobs10231503.png.061265a508d985d9fc2ee65516186244.png

    ... and you're back to using the native Receiver.


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...