Module: nolimit

Source:

Members

(static) version

Properties:
Name Type Description
version String

current version of nolimit.js

Source:

Methods

(static) info(options, callback)

Load information about the game, such as: current version, preferred width/height etc.

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
environment String <optional>
partner

which environment to use; usually 'partner' or the name of a production environment. This overrides the environment part of the hostname.

game String

case sensitive game code, for example 'DragonTribe' or 'Wixx'

version String <optional>

force specific version of game to load.

callback function

called with the info object, if there was an error, the 'error' field will be set

Source:
Example
nolimit.info({game: 'DragonTribe'}, function(info) {
    var target = document.getElementById('game');
    target.style.width = info.size.width + 'px';
    target.style.height = info.size.height + 'px';
    console.log(info.name, info.version);
});

(static) init(options)

Initialize loader with default parameters. Can be skipped if the parameters are included in the call to load instead.

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
operator String

the operator code for the operator

language String <optional>
"en"

the language to use for the game

device String <optional>
desktop

type of device: 'desktop' or 'mobile'. Recommended to always set this to make sure the correct device is used.

environment String <optional>
partner

which environment to use; usually 'partner' or the name of a production environment. This overrides the environment part of the hostname.

fullscreen Boolean <optional>
true

set to false to disable automatic fullscreen on mobile (Android only)

clock Boolean <optional>
true

set to false to disable in-game clock

autoplay Boolean <optional>
true

set to false to disable and remove the auto play button.

mute Boolean <optional>
false

start the game without sound

hideCurrency Boolean <optional>

hide currency symbols/codes in the game

quality String <optional>

force asset quality. Possible values are 'high', 'medium', 'low'. Defaults to smart loading in each game.

jurisdiction Object <optional>

force a specific jurisdiction to enforce specific license requirements and set specific options and overrides. See README for jurisdiction-specific details.

Properties
Name Type Attributes Description
name Object <optional>

the name of the jurisdiction, for example "MT", "DK", "LV", "RO", "UKGC", "PT", "ES", "IT" or "SE".

realityCheck Object <optional>

set options for reality check. See README for more details.

Properties
Name Type Attributes Default Description
enabled Object <optional>
true

set to false to disable reality-check dialog.

interval Number <optional>
60

Interval in minutes between showing reality-check dialog.

sessionStart Number <optional>
Date.now()

override session start, default is Date.now().

nextTime Number <optional>

next time to show dialog, defaults to Date.now() + interval.

bets Number <optional>
0

set initial bets if player already has bets in the session.

winnings Number <optional>
0

set initial winnings if player already has winnings in the session.

message Number <optional>

Message to display when dialog is opened. A generic default is provided.

playForFunCurrency String <optional>
EUR

currency to use when in playing for fun mode. Uses EUR if not specified.

hideExitButton Boolean <optional>
false

set to true to control closing of mobile games from outside of game area.

showExitButtonDesktop Boolean <optional>
false

set to true to show exit button also in desktop mode.

useReplayLinkPopup Boolean <optional>
false

set to true to show a popup for loading replays instead of trying to open directly.

googleAnalytics Boolean <optional>
true

set to false to completely disable the use of analytics.

lobbyUrl String <optional>
"history:back()"

URL to redirect back to lobby on mobile, if not using a target

depositUrl String <optional>

URL to deposit page, if not using a target element

supportUrl String <optional>

URL to support page, if not using a target element

depositEvent Boolean <optional>

instead of using URL, emit "deposit" event (see event documentation)

lobbyEvent Boolean <optional>

instead of using URL, emit "lobby" event (see event documentation) (mobile only)

accountHistoryUrl String <optional>

URL to support page, if not using a target element

Source:
Example
nolimit.init({
   operator: 'SMOOTHOPERATOR',
   language: 'sv',
   device: 'mobile',
   environment: 'partner',
   currency: 'SEK',
   jurisdiction: {
       name: 'SE'
   },
   realityCheck: {
       interval: 30
   }
});

(static) load(options) → {nolimitApi}

Load game, replacing target with the game.

  • If target is a HTML element, it will be replaced with an iframe, keeping all the attributes of the original element, so those can be used to set id, classes, styles and more.
  • If target is a Window element, the game will be loaded directly in that.
  • If target is undefined, it will default to the current window.
  • Parameters:
    Name Type Description
    options Object

    see init for details

    Properties
    Name Type Attributes Default Description
    game String

    case sensitive game code, for example 'DragonTribe' or 'Wixx'

    target HTMLElement | Window <optional>
    window

    the HTMLElement or Window to load the game in

    token String <optional>

    the token to use for real money play

    version String <optional>

    force specific game version such as '1.2.3', or 'development' to disable cache

    Source:
    See:
    • nolimit.init for details on more options
    Returns:

    The API connection to the opened game.

    Type
    nolimitApi
    Example
    var api = nolimit.load({
       game: 'DragonTribe',
       target: document.getElementById('game'),
       token: realMoneyToken,
       mute: true
    });

    (static) replace(options)

    Load game in a new, separate page. This offers the best isolation, but no communication with the game is possible.

    Parameters:
    Name Type Description
    options Object

    see init for details

    Properties
    Name Type Attributes Description
    game String

    case sensitive game code, for example 'DragonTribe' or 'Wixx'

    token String <optional>

    the token to use for real money play

    version String <optional>

    force specific game version such as '1.2.3', or 'development' to disable cache

    Source:
    See:
    • nolimit.init for details on more options
    Example
    var api = nolimit.replace({
       game: 'DragonTribe',
       target: document.getElementById('game'),
       token: realMoneyToken,
       mute: true
    });

    (static) url(options) → {string}

    Constructs a URL for manually loading the game in an iframe or via redirect.

    Parameters:
    Name Type Description
    options Object

    see init for details

    Source:
    See:
    • nolimit.init for details on options
    Returns:
    Type
    string