]> git.saurik.com Git - cydget.git/commitdiff
Script blocks for text/cycript should be ignored if Cycript is not available.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 9 Nov 2009 07:06:25 +0000 (07:06 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 9 Nov 2009 07:06:25 +0000 (07:06 +0000)
LockScreen.mm
control

index ec5d6528e2713b3c4dd03c26054415f59ab6255a..1653fe88f7354d811b0cd6cd849190439f86b89a 100644 (file)
@@ -815,17 +815,15 @@ MSHook(void, _ZN7WebCore13HTMLTokenizer14notifyFinishedEPNS_14CachedResourceE, v
 }
 
 MSHook(bool, _ZN7WebCore16MIMETypeRegistry29isSupportedJavaScriptMIMETypeERKNS_6StringE, const WebCore::String &mime) {
-    bool jscript;
+    if (!GetParser1() || mime != "text/cycript")
+        return __ZN7WebCore16MIMETypeRegistry29isSupportedJavaScriptMIMETypeERKNS_6StringE(mime);
 
-    if (!GetParser1()) through:
-        jscript = __ZN7WebCore16MIMETypeRegistry29isSupportedJavaScriptMIMETypeERKNS_6StringE(mime);
-    else if (mime == "text/cycript") {
-        SetParser(true, true);
-        jscript = true;
-    } else
-        goto through;
+    static void *handle(dlopen("/usr/lib/libcycript.dylib", RTLD_LAZY | RTLD_GLOBAL));
+    if (handle == NULL)
+        return false;
 
-    return jscript;
+    SetParser(true, true);
+    return true;
 }
 
 /* Cydget:// Protocol {{{ */
diff --git a/control b/control
index 441f1e1ba26c7ce452f0ab309eb3b18163b5cea0..64a5ab248901342a60885fb441f2276800b2f0d0 100644 (file)
--- a/control
+++ b/control
@@ -3,7 +3,7 @@ Priority: optional
 Section: Development
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.3082-1
+Version: 0.9.3083-1
 Description: framework for managing lock screen plugins
 Name: Cydget
 Depends: mobilesubstrate (>= 0.9.2587-1), firmware (>= 2.2), preferenceloader, apr-lib