JSDOC/TokenReader.js
[gnome.introspection-doc-generator] / String.js
old mode 100755 (executable)
new mode 100644 (file)
index 37ff1d4..e5e01d0
--- a/String.js
+++ b/String.js
@@ -9,14 +9,13 @@
  * <script type="text/javascript">
  */
 // usage:
-//imports['String.js'].load(String);
-if (imports) {
-    load = false; // declare global for gnome langs.
-}
-(function () {
-    
+// Seed.include('String.js');
+const XObject = imports.XObject.XObject;
+
+
 
-    var string =  {
+XObject.extend(String, 
+    {
     
         /** @scope String */
         
@@ -108,7 +107,8 @@ if (imports) {
         }
         
         
-    };
+    }
+);
 
     /**
      * Utility function that allows you to easily switch a string between two alternating values.  The passed value
@@ -127,7 +127,8 @@ if (imports) {
      * @return {String} The new value
      */
      
-    var stringPrototype = {
+XObject.extend(String.prototype,  {
+        
         toggle : function(value, other){
             return this == value ? other : value;
         },
@@ -154,27 +155,6 @@ if (imports) {
             return this;
         }
  
-    };
-    
     
-    
-    if (imports) {
-        load = function(ar) {
-            String = ar;
-            imports.lang.copyPropertiesNoOverwrite(string,ar);
-            imports.lang.copyPropertiesNoOverwrite(stringPrototype,ar.prototype);
-        };
-    } else {
-        // non imports version.
-        for(i in stringPrototype) {
-            if (!String.prototype[i]) {
-                String.prototype[i] = stringPrototype[i];
-            }
-        }
-        for(i in string) {
-            if (!String[i]) {
-                String[i] = string[i];
-            }
-        }
-    }
-})();
\ No newline at end of file
+   
+});
\ No newline at end of file