Use Libraries For Shared Code
If you find your self reusing code to do things, put it into a library that can be included in other scripts. Here's how this might look:
Library Page named MyLibrary:
<script type="text/vnd.editme.js"><![CDATA[
function MyClass() {
// some code here
}
]]></script>
Page Using the Library (note the check to avoid multiple nested inclusion; the text ' ' is just to keep the script tag from turning into <script/>, which browsers don't like):
<div>
<script editme="if this.MyClass==undefined ;; process 'MyLibrary' ;; text ' ' "></script>
<script type="text/vnd.editme.js"><![CDATA[
var myobject = new MyClass();
]]></script>
</div>