The West - Change of interface

Change of interface to be able to have more scripts

  1. // ==UserScript==
  2. // @name The West - Change of interface
  3. // @namespace https://greatest.deepsurf.us/es/scripts/38058-the-west-change-of-interface
  4. // @author HALCON DE ORO
  5. // @description Change of interface to be able to have more scripts
  6. // @include https://*.the-west.*/game.php*
  7. // @version 1.3
  8. // ==/UserScript==
  9. (function (func) {
  10. var script = document.createElement('script');
  11. script.setAttribute('type', 'application/javascript');
  12. script.textContent = '(' + func.toString() + ')();';
  13. document.body.appendChild(script);
  14. document.body.removeChild(script);
  15. })(function () {
  16.  
  17. //Cambio en la interfaz para que entren mas scripts.
  18. $('div#ui_bottomright').css({
  19. 'right': '55px'
  20. });
  21. $('div#ui_right').css({
  22. 'right': '35px'
  23. });
  24. $('#westforts_link_div').css({
  25. 'right': '40px'
  26. });
  27. $('div#ui_menubar').css({
  28. 'bottom': '110px'
  29. });
  30. $('div#buffbars').css({
  31. 'right': '35px'
  32. });
  33. //Para guardar el boton de los scripts en opciones
  34. $(document).ready(function()
  35. {
  36. var newfunction = String(EscapeWindow.open);
  37. newfunction = 'EscapeWindow.open='+newfunction+';';
  38. newfunction = newfunction.replace(/\.setSize\(240\,290\)/g, ".setSize(240, 326)");
  39. newfunction = newfunction.replace(/window\.open\(Game\.forumURL,'wnd'\+\(new Date\)\.getTime\(\)\);/g, "(window.open(Game.forumURL, 'wnd' + new Date).getTime());}],['Script', function() {TheWestApi.open();");
  40. eval(newfunction);
  41. window.setTimeout("$('#ui_scripts').css({'display' : 'none'});", 10000);
  42. });
  43.  
  44. });