Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 81
    • Issues 81
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • dulst
  • core
  • Wiki
  • Custom Javascript

Last edited by Kaoru Aoi Jan 08, 2019
Page history

Custom Javascript

Javascript can be edited on the admin/basic page for Enterprise tier games during development.

This is not recommended for production use. Instead push all your client js to the /js/ top level directory in your git repo and import them into dulst.

Dulst regularly fires off jQuery events that you may bind on. Example:

$(document).on('dulst:play:layoutComplete', function () {
  // your response here.
})

Events list

$.event.trigger("dulst:gameLoad");
$.event.trigger('user:loadProfile')
$.event.trigger('user:login')
$.event.trigger('dulst:updateLibrary')
$.event.trigger('dulst:cardView')
$.event.trigger('dulst:renderCardList');
$.event.trigger('dulst:newPlayerJoinGame');

In play

When the map has loaded.

$.event.trigger('dulst:play:layoutComplete')

On every event fired by the effect builder

$.event.trigger("dulst:play:event", event)

On every event fired by the effect builder

$.event.trigger("dulst:play:youWin")

When a card is about to be removed

$.event.trigger("dulst:play:removeCardFromMatch", ciid)

When a card has a property change

$.event.trigger("dulst:play:setCardProperty", ciid, property, newValue, difference)

When a new status message is being posted.

$.event.trigger("dulst:play:statusMessage", text)

When the player gets a request from another player to spectate

$.event.trigger("dulst:play:spectateRequest", spectator)

When the player views a stack

$.event.trigger("dulst:play:viewStack", cards)
Clone repository
  • Analytics Events
  • Animations
  • Basic Effect Building
  • Change Log v13
  • Change Log v14
  • Change Log v15
  • Change Log v16.1
  • Change Log v16.2
  • Change Log v16.3
  • Change Log v16.4
  • Change Log v16.5
  • Change Log v16.6
  • Change Log v16.7
  • Change Log v16.8
  • Change Log v16
View All Pages