LOG2 scripting reference

Legend of Grimrock 2 scripting reference formatter

当前为 2014-11-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name LOG2 scripting reference
  3. // @namespace jkos
  4. // @include http://www.grimrock.net/modding/scripting-reference/
  5. // @version 1.1
  6. // @grant none
  7. // @description Legend of Grimrock 2 scripting reference formatter
  8. // ==/UserScript==
  9. $('h3').css('cursor','pointer')
  10. $('h3').nextUntil('h3').hide();
  11.  
  12. $('h3').click(function(e){
  13. if ($(e.target).next().is(":visible") ){
  14. $('h3').nextUntil('h3').hide();
  15. }else{
  16. $(e.target).nextUntil('h3').show() ;
  17. }
  18. })
  19.  
  20. $('em').css('font-weight','bold');
  21. $('em').css('font-size','1.1em');
  22. $('li').html(function(i, val) {
  23. return '<span style="font-weight: bold">'+val.replace(':', ':</span>');
  24. });