adium 4647:c8f4e9819f53: Because some/lots of message styles ove...

commits at adium.im commits at adium.im
Sat Feb 4 13:58:34 UTC 2012


details:	http://hg.adium.im/adium/rev/c8f4e9819f53
revision:	4647:c8f4e9819f53
branch:		(none)
author:		Adrian Godoroja <robotive at me.com>
date:		Sat Feb 04 15:58:23 2012 +0200

Because some/lots of message styles override our Template.html, we inject the event listener, instead of having it in the default Template.html. Refs #15377.

diffs (43 lines):

diff -r 8fc9e07216a8 -r c8f4e9819f53 ChangeLogs/Changes Between Betas.txt
--- a/ChangeLogs/Changes Between Betas.txt	Sat Feb 04 12:09:28 2012 +0200
+++ b/ChangeLogs/Changes Between Betas.txt	Sat Feb 04 15:58:23 2012 +0200
@@ -1,5 +1,6 @@
 Adium 1.5xx
  * Fixed the contact list appearing in a wrong position at startup on Mac OS X Lion (#15341, #15480).
+ * Fixed message history only showing on 1st tab, on startup (#15377).
 
 
 Adium 1.5rc3
diff -r 8fc9e07216a8 -r c8f4e9819f53 Plugins/WebKit Message View/AIWebKitMessageViewController.m
--- a/Plugins/WebKit Message View/AIWebKitMessageViewController.m	Sat Feb 04 12:09:28 2012 +0200
+++ b/Plugins/WebKit Message View/AIWebKitMessageViewController.m	Sat Feb 04 15:58:23 2012 +0200
@@ -980,11 +980,14 @@
 }
 
 /*!
- * @brief Add ourself to the window script object bridge when it's safe to do so
+ * @brief Add ourself to the window script object bridge when it's safe to do so. Also injects custom javascript.
  */
 - (void)webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)windowObject forFrame:(WebFrame *)frame
 {
     [[webView windowScriptObject] setValue:self forKey:@"client"];
+	
+	// Add an event listener for DOM ready and notify back our controller
+	[[webView windowScriptObject] evaluateWebScript:@"document.addEventListener(\"DOMContentLoaded\", function() {window.client.$_setDocumentReady()}, false);"];
 }
 
 //Dragging delegate ----------------------------------------------------------------------------------------------------
diff -r 8fc9e07216a8 -r c8f4e9819f53 Plugins/WebKit Message View/Template.html
--- a/Plugins/WebKit Message View/Template.html	Sat Feb 04 12:09:28 2012 +0200
+++ b/Plugins/WebKit Message View/Template.html	Sat Feb 04 15:58:23 2012 +0200
@@ -7,10 +7,6 @@
 		// NOTE:
 		// Any percent signs in this file must be escaped!
 		// Use two escape signs (%%) to display it, this is passed through a format call!
-
-		// We listen for DOM ready and notify our controller
-		document.addEventListener("DOMContentLoaded", function() {window.client.$_setDocumentReady()}, false);
-		//
 		
 		function appendHTML(html) {
 			var node = document.getElementById("Chat");




More information about the commits mailing list