I have saved your plugin code as Js file And i have included into my .html File.

Im getting this error when i load page.

"Ext.preg is not a function"
for
Ext.preg('fittoparent', Ext.ux.FitToParent);