Example script

This is an example script from RPG Maker MV, taken from http://www.rpgmaker-mv.com/javascript-not-java/ by Hudell at RMWeb.
  1. /*
  2.  * @param Width
  3.  * @desc japanese text
  4.  * @default 240
  5.  
  6.  * @param Background
  7.  * @desc japanese text
  8.  * @default 0
  9.  
  10.  * @help japanese text
  11. */
  12.  
  13. (function() {
  14.     var parameters = PluginManager.parameters['TitleCommandPosition'];
  15.     var offsetX = Number(parameters['Offset X'] || 0);
  16.     var offsetY = Number(parameters['Offset Y'] || 0);
  17.     var width = Number(parameters['Width'] || 240);
  18.     var background = Number(parameters['Background'] || 0);
  19.  
  20.     var _Window_TitleCommand_updatePlacement = Window_TitleCommand.prototype.updatePlacement;
  21.  
  22.     Window_TitleCommand.prototype.updatePlacement = function() {
  23.         _Window_TitleCommand_updatePlacement.call(this);
  24.         this.x = offsetX;
  25.         this.y = offsetY;
  26.         this.setBackgroundType(background);
  27.     };
  28.  
  29.     Window_TitleCommand.prototype.windowWidth = function() {
  30.         return width;
  31.     };
  32. })();
Expand to see the code.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=78753