<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>xpi/chrome.original.manifest</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,5 +2,6 @@ dest/
 build.properties
 resouces/
 xpi/chrome/content/work/
+xpi/chrome.manifest
 *.bak
 *.orig</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,33 @@ disconnectAll(grobal);
 if(typeof(constant)=='undefined')
 	constant = {};
 
+updatePatchChromeManifest();
+
+function updatePatchChromeManifest(){
+	var DELIMITER = '# GENERATED';
+	
+	var dataDir = createURI(getDataDir()).spec;
+	var line = 'content tombloo-patch ' + dataDir;
+	var manifest = getChromeManifestFile();
+	var contents = getContents(manifest);
+	var updated = 
+		contents.split(DELIMITER).shift() + 
+		DELIMITER + '\n' + 
+		line + '\n';
+	
+	if(contents != updated){
+		putContents(manifest, updated);
+		ChromeRegistry.checkForNewChrome();
+	}
+}
+
+function reload(){
+	signal(grobal, 'context-reload');
+	
+	loadAllSubScripts();
+	getWindows().forEach(connectToBrowser);
+}
+
 
 // ----[XPCOM]-------------------------------------------------
 function evalInSandbox(js, url){
@@ -229,6 +256,35 @@ function getTempFile(ext){
 	return file;
 }
 
+function getChromeManifestFile(){
+	var manifest = getExtensionDir(EXTENSION_ID);
+	manifest.append('chrome.manifest');
+	
+	return manifest;
+}
+
+function addChromeManifest(line){
+	var manifest = getChromeManifestFile();
+	var re = new RegExp('^' + line + '\n?', 'm');
+	var contents = getContents(manifest);
+	if(re.test(contents))
+		return;
+	
+	putContents(manifest, contents + line + '\n');
+	ChromeRegistry.checkForNewChrome();
+}
+
+function removeChromeManifest(line){
+	var manifest = getChromeManifestFile();
+	var re = new RegExp('^' + line + '\n?', 'm');
+	var contents = getContents(manifest);
+	if(!re.test(contents))
+		return;
+	
+	putContents(manifest, contents.replace(re, ''));
+	ChromeRegistry.checkForNewChrome();
+}
+
 /**
  * &#12480;&#12452;&#12450;&#12525;&#12464;&#12434;&#38283;&#12367;&#12290;
  * Progress&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12289;&#12414;&#12383;&#12399;&#12289;&#20491;&#21029;&#12398;&#20516;&#12434;&#28193;&#12377;&#12290;</diff>
      <filename>xpi/chrome/content/library/01_utility.js</filename>
    </modified>
    <modified>
      <diff>@@ -384,13 +384,6 @@ connect(grobal, 'browser-load', function(e){
 	}, true);
 });
 
-function reload(){
-	signal(grobal, 'context-reload');
-	
-	loadAllSubScripts();
-	getWindows().forEach(connectToBrowser);
-}
-
 function connectToBrowser(win){
 	// &#12497;&#12501;&#12457;&#12540;&#12510;&#12531;&#12473;&#12434;&#32771;&#24942;&#12375;connect&#12375;&#12390;&#12356;&#12427;&#12418;&#12398;&#12364;&#12356;&#12394;&#12369;&#12428;&#12400;&#12454;&#12457;&#12483;&#12481;&#12375;&#12394;&#12356;
 	// &#12522;&#12525;&#12540;&#12489;&#12420;&#35373;&#23450;&#22793;&#26356;&#12395;&#12424;&#12426;&#32368;&#12426;&#36820;&#12375;&#21628;&#12400;&#12428;&#12383;&#12392;&#12365;&#12395;&#22810;&#37325;&#12501;&#12483;&#12463;&#12375;&#12394;&#12356;&#12424;&#12358;&#12395;&#12481;&#12455;&#12483;&#12463;</diff>
      <filename>xpi/chrome/content/library/40_ui.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ff07dbaad2e579b366581e66c5ad8076e23d555a</id>
    </parent>
  </parents>
  <author>
    <name>to</name>
    <email>ryutaro.kamitsu@gmail.com</email>
  </author>
  <url>http://github.com/to/tombloo/commit/694731b078b9b39c5e2f13f040f0bc4cb8561998</url>
  <id>694731b078b9b39c5e2f13f040f0bc4cb8561998</id>
  <committed-date>2009-05-10T06:49:06-07:00</committed-date>
  <authored-date>2009-05-10T06:49:06-07:00</authored-date>
  <message> * chrome://tombloo-patch&#36861;&#21152;
 * chrome.manifest&#12434;&#31649;&#29702;&#38500;&#22806;&#12395;</message>
  <tree>a4d7c6e8b0ec132230a201ceef944768f25c73b3</tree>
  <committer>
    <name>to</name>
    <email>ryutaro.kamitsu@gmail.com</email>
  </committer>
</commit>
