LOG2 scripting reference

Legend of Grimrock 2 scripting reference formatter

目前為 2014-11-06 提交的版本,檢視 最新版本

    // ==UserScript==
    // @name        LOG2 scripting reference
    // @namespace   jkos
    // @include     http://www.grimrock.net/modding/scripting-reference/
    // @version     1
    // @grant       none
    // @description Legend of Grimrock 2 scripting reference formatter
    // ==/UserScript==
           
    $('h3').css('cursor','pointer')
    $('h3').nextUntil('h3').hide();

    $('h3').click(function(e){
      if ($(e.target).next().is(":visible") ){
        $('h3').nextUntil('h3').hide();
      }else{
        $(e.target).nextUntil('h3').show() ;
      }
    })

    $('em').css('font-weight','bold');
    $('em').css('font-size','1.1em');
    $('li').html(function(i, val) {
      return '<span style="font-weight: bold">'+val.replace(':', ':</span>');
    });