[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/utils/khtml_userscript
From:       Mathieu Ducharme <ducharme.mathieu () gmail ! com>
Date:       2007-11-30 23:41:56
Message-ID: 1196466116.191492.13420.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 743443 by ducharme:

Load the compat script. Right now the script is empty but atleast it doesnt crash

 M  +1 -0      CMakeLists.txt  
 M  +1 -1      js/khtml_userscript_gm_compat.js  
 M  +4 -1      khtml_userscript.cpp  


--- trunk/playground/utils/khtml_userscript/CMakeLists.txt #743442:743443
@@ -40,6 +40,7 @@
 ########### install files ###############
 
 install(FILES khtml_userscript.rc khtml_userscript.desktop DESTINATION \
${DATA_INSTALL_DIR}/khtml/kpartplugins) +install(FILES \
js/khtml_userscript_gm_compat.js DESTINATION ${DATA_INSTALL_DIR}/khtml/kpartplugins)  \
#install(FILES khtml_userscript.knsrc  DESTINATION  ${CONFIG_INSTALL_DIR} )  
 #kde4_install_icons(${ICON_INSTALL_DIR})
--- trunk/playground/utils/khtml_userscript/js/khtml_userscript_gm_compat.js \
#743442:743443 @@ -36,7 +36,7 @@
 History
 GM_log was introduced in Greasemonkey 0.3. 
 */
-function GM_Log(message)
+function GM_log(message)
 {
     
 }
--- trunk/playground/utils/khtml_userscript/khtml_userscript.cpp #743442:743443
@@ -236,9 +236,12 @@
         return false;
     }
 
-    QString path = KStandardDirs::locate("data", "khtml/kpartsplugins/") + \
"khtml_userscript_gm_compat.js"; +    KStandardDirs *ksd = new KStandardDirs();
+    QString path = ksd->findResource("data", \
"konqueror/khtml_userscript_gm_compat.js"); +    delete(ksd);
     kDebug() << "PATH:" << path;
 
+    //UserScript *compat = new UserScript(path);
     UserScript *compat = new UserScript(path);
 
     QVariant res = m_part->executeScript(m_part->htmlDocument(), compat->script());


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic