(function (<bridge>) {
    // unsafeWindow
    with ({ unsafeWindow: window, document: window.document, location: window.location, window: undefined }) {
        // define GM functions
        var GM_log = function (s) {
            return <bridge>.gmLog_(s);
        }
        var GM_getValue = function (k, d) {
            return <bridge>.gmValueForKey_defaultValue_scriptName_namespace_(k, d, "<name>", "<namespace>");
        }
        var GM_setValue = function (k, v) {
            return <bridge>.gmSetValue_forKey_scriptName_namespace_(v, k, "<name>", "<namespace>");
        }
        /* Not implemented yet
        var GM_registerMenuCommand = function (t, c) {
            <bridge>.gmRegisterMenuCommand_callback_(t, c);
        }
        */
        var GM_xmlhttpRequest = function (d) {
            return <bridge>.gmXmlhttpRequest_(d);
        }

        <body>;
    }
});

@@ -210,24 +210,78 @@
 ction (s) %7B%0A
+            unsafeWindow.console.log('GM_log: ' + s);%0A
             
@@ -308,32 +308,33 @@
 g_(s);%0A        %7D
+;
 %0A        var GM_
@@ -472,32 +472,33 @@
 ce%3E%22);%0A        %7D
+;
 %0A        var GM_
@@ -627,32 +627,33 @@
 ce%3E%22);%0A        %7D
+;
 %0A        /* Not 
@@ -901,16 +901,16 @@
 st_(d);%0A
-
         
@@ -910,16 +910,17 @@
        %7D
+;
 %0A%0A      

Add semicolon.