Git Product home page Git Product logo

adapt-launchnewwindow's Introduction

adapt-launchNewWindow

The launch new window extension forces your Adapt course to open in a new window - something that can be very useful if your course is being run from a platform that embeds the content within an iframe or frameset (which can cause rendering issues in iOS). The extension allows you to be quite specific about when it does this so you can, for example, set it to open the content on iOS/iPadOS only when running from an LMS (i.e. when index_lms.html is used to run the course).

//config.json
    "_launchNewWindow": {
        "_isEnabled": true,
        "_stopSessionInitialize": true,
        "_activeOnPages": [
            "index_lms.html"
        ],
        "_activeOnSelector": ".os-ios",
        "_target": "courseWin",
        "_strWindowFeatures": "width={{width}},height={{height}},menubar=no,location=no,directories=no,resizable=yes,scrollbars=yes",
        "_delay": 500,
        "preLaunchTitle": "The course should now open in a new browser window.",
        "preLaunchBody": "If this does not occur, please deactivate any popup blocking software - then <a href=\"{{href}}\" target=\"_blank\">click here</a> or refresh this page to try again.",
        "launchTitle": "The course should now be open in a new browser window.",
        "launchBody": "Please ensure you don't close or do anything in this window whilst the course is in progress.",
        "closedTitle": "You have closed the course.",
        "closedBody": "Please close this window to continue."
    }

The _activeOnSelector setting can be a comma-separated list if you want to target multiple platforms/browsers e.g. "_activeOnSelector": ".os-ios, .os-android" or leave blank for always-on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.